From c7dfbe109020ba1571fcd95dfa79af10c2a5bf01 Mon Sep 17 00:00:00 2001 From: chloe caruso Date: Sun, 15 Jun 2025 23:42:10 -0700 Subject: [PATCH] throw in the file viewer --- meow.txt | Bin 0 -> 76270 bytes package-lock.json | 514 + package.json | 2 + src/blog/pages/25/marko-intro.markodown | 8 +- src/file-viewer/backend.tsx | 425 + src/file-viewer/bin/extension-stats.ts | 83 + src/file-viewer/bin/scan.ts | 1015 ++ src/file-viewer/cache.ts | 418 + src/file-viewer/cert.pem | 23 + src/file-viewer/cotyledon.tsx | 291 + src/file-viewer/format.ts | 264 + src/file-viewer/highlight-grammar/astro.plist | 1203 ++ src/file-viewer/highlight-grammar/css.plist | 1036 ++ src/file-viewer/highlight-grammar/diff.plist | 268 + .../highlight-grammar/dosbatch.plist | 169 + src/file-viewer/highlight-grammar/json.plist | 386 + src/file-viewer/highlight-grammar/lua.plist | 1462 +++ src/file-viewer/highlight-grammar/mdx.plist | 9527 ++++++++++++++ src/file-viewer/highlight-grammar/php.plist | 4019 ++++++ .../highlight-grammar/powershell.plist | 1614 +++ .../highlight-grammar/python.plist | 4009 ++++++ src/file-viewer/highlight-grammar/shell.plist | 1889 +++ src/file-viewer/highlight-grammar/toml.plist | 736 ++ src/file-viewer/highlight-grammar/ts.plist | 9858 +++++++++++++++ src/file-viewer/highlight-grammar/tsx.plist | 10281 ++++++++++++++++ src/file-viewer/highlight-grammar/xml.plist | 573 + src/file-viewer/highlight-grammar/yaml.plist | 1164 ++ src/file-viewer/highlight-grammar/zig.plist | 846 ++ src/file-viewer/highlight.ts | 204 + src/file-viewer/models/BlobAsset.ts | 0 src/file-viewer/models/FilePermission.ts | 0 src/file-viewer/models/MediaFile.ts | 0 .../pages/file.cotyledon_enterance.tsx | 27 + .../pages/file.cotyledon_speedbump.tsx | 27 + src/file-viewer/redirects.ts | 9 + src/file-viewer/scripts/canvas_2017.ts | 233 + src/file-viewer/scripts/canvas_2018.ts | 431 + src/file-viewer/scripts/canvas_2019.ts | 213 + src/file-viewer/scripts/canvas_2020.ts | 197 + src/file-viewer/scripts/canvas_2021.ts | 783 ++ src/file-viewer/scripts/canvas_2022.ts | 160 + src/file-viewer/scripts/canvas_2023.ts | 197 + src/file-viewer/scripts/canvas_2024.ts | 251 + src/file-viewer/scripts/canvas_cotyledon.ts | 362 + src/file-viewer/static/captcha/0.jpeg | Bin 0 -> 13950 bytes src/file-viewer/static/captcha/1.jpeg | Bin 0 -> 9964 bytes src/file-viewer/static/captcha/10.jpeg | Bin 0 -> 10225 bytes src/file-viewer/static/captcha/11.jpeg | Bin 0 -> 6654 bytes src/file-viewer/static/captcha/12.jpeg | Bin 0 -> 6952 bytes src/file-viewer/static/captcha/13.jpeg | Bin 0 -> 8887 bytes src/file-viewer/static/captcha/14.jpeg | Bin 0 -> 14764 bytes src/file-viewer/static/captcha/15.jpeg | Bin 0 -> 12411 bytes src/file-viewer/static/captcha/16.jpeg | Bin 0 -> 15326 bytes src/file-viewer/static/captcha/17.jpeg | Bin 0 -> 7285 bytes src/file-viewer/static/captcha/2.jpeg | Bin 0 -> 6358 bytes src/file-viewer/static/captcha/3.jpeg | Bin 0 -> 10319 bytes src/file-viewer/static/captcha/4.jpeg | Bin 0 -> 12245 bytes src/file-viewer/static/captcha/5.jpeg | Bin 0 -> 12868 bytes src/file-viewer/static/captcha/6.jpeg | Bin 0 -> 13718 bytes src/file-viewer/static/captcha/7.jpeg | Bin 0 -> 7591 bytes src/file-viewer/static/captcha/8.jpeg | Bin 0 -> 11619 bytes src/file-viewer/static/captcha/9.jpeg | Bin 0 -> 8364 bytes src/file-viewer/views/canvas.astro | 12 + src/file-viewer/views/canvas.client.ts | 10 + src/file-viewer/views/clofi.client.ts | 685 + src/file-viewer/views/clofi.css | 798 ++ src/file-viewer/views/clofi.tsx | 1007 ++ src/friend-auth.ts | 75 + src/friends/.gitignore | 4 + src/pages/friends/auth.fail.marko | 9 + src/pages/friends/auth.marko | 8 + src/pages/subscribe.client.ts | 97 + src/pages/subscribe.css | 17 + src/pages/subscribe.marko | 39 + src/pages/waterfalls.css | 31 + src/pages/waterfalls.tsx | 63 + src/site.ts | 2 +- src/tags/PhotoGrid.css | 16 + src/tags/PhotoGrid.tsx | 134 + src/tags/Video.tsx | 3 +- src/tags/blurhash.tsx | 34 + tsconfig.json | 2 +- 82 files changed, 58218 insertions(+), 5 deletions(-) create mode 100644 meow.txt create mode 100644 src/file-viewer/backend.tsx create mode 100644 src/file-viewer/bin/extension-stats.ts create mode 100644 src/file-viewer/bin/scan.ts create mode 100644 src/file-viewer/cache.ts create mode 100644 src/file-viewer/cert.pem create mode 100644 src/file-viewer/cotyledon.tsx create mode 100644 src/file-viewer/format.ts create mode 100644 src/file-viewer/highlight-grammar/astro.plist create mode 100644 src/file-viewer/highlight-grammar/css.plist create mode 100644 src/file-viewer/highlight-grammar/diff.plist create mode 100644 src/file-viewer/highlight-grammar/dosbatch.plist create mode 100644 src/file-viewer/highlight-grammar/json.plist create mode 100644 src/file-viewer/highlight-grammar/lua.plist create mode 100644 src/file-viewer/highlight-grammar/mdx.plist create mode 100644 src/file-viewer/highlight-grammar/php.plist create mode 100644 src/file-viewer/highlight-grammar/powershell.plist create mode 100644 src/file-viewer/highlight-grammar/python.plist create mode 100644 src/file-viewer/highlight-grammar/shell.plist create mode 100644 src/file-viewer/highlight-grammar/toml.plist create mode 100644 src/file-viewer/highlight-grammar/ts.plist create mode 100644 src/file-viewer/highlight-grammar/tsx.plist create mode 100644 src/file-viewer/highlight-grammar/xml.plist create mode 100644 src/file-viewer/highlight-grammar/yaml.plist create mode 100644 src/file-viewer/highlight-grammar/zig.plist create mode 100644 src/file-viewer/highlight.ts create mode 100644 src/file-viewer/models/BlobAsset.ts create mode 100644 src/file-viewer/models/FilePermission.ts create mode 100644 src/file-viewer/models/MediaFile.ts create mode 100644 src/file-viewer/pages/file.cotyledon_enterance.tsx create mode 100644 src/file-viewer/pages/file.cotyledon_speedbump.tsx create mode 100644 src/file-viewer/redirects.ts create mode 100644 src/file-viewer/scripts/canvas_2017.ts create mode 100644 src/file-viewer/scripts/canvas_2018.ts create mode 100644 src/file-viewer/scripts/canvas_2019.ts create mode 100644 src/file-viewer/scripts/canvas_2020.ts create mode 100644 src/file-viewer/scripts/canvas_2021.ts create mode 100644 src/file-viewer/scripts/canvas_2022.ts create mode 100644 src/file-viewer/scripts/canvas_2023.ts create mode 100644 src/file-viewer/scripts/canvas_2024.ts create mode 100644 src/file-viewer/scripts/canvas_cotyledon.ts create mode 100644 src/file-viewer/static/captcha/0.jpeg create mode 100644 src/file-viewer/static/captcha/1.jpeg create mode 100644 src/file-viewer/static/captcha/10.jpeg create mode 100644 src/file-viewer/static/captcha/11.jpeg create mode 100644 src/file-viewer/static/captcha/12.jpeg create mode 100644 src/file-viewer/static/captcha/13.jpeg create mode 100644 src/file-viewer/static/captcha/14.jpeg create mode 100644 src/file-viewer/static/captcha/15.jpeg create mode 100644 src/file-viewer/static/captcha/16.jpeg create mode 100644 src/file-viewer/static/captcha/17.jpeg create mode 100644 src/file-viewer/static/captcha/2.jpeg create mode 100644 src/file-viewer/static/captcha/3.jpeg create mode 100644 src/file-viewer/static/captcha/4.jpeg create mode 100644 src/file-viewer/static/captcha/5.jpeg create mode 100644 src/file-viewer/static/captcha/6.jpeg create mode 100644 src/file-viewer/static/captcha/7.jpeg create mode 100644 src/file-viewer/static/captcha/8.jpeg create mode 100644 src/file-viewer/static/captcha/9.jpeg create mode 100644 src/file-viewer/views/canvas.astro create mode 100644 src/file-viewer/views/canvas.client.ts create mode 100644 src/file-viewer/views/clofi.client.ts create mode 100644 src/file-viewer/views/clofi.css create mode 100644 src/file-viewer/views/clofi.tsx create mode 100644 src/friend-auth.ts create mode 100644 src/friends/.gitignore create mode 100644 src/pages/friends/auth.fail.marko create mode 100644 src/pages/friends/auth.marko create mode 100644 src/pages/subscribe.client.ts create mode 100644 src/pages/subscribe.css create mode 100644 src/pages/subscribe.marko create mode 100644 src/pages/waterfalls.css create mode 100644 src/pages/waterfalls.tsx create mode 100644 src/tags/PhotoGrid.css create mode 100644 src/tags/PhotoGrid.tsx create mode 100644 src/tags/blurhash.tsx diff --git a/meow.txt b/meow.txt new file mode 100644 index 0000000000000000000000000000000000000000..65b59696b74d8976967d70a050af2f2175af8632 GIT binary patch literal 76270 zcmeI5`*R$}amV-PROK(oFK4(apkf0M0GSkJN`CMW$z?i>t9}*rk0Ggy_ z`A<*MpJ_C@XLs(fdwY8a5LZ{g?d|Q&qvt#Qo|*sq-+!t8T-~m2RtMGd>bTmG_r2FRd1E!Ue; zdg=bB=XXcdS~WWR#b#>3vD8l+?04EqN*+~@t4GyVb*uVR%Khx@cYL!d_w)9x%D21H zr$c!iNef5SQ)%xgJ+)UoldBzRHUCG|@8s8ilJ{MC@<94{l=^&_`u5M&KglZ{bt zk^Fz3s4$W`Z&W{|U%eD6?Ms=*i8?=*d(WlZeR(~V_g$gpsQNLrx8BOHQ(s?8OFoik zKCixz|9_DBpGisd;8kj)^?a3N`+G&A}8#RFl%H6GU9QgPhq;aJG%qXqPM~UBlBWC>R;jr{I=`8$%?c_%C;-NzX+6-bopnZqo8>)(!0XR(U)Gx2*ab`bi;GLNRuWW;jr*(xZJ(0tzVzD zbR7Do>FxY*YDk>!eQ5laZL{rQvt1VaMtrOZVvhvFQA?f|ik)I5`5jyNSlakVT55Xy zqlD^R;jCq;UBYoJZ+x%khvud}J`JviM)j>CSKbnzfz`YSR6ECA6FwKYv1`~*G7VcX z{caAt*(p{+wQBc}w~rDAuC_O+@OVaG>W)R6@yUJ9o? znUSqND{I}6(!8>99g4ec247FaPEN%;)TV#azKrRv{GG}bJWu7Ga#Eg!qrOki8<%bJuGpXE*x<#-Q+blOynR|v z-m6pbU%nCaYb)+b?J*8}Lt?7yiQ~VPNbL=2x5rqC+}ikzicF81X!`L>CZyg&IkSlz_XiHT}U)|2egSnqn0N)aFRmz<#xe zk-Qz++*N5hDqyAKiZ08a4XF^@(<4DFzGb^yf&{NQuu*0HGwVLjm7i?7hJ^k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@@ "@hono/node-server": "^1.14.3", "@mdx-js/mdx": "^3.1.0", "@paperclover/console": "git+https://git.paperclover.net/clo/console.git", + "blurhash": "^2.0.5", "codemirror": "^6.0.1", "devalue": "^5.1.1", "esbuild": "^0.25.5", @@ -15,6 +16,7 @@ "hono": "^4.7.11", "marko": "^6.0.20", "puppeteer": "^24.10.1", + "sharp": "^0.34.2", "unique-names-generator": "^4.7.1" }, "devDependencies": { @@ -487,6 +489,16 @@ "w3c-keyname": "^2.2.4" } }, + "node_modules/@emnapi/runtime": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.4.3.tgz", + "integrity": "sha512-pBPWdu6MLKROBX05wSNKcNb++m5Er+KQ9QkB+WVM+pW2Kx9hoSrVTnu3BdkI5eBLZoKu/J6mW/B6i6bJB2ytXQ==", + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.25.5", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.5.tgz", @@ -899,6 +911,402 @@ "hono": "^4" } }, + "node_modules/@img/sharp-darwin-arm64": { + "version": "0.34.2", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.34.2.tgz", + "integrity": "sha512-OfXHZPppddivUJnqyKoi5YVeHRkkNE2zUFT2gbpKxp/JZCFYEYubnMg+gOp6lWfasPrTS+KPosKqdI+ELYVDtg==", + "cpu": [ + "arm64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-arm64": "1.1.0" + } + }, + "node_modules/@img/sharp-darwin-x64": { + "version": "0.34.2", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.34.2.tgz", + "integrity": "sha512-dYvWqmjU9VxqXmjEtjmvHnGqF8GrVjM2Epj9rJ6BUIXvk8slvNDJbhGFvIoXzkDhrJC2jUxNLz/GUjjvSzfw+g==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-x64": "1.1.0" + } + }, + "node_modules/@img/sharp-libvips-darwin-arm64": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.1.0.tgz", + "integrity": "sha512-HZ/JUmPwrJSoM4DIQPv/BfNh9yrOA8tlBbqbLz4JZ5uew2+o22Ik+tHQJcih7QJuSa0zo5coHTfD5J8inqj9DA==", + "cpu": [ + "arm64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "darwin" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-darwin-x64": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.1.0.tgz", + "integrity": "sha512-Xzc2ToEmHN+hfvsl9wja0RlnXEgpKNmftriQp6XzY/RaSfwD9th+MSh0WQKzUreLKKINb3afirxW7A0fz2YWuQ==", + "cpu": [ + "x64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "darwin" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.1.0.tgz", + "integrity": "sha512-s8BAd0lwUIvYCJyRdFqvsj+BJIpDBSxs6ivrOPm/R7piTs5UIwY5OjXrP2bqXC9/moGsyRa37eYWYCOGVXxVrA==", + "cpu": [ + "arm" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm64": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.1.0.tgz", + "integrity": "sha512-IVfGJa7gjChDET1dK9SekxFFdflarnUB8PwW8aGwEoF3oAsSDuNUTYS+SKDOyOJxQyDC1aPFMuRYLoDInyV9Ew==", + "cpu": [ + "arm64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-ppc64": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.1.0.tgz", + "integrity": "sha512-tiXxFZFbhnkWE2LA8oQj7KYR+bWBkiV2nilRldT7bqoEZ4HiDOcePr9wVDAZPi/Id5fT1oY9iGnDq20cwUz8lQ==", + "cpu": [ + "ppc64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-s390x": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.1.0.tgz", + "integrity": "sha512-xukSwvhguw7COyzvmjydRb3x/09+21HykyapcZchiCUkTThEQEOMtBj9UhkaBRLuBrgLFzQ2wbxdeCCJW/jgJA==", + "cpu": [ + "s390x" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-x64": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.1.0.tgz", + "integrity": "sha512-yRj2+reB8iMg9W5sULM3S74jVS7zqSzHG3Ol/twnAAkAhnGQnpjj6e4ayUz7V+FpKypwgs82xbRdYtchTTUB+Q==", + "cpu": [ + "x64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-arm64": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.1.0.tgz", + "integrity": "sha512-jYZdG+whg0MDK+q2COKbYidaqW/WTz0cc1E+tMAusiDygrM4ypmSCjOJPmFTvHHJ8j/6cAGyeDWZOsK06tP33w==", + "cpu": [ + "arm64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-x64": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.1.0.tgz", + "integrity": "sha512-wK7SBdwrAiycjXdkPnGCPLjYb9lD4l6Ze2gSdAGVZrEL05AOUJESWU2lhlC+Ffn5/G+VKuSm6zzbQSzFX/P65A==", + "cpu": [ + "x64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-linux-arm": { + "version": "0.34.2", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.34.2.tgz", + "integrity": "sha512-0DZzkvuEOqQUP9mo2kjjKNok5AmnOr1jB2XYjkaoNRwpAYMDzRmAqUIa1nRi58S2WswqSfPOWLNOr0FDT3H5RQ==", + "cpu": [ + "arm" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm": "1.1.0" + } + }, + "node_modules/@img/sharp-linux-arm64": { + "version": "0.34.2", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.34.2.tgz", + "integrity": "sha512-D8n8wgWmPDakc83LORcfJepdOSN6MvWNzzz2ux0MnIbOqdieRZwVYY32zxVx+IFUT8er5KPcyU3XXsn+GzG/0Q==", + "cpu": [ + "arm64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm64": "1.1.0" + } + }, + "node_modules/@img/sharp-linux-s390x": { + "version": "0.34.2", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.34.2.tgz", + "integrity": "sha512-EGZ1xwhBI7dNISwxjChqBGELCWMGDvmxZXKjQRuqMrakhO8QoMgqCrdjnAqJq/CScxfRn+Bb7suXBElKQpPDiw==", + "cpu": [ + "s390x" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-s390x": "1.1.0" + } + }, + "node_modules/@img/sharp-linux-x64": { + "version": "0.34.2", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.34.2.tgz", + "integrity": "sha512-sD7J+h5nFLMMmOXYH4DD9UtSNBD05tWSSdWAcEyzqW8Cn5UxXvsHAxmxSesYUsTOBmUnjtxghKDl15EvfqLFbQ==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-x64": "1.1.0" + } + }, + "node_modules/@img/sharp-linuxmusl-arm64": { + "version": "0.34.2", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.34.2.tgz", + "integrity": "sha512-NEE2vQ6wcxYav1/A22OOxoSOGiKnNmDzCYFOZ949xFmrWZOVII1Bp3NqVVpvj+3UeHMFyN5eP/V5hzViQ5CZNA==", + "cpu": [ + "arm64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-arm64": "1.1.0" + } + }, + "node_modules/@img/sharp-linuxmusl-x64": { + "version": "0.34.2", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.34.2.tgz", + "integrity": "sha512-DOYMrDm5E6/8bm/yQLCWyuDJwUnlevR8xtF8bs+gjZ7cyUNYXiSf/E8Kp0Ss5xasIaXSHzb888V1BE4i1hFhAA==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-x64": "1.1.0" + } + }, + "node_modules/@img/sharp-wasm32": { + "version": "0.34.2", + "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.34.2.tgz", + "integrity": "sha512-/VI4mdlJ9zkaq53MbIG6rZY+QRN3MLbR6usYlgITEzi4Rpx5S6LFKsycOQjkOGmqTNmkIdLjEvooFKwww6OpdQ==", + "cpu": [ + "wasm32" + ], + "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT", + "optional": true, + "dependencies": { + "@emnapi/runtime": "^1.4.3" + }, + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-arm64": { + "version": "0.34.2", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.34.2.tgz", + "integrity": "sha512-cfP/r9FdS63VA5k0xiqaNaEoGxBg9k7uE+RQGzuK9fHt7jib4zAVVseR9LsE4gJcNWgT6APKMNnCcnyOtmSEUQ==", + "cpu": [ + "arm64" + ], + "license": "Apache-2.0 AND LGPL-3.0-or-later", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-ia32": { + "version": "0.34.2", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.34.2.tgz", + "integrity": "sha512-QLjGGvAbj0X/FXl8n1WbtQ6iVBpWU7JO94u/P2M4a8CFYsvQi4GW2mRy/JqkRx0qpBzaOdKJKw8uc930EX2AHw==", + "cpu": [ + "ia32" + ], + "license": "Apache-2.0 AND LGPL-3.0-or-later", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-x64": { + "version": "0.34.2", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.34.2.tgz", + "integrity": "sha512-aUdT6zEYtDKCaxkofmmJDJYGCf0+pJg3eU9/oBuqvEeoB9dKI6ZLc/1iLJCTuJQDO4ptntAlkUmHgGjyuobZbw==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0 AND LGPL-3.0-or-later", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.8", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", @@ -1385,6 +1793,12 @@ "node": ">=10.0.0" } }, + "node_modules/blurhash": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/blurhash/-/blurhash-2.0.5.tgz", + "integrity": "sha512-cRygWd7kGBQO3VEhPiTgq4Wc43ctsM+o46urrmPOiuAe+07fzlSB9OJVdpgDL0jPqXUVQ9ht7aq7kxOeJHRK+w==", + "license": "MIT" + }, "node_modules/browserslist": { "version": "4.25.0", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.0.tgz", @@ -1596,6 +2010,19 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/color": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", + "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1", + "color-string": "^1.9.0" + }, + "engines": { + "node": ">=12.5.0" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -1614,6 +2041,16 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "license": "MIT" }, + "node_modules/color-string": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", + "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", + "license": "MIT", + "dependencies": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, "node_modules/comma-separated-tokens": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", @@ -1739,6 +2176,15 @@ "node": ">=6" } }, + "node_modules/detect-libc": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.4.tgz", + "integrity": "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==", + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, "node_modules/devalue": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/devalue/-/devalue-5.1.1.tgz", @@ -3723,6 +4169,74 @@ "semver": "bin/semver.js" } }, + "node_modules/sharp": { + "version": "0.34.2", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.34.2.tgz", + "integrity": "sha512-lszvBmB9QURERtyKT2bNmsgxXK0ShJrL/fvqlonCo7e6xBF8nT8xU6pW+PMIbLsz0RxQk3rgH9kd8UmvOzlMJg==", + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "color": "^4.2.3", + "detect-libc": "^2.0.4", + "semver": "^7.7.2" + }, + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-darwin-arm64": "0.34.2", + "@img/sharp-darwin-x64": "0.34.2", + "@img/sharp-libvips-darwin-arm64": "1.1.0", + "@img/sharp-libvips-darwin-x64": "1.1.0", + "@img/sharp-libvips-linux-arm": "1.1.0", + "@img/sharp-libvips-linux-arm64": "1.1.0", + "@img/sharp-libvips-linux-ppc64": "1.1.0", + "@img/sharp-libvips-linux-s390x": "1.1.0", + "@img/sharp-libvips-linux-x64": "1.1.0", + "@img/sharp-libvips-linuxmusl-arm64": "1.1.0", + "@img/sharp-libvips-linuxmusl-x64": "1.1.0", + "@img/sharp-linux-arm": "0.34.2", + "@img/sharp-linux-arm64": "0.34.2", + "@img/sharp-linux-s390x": "0.34.2", + "@img/sharp-linux-x64": "0.34.2", + "@img/sharp-linuxmusl-arm64": "0.34.2", + "@img/sharp-linuxmusl-x64": "0.34.2", + "@img/sharp-wasm32": "0.34.2", + "@img/sharp-win32-arm64": "0.34.2", + "@img/sharp-win32-ia32": "0.34.2", + "@img/sharp-win32-x64": "0.34.2" + } + }, + "node_modules/sharp/node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.3.1" + } + }, + "node_modules/simple-swizzle/node_modules/is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", + "license": "MIT" + }, "node_modules/smart-buffer": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", diff --git a/package.json b/package.json index 2efd584..c7679c1 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "@hono/node-server": "^1.14.3", "@mdx-js/mdx": "^3.1.0", "@paperclover/console": "git+https://git.paperclover.net/clo/console.git", + "blurhash": "^2.0.5", "codemirror": "^6.0.1", "devalue": "^5.1.1", "esbuild": "^0.25.5", @@ -11,6 +12,7 @@ "hono": "^4.7.11", "marko": "^6.0.20", "puppeteer": "^24.10.1", + "sharp": "^0.34.2", "unique-names-generator": "^4.7.1" }, "devDependencies": { diff --git a/src/blog/pages/25/marko-intro.markodown b/src/blog/pages/25/marko-intro.markodown index 49ef498..3804ca6 100644 --- a/src/blog/pages/25/marko-intro.markodown +++ b/src/blog/pages/25/marko-intro.markodown @@ -17,7 +17,7 @@ JavaScript into HTML. Attributes are JavaScript expressions. ```marko
- // `input` is like props, but in global scope + // `input` is like props, but given in the top-level scope
// ESM `import` / `export` just work as expected. diff --git a/src/file-viewer/backend.tsx b/src/file-viewer/backend.tsx new file mode 100644 index 0000000..aa383bc --- /dev/null +++ b/src/file-viewer/backend.tsx @@ -0,0 +1,425 @@ +import { type Context, Hono } from "hono"; +import * as path from "node:path"; +import { etagMatches, serveAsset } from "../assets.ts"; +import { FilePermissions, MediaFile } from "../db.ts"; +import { renderDynamicPage } from "../framework/dynamic-pages.ts"; +import { renderToStringSync } from "../framework/render-to-string.ts"; +import { MediaPanel } from "../pages-dynamic/file_viewer.tsx"; +import mimeTypeDb from "./mime.json" with { type: "json" }; +import { Speedbump } from "./cotyledon.tsx"; +import { hasAsset } from "../assets.ts"; +import { CompressionFormat, fetchFile, prefetchFile } from "./cache.ts"; +import { requireFriendAuth } from "../journal/backend.ts"; + +const app = new Hono(); + +interface APIDirectoryList { + path: string; + readme: string | null; + files: APIFile[]; +} + +interface APIFile { + basename: string; + dir: boolean; + time: number; + size: number; + duration: number | null; +} + +function checkCotyledonCookie(c: Context) { + const cookie = c.req.header("Cookie"); + if (!cookie) return false; + const cookies = cookie.split("; ").map((x) => x.split("=")); + return cookies.some( + (kv) => kv[0].trim() === "cotyledon" && kv[1].trim() === "agree", + ); +} + +function isCotyledonPath(path: string) { + if (path === "/cotyledon") return true; + const year = path.match(/^\/(\d{4})($|\/)/); + if (!year) return false; + const yearInt = parseInt(year[1]); + if (yearInt < 2025 && yearInt >= 2017) return true; + return false; +} + +app.post("/file/cotyledon", async (c) => { + c.res = new Response(null, { + status: 200, + headers: { + "Set-Cookie": "cotyledon=agree; Path=/", + }, + }); +}); + +app.get("/file/*", async (c, next) => { + if (c.req.header("User-Agent")?.toLowerCase()?.includes("discordbot")) { + return next(); + } + let rawFilePath = c.req.path.slice(5) || "/"; + if (rawFilePath.endsWith("$partial")) { + return getPartialPage(c, rawFilePath.slice(0, -"$partial".length)); + } + let hasCotyledonCookie = checkCotyledonCookie(c); + if (isCotyledonPath(rawFilePath)) { + if (!hasCotyledonCookie) { + return serveAsset(c, "/file/cotyledon_speedbump", 403); + } else if (rawFilePath === "/cotyledon") { + return serveAsset(c, "/file/cotyledon_enterance", 200); + } + } + while (rawFilePath.length > 1 && rawFilePath.endsWith("/")) { + rawFilePath = rawFilePath.slice(0, -1); + } + const file = MediaFile.getByPath(rawFilePath); + if (!file) { + // perhaps a specific 404 page for media files? + return next(); + } + + const permissions = FilePermissions.getByPrefix(rawFilePath); + if (permissions !== 0) { + const friendAuthChallenge = requireFriendAuth(c); + if (friendAuthChallenge) return friendAuthChallenge; + } + + // File listings + if (file.kind === MediaFile.Kind.directory) { + if (c.req.header("Accept")?.includes("application/json")) { + const json = { + path: file.path, + files: file.getPublicChildren().map((f) => ({ + basename: f.basename, + dir: f.kind === MediaFile.Kind.directory, + time: f.date.getTime(), + size: f.size, + duration: f.duration ? f.duration : null, + })), + readme: file.contents ? file.contents : null, + } satisfies APIDirectoryList; + return c.json(json); + } + c.res = await renderDynamicPage(c.req.raw, "file_viewer", { + file, + hasCotyledonCookie, + }); + return; + } + + // Redirect to directory list for regular files if client accepts HTML + let viewMode = c.req.query("view"); + if (c.req.query("dl") !== undefined) { + viewMode = "download"; + } + if (viewMode == undefined && c.req.header("Accept")?.includes("text/html")) { + prefetchFile(file.path); + c.res = await renderDynamicPage(c.req.raw, "file_viewer", { + file, + hasCotyledonCookie, + }); + return; + } + const download = viewMode === "download"; + + const etag = file.hash; + const filePath = file.path; + const expectedSize = file.size; + + let encoding = decideEncoding(c.req.header("Accept-Encoding")); + + let sizeHeader = encoding === "raw" + ? expectedSize + // Size cannot be known because of compression modes + : undefined; + + // Etag + { + const ifNoneMatch = c.req.header("If-None-Match"); + if (ifNoneMatch && etagMatches(etag, ifNoneMatch)) { + c.res = new Response(null, { + status: 304, + statusText: "Not Modified", + headers: fileHeaders(file, download, sizeHeader), + }); + return; + } + } + + // Head + if (c.req.method === "HEAD") { + c.res = new Response(null, { + headers: fileHeaders(file, download, sizeHeader), + }); + return; + } + + // Prevalidate range requests + let rangeHeader = c.req.header("Range") ?? null; + if (rangeHeader) encoding = "raw"; + + const ifRangeHeader = c.req.header("If-Range"); + if (ifRangeHeader && ifRangeOutdated(file, ifRangeHeader)) { + // > If the condition is not fulfilled, the full resource is + // > sent back with a 200 OK status. + rangeHeader = null; + } + + let foundFile; + while (true) { + let second = false; + try { + foundFile = await fetchFile(filePath, encoding); + if (second) { + console.warn(`File ${filePath} has missing compression: ${encoding}`); + } + break; + } catch (error) { + if (encoding !== "raw") { + encoding = "raw"; + sizeHeader = file.size; + second = true; + continue; + } + + return c.text( + "internal server error: this file is present in the database but could not be fetched", + ); + } + } + const [streamOrBuffer, actualEncoding, src] = foundFile; + encoding = actualEncoding; + + // Range requests + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests + // Compression is skipped because it's a confusing, but solvable problem. + // See https://stackoverflow.com/questions/33947562/is-it-possible-to-send-http-response-using-gzip-and-byte-ranges-at-the-same-time + if (rangeHeader) { + const ranges = parseRange(rangeHeader, file.size); + // TODO: multiple ranges + if (ranges && ranges.length === 1) { + return (c.res = handleRanges(ranges, file, streamOrBuffer, download)); + } + } + + // Respond in a streaming fashion + c.res = new Response(streamOrBuffer, { + headers: { + ...fileHeaders(file, download, sizeHeader), + ...(encoding !== "raw" && { + "Content-Encoding": encoding, + }), + "X-Cache": src, + }, + }); +}); + +app.get("/canvas/:script", async (c, next) => { + const script = c.req.param("script"); + if (!hasAsset(`/js/canvas/${script}.js`)) { + return next(); + } + return renderDynamicPage(c.req.raw, "canvas", { + script, + }); +}); + +function decideEncoding(encodings: string | undefined): CompressionFormat { + if (encodings?.includes("zstd")) return "zstd"; + if (encodings?.includes("gzip")) return "gzip"; + return "raw"; +} + +function fileHeaders( + file: MediaFile, + download: boolean, + size: number | undefined = file.size, +) { + return { + Vary: "Accept-Encoding, Accept", + "Content-Type": mimeType(file.path), + "Content-Length": size.toString(), + ETag: file.hash, + "Last-Modified": file.date.toUTCString(), + ...(download && { + "Content-Disposition": `attachment; filename="${file.basename}"`, + }), + }; +} + +function ifRangeOutdated(file: MediaFile, ifRangeHeader: string) { + // etag + if (ifRangeHeader[0] === '"') { + return ifRangeHeader.slice(1, -1) !== file.hash; + } + // date + return new Date(ifRangeHeader) < file.date; +} + +/** The end is inclusive */ +type Ranges = Array<[start: number, end: number]>; + +function parseRange(rangeHeader: string, fileSize: number): Ranges | null { + const [unit, ranges] = rangeHeader.split("="); + if (unit !== "bytes") return null; + + const result: Array<[start: number, end: number]> = []; + const rangeParts = ranges.split(","); + + for (const range of rangeParts) { + const split = range.split("-"); + if (split.length !== 2) return null; + const [start, end] = split; + if (start === "" && end === "") return null; + const parsedRange: [number, number] = [ + start === "" ? fileSize - +end : +start, + end === "" ? fileSize - 1 : +end, + ]; + result.push(parsedRange); + } + + // Validate that ranges do not intersect + result.sort((a, b) => a[0] - b[0]); + for (let i = 1; i < result.length; i++) { + if (result[i][0] <= result[i - 1][1]) { + return null; + } + } + + return result; +} + +function handleRanges( + ranges: Ranges, + file: MediaFile, + streamOrBuffer: ReadableStream | Buffer, + download: boolean, +): Response { + // TODO: multiple ranges + const rangeSize = ranges.reduce((a, b) => a + (b[1] - b[0] + 1), 0); + const rangeBody = streamOrBuffer instanceof ReadableStream + ? applySingleRangeToStream(streamOrBuffer, ranges) + : applyRangesToBuffer(streamOrBuffer, ranges, rangeSize); + return new Response(rangeBody, { + status: 206, + headers: { + ...fileHeaders(file, download, rangeSize), + "Content-Range": `bytes ${ranges[0][0]}-${ranges[0][1]}/${file.size}`, + }, + }); +} + +function applyRangesToBuffer( + buffer: Buffer, + ranges: Ranges, + rangeSize: number, +): Uint8Array { + const result = new Uint8Array(rangeSize); + let offset = 0; + for (const [start, end] of ranges) { + result.set(buffer.slice(start, end + 1), offset); + offset += end - start + 1; + } + return result; +} + +function applySingleRangeToStream( + stream: ReadableStream, + ranges: Ranges, +): ReadableStream { + let reader: ReadableStreamDefaultReader; + let position = 0; + const [start, end] = ranges[0]; + return new ReadableStream({ + async start(controller) { + reader = stream.getReader(); + try { + while (position <= end) { + const { done, value } = await reader.read(); + + if (done) { + controller.close(); + return; + } + + const buffer = new Uint8Array(value); + + const bufferStart = position; + const bufferEnd = position + buffer.length - 1; + + position += buffer.length; + + if (bufferEnd < start) { + continue; + } + + if (bufferStart > end) { + break; + } + + const sendStart = Math.max(0, start - bufferStart); + const sendEnd = Math.min(buffer.length - 1, end - bufferStart); + + if (sendStart <= sendEnd) { + controller.enqueue(buffer.slice(sendStart, sendEnd + 1)); + } + } + + controller.close(); + } catch (error) { + controller.error(error); + } finally { + reader.releaseLock(); + } + }, + cancel() { + reader?.releaseLock(); + }, + }); +} + +function mimeType(file: string) { + return (mimeTypeDb as any)[path.extname(file)] ?? "application/octet-stream"; +} + +function getPartialPage(c: Context, rawFilePath: string) { + if (isCotyledonPath(rawFilePath)) { + if (!checkCotyledonCookie(c)) { + let root = Speedbump(); + // Remove the root element, it's created client side! + root = root.props.children; + + const html = renderToStringSync(root); + c.header("X-Cotyledon", "true"); + return c.html(html); + } + } + + const file = MediaFile.getByPath(rawFilePath); + const permissions = FilePermissions.getByPrefix(rawFilePath); + if (permissions !== 0) { + const friendAuthChallenge = requireFriendAuth(c); + if (friendAuthChallenge) return friendAuthChallenge; + } + if (rawFilePath.endsWith("/")) { + rawFilePath = rawFilePath.slice(0, -1); + } + if (!file) { + return c.json({ error: "File not found" }, 404); + } + + let root = MediaPanel({ + file, + isLast: true, + activeFilename: null, + hasCotyledonCookie: rawFilePath === "" && checkCotyledonCookie(c), + }); + // Remove the root element, it's created client side! + root = root.props.children; + + const html = renderToStringSync(root); + return c.html(html); +} + +export { app as mediaApp }; diff --git a/src/file-viewer/bin/extension-stats.ts b/src/file-viewer/bin/extension-stats.ts new file mode 100644 index 0000000..46cbf87 --- /dev/null +++ b/src/file-viewer/bin/extension-stats.ts @@ -0,0 +1,83 @@ +import * as path from "node:path"; +import { cache, MediaFile } from "../db"; + +// Function to get file extension statistics +function getExtensionStats() { + // Get all files (not directories) from the database + const query = ` + SELECT path FROM media_files + WHERE kind = ${MediaFile.Kind.file} + `; + + // Use raw query to get all file paths + const rows = cache.query(query).all() as { path: string }[]; + + // Count extensions + const extensionCounts: Record = {}; + + for (const row of rows) { + const extension = path.extname(row.path).toLowerCase(); + extensionCounts[extension] = (extensionCounts[extension] || 0) + 1; + } + + // Sort extensions by count (descending) + const sortedExtensions = Object.entries(extensionCounts) + .sort((a, b) => b[1] - a[1]); + + return { + totalFiles: rows.length, + extensions: sortedExtensions, + }; +} + +// Function to print a visual table +function printExtensionTable() { + const stats = getExtensionStats(); + + // Calculate column widths + const extensionColWidth = Math.max( + ...stats.extensions.map(([ext]) => ext.length), + "Extension".length, + ) + 2; + + const countColWidth = Math.max( + ...stats.extensions.map(([_, count]) => count.toString().length), + "Count".length, + ) + 2; + + const percentColWidth = "Percentage".length + 2; + + // Print header + console.log("MediaFile Extension Statistics"); + console.log(`Total files: ${stats.totalFiles}`); + console.log(); + + // Print table header + console.log( + "Extension".padEnd(extensionColWidth) + + "Count".padEnd(countColWidth) + + "Percentage".padEnd(percentColWidth), + ); + + // Print separator + console.log( + "-".repeat(extensionColWidth) + + "-".repeat(countColWidth) + + "-".repeat(percentColWidth), + ); + + // Print rows + for (const [extension, count] of stats.extensions) { + const percentage = ((count / stats.totalFiles) * 100).toFixed(2); + const ext = extension || "(no extension)"; + + console.log( + ext.padEnd(extensionColWidth) + + count.toString().padEnd(countColWidth) + + `${percentage}%`.padEnd(percentColWidth), + ); + } +} + +// Run the program +printExtensionTable(); diff --git a/src/file-viewer/bin/scan.ts b/src/file-viewer/bin/scan.ts new file mode 100644 index 0000000..1e19e74 --- /dev/null +++ b/src/file-viewer/bin/scan.ts @@ -0,0 +1,1015 @@ +// This file was started by AI and maintained by hand since. +import "@paperclover/console/inject"; +import { Progress } from "@paperclover/console/Progress"; +import { Spinner } from "@paperclover/console/Spinner"; +import assert from "node:assert"; +import { execFile } from "node:child_process"; +import { existsSync, Stats } from "node:fs"; +import * as fsp from "node:fs/promises"; +import * as path from "node:path"; +import { promisify } from "node:util"; +import { BlobAsset, cache, FilePermissions, MediaFile } from "../db.ts"; +import { formatDate, formatSize } from "./share.ts"; +import { highlightCode, type Language } from "./highlight.ts"; + +const execFileAsync = promisify(execFile); + +// Configuration +const FILE_ROOT = process.env.SCAN_FILE_ROOT; +if (!FILE_ROOT) { + throw new Error( + "FILE_ROOT environment variable not set (e.g. '/path/to/files')", + ); +} +const LOCAL_DIR = path.resolve(FILE_ROOT); +const DRY_RUN = process.argv.includes("--dry-run"); +const SHOULD_COMPRESS = true; +const VERBOSE = process.argv.includes("--verbose"); +const SHOULD_SCRUB = true; +const COMPRESS_STORE = process.env.COMPRESS_STORE || + path.join(process.cwd(), ".clover/compressed"); + +// Helper function for logging that respects verbose flag +function log(message: string, always = false): void { + if (always || VERBOSE) { + console.log(message); + } +} + +// File extensions that need duration metadata +const MEDIA_EXTENSIONS = new Set([ + ".mp4", + ".mkv", + ".webm", + ".avi", + ".mov", + ".mp3", + ".flac", + ".wav", + ".ogg", + ".m4a", +]); + +// File extensions that need dimension metadata +const IMAGE_EXTENSIONS = new Set([ + ".jpg", + ".jpeg", + ".png", + ".gif", + ".webp", + ".avif", + ".heic", + ".svg", +]); + +const VIDEO_EXTENSIONS = new Set([".mp4", ".mkv", ".webm", ".avi", ".mov"]); + +// File extensions that need metadata scrubbing +const SCRUB_EXTENSIONS = new Set([ + ".jpg", + ".jpeg", + ".png", + ".mov", + ".mp4", + ".m4a", +]); + +const CODE_EXTENSIONS: Record = { + ".json": "json", + ".toml": "toml", + ".ts": "ts", + ".js": "ts", + ".tsx": "tsx", + ".jsx": "tsx", + ".css": "css", + ".py": "python", + ".lua": "lua", + ".sh": "shell", + ".bat": "dosbatch", + ".ps1": "powershell", + ".cmd": "dosbatch", + ".yaml": "yaml", + ".yml": "yaml", + ".zig": "zig", + ".astro": "astro", + ".mdx": "mdx", + ".xml": "xml", + ".jsonc": "json", + ".php": "php", + ".patch": "diff", + ".diff": "diff", +}; + +const READ_CONTENTS_EXTENSIONS = new Set([".txt", ".chat"]); + +// For files that have changed indexing logic, update the date here rescanning +// will reconstruct the entire file object. This way you can incrementally +// update new file types without having to reindex everything. +const lastUpdateTypes: Record = {}; +lastUpdateTypes[".lnk"] = new Date("2025-05-13 13:58:00"); +for (const ext in CODE_EXTENSIONS) { + lastUpdateTypes[ext] = new Date("2025-05-13 13:58:00"); +} +for (const ext of READ_CONTENTS_EXTENSIONS) { + lastUpdateTypes[ext] = new Date("2025-05-13 13:58:00"); +} +lastUpdateTypes[".diff"] = new Date("2025-05-18 13:58:00"); +lastUpdateTypes[".patch"] = new Date("2025-05-18 13:58:00"); + +// Helper functions for metadata extraction +async function calculateHash(filePath: string): Promise { + try { + const hash = await execFileAsync("sha1sum", [filePath]); + return hash.stdout.split(" ")[0]; + } catch (error) { + console.error(`Error calculating hash for ${filePath}:`, error); + throw error; + } +} + +async function calculateDuration(filePath: string): Promise { + try { + const ext = path.extname(filePath).toLowerCase(); + if (!MEDIA_EXTENSIONS.has(ext)) return 0; + + const { stdout } = await execFileAsync("ffprobe", [ + "-v", + "error", + "-show_entries", + "format=duration", + "-of", + "default=noprint_wrappers=1:nokey=1", + filePath, + ]); + return Math.ceil(parseFloat(stdout.trim())); + } catch (error) { + console.error(`Error calculating duration for ${filePath}:`, error); + return 0; // Return 0 for duration on error + } +} + +async function calculateDimensions(filePath: string): Promise { + const ext = path.extname(filePath).toLowerCase(); + if (!IMAGE_EXTENSIONS.has(ext) && !VIDEO_EXTENSIONS.has(ext)) return ""; + + try { + if (ext === ".svg") { + // For SVG files, parse the file and extract width/height + const content = await fsp.readFile(filePath, "utf8"); + const widthMatch = content.match(/width="(\d+)"/); + const heightMatch = content.match(/height="(\d+)"/); + + if (widthMatch && heightMatch) { + return `${widthMatch[1]}x${heightMatch[1]}`; + } + } else if (IMAGE_EXTENSIONS.has(ext) || VIDEO_EXTENSIONS.has(ext)) { + // Use ffprobe for images and videos + const { stdout } = await execFileAsync("ffprobe", [ + "-v", + "error", + "-select_streams", + "v:0", + "-show_entries", + "stream=width,height", + "-of", + "csv=s=x:p=0", + filePath, + ]); + return stdout.trim(); + } + } catch (error) { + console.error(`Error calculating dimensions for ${filePath}:`, error); + } + + return ""; +} + +// Helper function to check and remove location metadata +async function scrubLocationMetadata( + filePath: string, + stats: Stats, +): Promise { + try { + const ext = path.extname(filePath).toLowerCase(); + if (!SCRUB_EXTENSIONS.has(ext)) return false; + + let hasLocation = false; + let args: string[] = []; + + // Check for location metadata based on file type + const tempOutput = path.join( + path.dirname(filePath), + `.tmp.${path.basename(filePath)}`, + ); + switch (ext) { + case ".jpg": + case ".jpeg": + case ".png": + // Check for GPS tags in EXIF + const { stdout: gpsCheck } = await execFileAsync("exiftool", [ + "-gps:all", + filePath, + ]); + hasLocation = gpsCheck.trim().length > 0; + args = ["-gps:all=", filePath, "-o", tempOutput]; + break; + case ".mov": + case ".mp4": + // Check for GPS metadata in video files + const { stdout: videoCheck } = await execFileAsync("exiftool", [ + "-ee", + "-G3", + "-s", + filePath, + ]); + hasLocation = videoCheck.includes("GPS") || + videoCheck.includes("Location"); + args = ["-gps:all=", "-xmp:all=", filePath, "-o", tempOutput]; + break; + case ".m4a": + // Check for location and other metadata in m4a files + const { stdout: m4aCheck } = await execFileAsync("exiftool", [ + "-ee", + "-G3", + "-s", + filePath, + ]); + hasLocation = m4aCheck.includes("GPS") || + m4aCheck.includes("Location") || + m4aCheck.includes("Filename") || + m4aCheck.includes("Title"); + + if (hasLocation) { + args = [ + "-gps:all=", + "-location:all=", + "-filename:all=", + "-title=", + "-m4a:all=", + filePath, + "-o", + tempOutput, + ]; + } + break; + } + + const accessTime = stats.atime; + const modTime = stats.mtime; + + let backup: string | null = null; + try { + if (hasLocation) { + if (DRY_RUN) return true; + + // Prepare a backup + const tmp = path.join( + path.dirname(filePath), + `.tmp.backup.${path.basename(filePath)}`, + ); + await fsp.copyFile(filePath, tmp); + await fsp.utimes(tmp, accessTime, modTime); + backup = tmp; + + // Remove metadata + await execFileAsync("exiftool", args); + if (!existsSync(tempOutput)) { + throw new Error(`Failed to create output file: ${tempOutput}`); + } + + // Restore original timestamps + await fsp.rename(tempOutput, filePath); + await fsp.utimes(filePath, accessTime, modTime); + + // Backup is no longer needed + await fsp.unlink(backup); + + log( + `Scrubbed location metadata in ${path.relative(LOCAL_DIR, filePath)}`, + true, + ); + return true; + } + } catch (error) { + if (backup) { + await fsp.rename(backup, filePath); + } + if (existsSync(tempOutput)) { + await fsp.unlink(tempOutput); + } + throw error; + } + } catch (error) { + console.error(`Error scrubbing metadata for ${filePath}:`, error); + } + + return false; +} + +// Queue implementation for parallel processing +type AsyncQueueProcessor = (s: Spinner, item: T) => Promise; +class AsyncQueue { + private queue: T[] = []; + private running = 0; + private maxConcurrent: number; + private processed = 0; + private progress?: Progress<{ active: Spinner[] }>; + private name: string; + private estimate?: number; + + constructor(name: string, maxConcurrent: number) { + this.maxConcurrent = maxConcurrent; + this.name = name; + } + + setEstimate(estimate: number) { + this.estimate = estimate; + if (this.progress) { + this.progress.total = Math.max( + this.processed + this.queue.length, + estimate, + ); + } + } + + getProgress() { + if (!this.progress) { + this.progress = new Progress({ + spinner: null, + text: ({ active }) => { + const now = performance.now(); + let text = `[${this.processed}/${ + this.processed + this.queue.length + }] ${this.name}`; + let n = 0; + for (const item of active) { + let itemText = "- " + item.format(now); + text += `\n` + + itemText.slice(0, Math.max(0, process.stdout.columns - 1)); + if (n > 10) { + text += `\n ... + ${active.length - n} more`; + break; + } + n++; + } + return text; + }, + props: { + active: [] as Spinner[], + }, + }); + this.progress.total = this.estimate ?? 0; + this.progress.value = 0; + this.progress.fps = 30; + } + return this.progress; + } + + async add(item: T, processor: AsyncQueueProcessor): Promise { + this.queue.push(item); + this.getProgress().total = Math.max( + this.processed + this.queue.length, + this.estimate ?? 0, + ); + return this.processNext(processor); + } + + async addBatch(items: T[], processor: AsyncQueueProcessor): Promise { + this.queue.push(...items); + this.getProgress().total = Math.max( + this.processed + this.queue.length, + this.estimate ?? 0, + ); + return this.processNext(processor); + } + + private async processNext(processor: AsyncQueueProcessor): Promise { + if (this.running >= this.maxConcurrent || this.queue.length === 0) { + return; + } + + const item = this.queue.shift(); + if (!item) return; + + this.running++; + + try { + const progress = this.getProgress(); + + let itemText = ""; + if (typeof item === "string") { + itemText = item; + } else if (typeof item === "object" && item !== null && "path" in item) { + itemText = "" + item.path; + } else { + itemText = JSON.stringify(item); + } + if (itemText.startsWith(LOCAL_DIR)) { + itemText = path.relative(LOCAL_DIR, itemText); + } + + const spinner = new Spinner(itemText); + spinner.stop(); + progress.props.active.unshift(spinner); + await processor(spinner, item); + progress.props = { + active: progress.props.active.filter((s) => s !== spinner), + }; + this.processed++; + progress.value = this.processed; + } catch (error) { + console.error(`Error processing ${this.name} queue item:`, error); + this.processed++; + this.getProgress().value = this.processed; + } finally { + this.running--; + await this.processNext(processor); + } + } + + async waitForCompletion(): Promise { + if (this.queue.length === 0 && this.running === 0) { + if (this.processed > 0) { + this.#success(); + } + return; + } + + return new Promise((resolve) => { + const checkInterval = setInterval(() => { + if (this.queue.length === 0 && this.running === 0) { + clearInterval(checkInterval); + this.#success(); + resolve(); + } + }, 100); + }); + } + + #success() { + this.getProgress().success(`${this.processed} ${this.name}`); + } +} + +function skipBasename(basename: string): boolean { + // dot files must be incrementally tracked + if (basename === ".dirsort") return true; + if (basename === ".friends") return true; + + return ( + basename.startsWith(".") || + basename.startsWith("._") || + basename.startsWith(".tmp") || + basename === ".DS_Store" || + basename.toLowerCase() === "thumbs.db" || + basename.toLowerCase() === "desktop.ini" + ); +} + +// File system scanner +class FileSystemScanner { + private visitedPaths = new Set(); + private previousPaths = new Set(); + private dirQueue = new AsyncQueue("Scan Directories", 10); + private fileQueue = new AsyncQueue<{ path: string; stat: any }>( + "File metadata", + 20, + ); + private compressQueue: AsyncQueue<{ file: MediaFile; path: string }> | null = + SHOULD_COMPRESS ? new AsyncQueue("Compress Assets", 10) : null; + + private getDbPath(localPath: string): string { + // Convert local file system path to database path + const relativePath = path.relative(LOCAL_DIR, localPath); + return "/" + relativePath.split(path.sep).join(path.posix.sep); + } + + private getLocalPath(dbPath: string): string { + // Convert database path to local file system path + return path.join(LOCAL_DIR, dbPath.slice(1)); + } + + async scanFile(s: Spinner, filePath: string, stat: any): Promise { + const dbPath = this.getDbPath(filePath); + + // Skip hidden files + const basename = path.basename(filePath); + if (skipBasename(basename)) { + return; + } + + this.visitedPaths.add(dbPath); + + // Get existing file info from db + const existingFile = MediaFile.getByPath(dbPath); + + // Determine which date to use (for date protection) + let dateToUse = stat.mtime; + const year2025Start = new Date("2025-01-01T00:00:00Z"); + + if ( + existingFile && + existingFile.date < year2025Start && + stat.mtime >= year2025Start + ) { + console.error( + `Error: ${dbPath} is ${ + formatDate( + existingFile.date, + ) + }, got modified to ${formatDate(stat.mtime)}`, + ); + dateToUse = existingFile.date; + } + + // Check if we need to reprocess the file + if (existingFile && existingFile.size === stat.size && existingFile.hash) { + maybe_skip: { + const lastUpdateDate = lastUpdateTypes[path.extname(filePath)]; + if (lastUpdateDate && existingFile.lastUpdateDate < lastUpdateDate) { + console.log( + `Reprocessing ${dbPath} because indexing logic changed after ${ + formatDate( + lastUpdateDate, + ) + }`, + ); + break maybe_skip; + } + + if (SHOULD_COMPRESS && existingFile.processed !== 2) { + this.compressQueue!.add( + { file: existingFile, path: dbPath }, + this.compressFile.bind(this), + ); + } + + // File hasn't changed, no need to reprocess + MediaFile.createFile({ + path: dbPath, + date: dateToUse, + hash: existingFile.hash, + size: stat.size, + duration: existingFile.duration, + dimensions: existingFile.dimensions, + content: existingFile.contents, + }); + return; + } + } + + // Process the file + log(`Processing file: ${dbPath}`); + + // Scrub location metadata if needed + if (SHOULD_SCRUB) { + if (await scrubLocationMetadata(filePath, stat)) { + // Re-stat the file in case it was modified + const newStat = await fsp.stat(filePath); + stat.size = newStat.size; + } + } + + // Extract content + const hash = await calculateHash(filePath); + let content = ""; + if (filePath.endsWith(".lnk")) { + content = (await fsp.readFile(filePath, "utf8")).trim(); + } + const language = CODE_EXTENSIONS[path.extname(filePath)]; + if (language) { + read_code: { + // An issue is that .ts is an overloaded extension, shared between + // 'transport stream' and 'typescript'. + // + // Filter used here is: + // - more than 1mb + // - invalid UTF-8 + if (stat.size > 1_000_000) break read_code; + let code; + const buf = await fsp.readFile(filePath); + try { + code = new TextDecoder("utf-8", { fatal: true }).decode(buf); + } catch (error) { + break read_code; + } + content = await highlightCode(code, language); + } + } + if (!content && READ_CONTENTS_EXTENSIONS.has(path.extname(filePath))) { + content = await fsp.readFile(filePath, "utf8"); + } + // End extract content + + if (hash === existingFile?.hash) { + MediaFile.createFile({ + path: dbPath, + date: dateToUse, + hash, + size: stat.size, + duration: existingFile.duration, + dimensions: existingFile.dimensions, + content, + }); + return; + } else if (existingFile) { + if (existingFile.processed === 2) { + if (BlobAsset.decrementOrDelete(existingFile.hash)) { + log( + `Deleted compressed asset ${existingFile.hash}.{gzip, zstd}`, + true, + ); + await fsp.unlink( + path.join( + COMPRESS_STORE, + existingFile.hash.substring(0, 2), + existingFile.hash + ".gz", + ), + ); + await fsp.unlink( + path.join( + COMPRESS_STORE, + existingFile.hash.substring(0, 2), + existingFile.hash + ".zstd", + ), + ); + } + } + } + const [duration, dimensions] = await Promise.all([ + calculateDuration(filePath), + calculateDimensions(filePath), + ]); + + // Update database with all metadata + MediaFile.createFile({ + path: dbPath, + date: dateToUse, + hash, + size: stat.size, + duration, + dimensions, + content, + }); + + if (SHOULD_COMPRESS) { + this.compressQueue!.add( + { + file: MediaFile.getByPath(dbPath)!, + path: dbPath, + }, + this.compressFile.bind(this), + ); + } + } + + async compressFile(s: Spinner, { file }: { file: MediaFile }): Promise { + log(`Compressing file: ${file.path}`); + if (DRY_RUN) return; + + const filePath = path.join(FILE_ROOT!, file.path); + + const hash = file.hash; + const firstTwoChars = hash.substring(0, 2); + const compressDir = `${COMPRESS_STORE}/${firstTwoChars}`; + const compressPath = `${compressDir}/${hash}`; + + // Create directory structure if it doesn't exist + await fsp.mkdir(compressDir, { recursive: true }); + + // Compress the file with gzip + const blob = BlobAsset.putOrIncrement(hash); + if (blob.refs > 1) { + log( + `Skipping compression of ${filePath} because it already exists in ${compressPath}`, + ); + return; + } + // Check if already exists + if (existsSync(compressPath + ".gz")) { + file.setCompressed(true); + return; + } + try { + const gzipProcess = Bun.spawn(["gzip", "-c", filePath, "-9"], { + stdout: Bun.file(compressPath + ".gz"), + }); + const zstdProcess = Bun.spawn(["zstd", "-c", filePath, "-9"], { + stdout: Bun.file(compressPath + ".zstd"), + }); + const [gzipExited, zstdExited] = await Promise.all([ + gzipProcess.exited, + zstdProcess.exited, + ]); + assert(gzipExited === 0); + assert(zstdExited === 0); + assert(existsSync(compressPath + ".gz")); + assert(existsSync(compressPath + ".zstd")); + file.setCompressed(true); + } catch (error) { + console.error(`Error compressing file ${filePath}:`, error); + BlobAsset.decrementOrDelete(hash); + file.setCompressed(false); + } + } + + async scanDirectory(s: Spinner, dirPath: string): Promise { + const dbPath = this.getDbPath(dirPath); + + this.visitedPaths.add(dbPath); + + // Create or update directory entry + log(`Scanning directory: ${dbPath}`); + if (!DRY_RUN) { + MediaFile.createOrUpdateDirectory(dbPath); + } + + try { + const entries = await fsp.readdir(dirPath, { withFileTypes: true }); + + // Process files and subdirectories + for (const entry of entries) { + const entryPath = path.join(dirPath, entry.name); + + // Skip hidden files and system files + if (skipBasename(entry.name)) { + continue; + } + + if (entry.isDirectory()) { + // Queue subdirectory for scanning + this.dirQueue.add(entryPath, this.scanDirectory.bind(this)); + } else if (entry.isFile()) { + // Queue file for processing + const stat = await fsp.stat(entryPath); + + this.fileQueue.add( + { path: entryPath, stat }, + async (s, item) => await this.scanFile(s, item.path, item.stat), + ); + } + } + } catch (error) { + console.error(`Error scanning directory ${dirPath}:`, error); + } + } + + async processDirectoryMetadata(dirPath: string): Promise { + const dbPath = this.getDbPath(dirPath); + const dir = MediaFile.getByPath(dbPath); + + if (!dir || dir.kind !== MediaFile.Kind.directory) { + return; + } + + if (DRY_RUN) return; + + const children = dir.getChildren(); + + // Calculate directory metadata + let totalSize = 0; + let newestDate = new Date(0); + let allHashes = ""; + + // Check for readme.txt + let readmeContent = ""; + + try { + readmeContent = await fsp.readFile( + path.join(dirPath, "readme.txt"), + "utf8", + ); + } catch (error: any) { + console.info(`no readme ${dirPath}`); + if (error.code !== "ENOENT") { + console.error(`Error reading readme.txt in ${dirPath}:`, error); + } + } + + let dirsort: string[] | null = null; + try { + dirsort = (await fsp.readFile(path.join(dirPath, ".dirsort"), "utf8")) + .split("\n") + .map((x) => x.trim()) + .filter(Boolean); + } catch (error: any) { + if (error.code !== "ENOENT") { + console.error(`Error reading .dirsort in ${dirPath}:`, error); + } + } + + if (await fsp.exists(path.join(dirPath, ".friends"))) { + FilePermissions.setPermissions(dbPath, 1); + } else { + FilePermissions.setPermissions(dbPath, 0); + } + + // Process children + for (const child of children) { + totalSize += child.size; + allHashes += child.hash; + + // Update newest date, ignoring readme.txt + if (!child.path.endsWith("/readme.txt") && child.date > newestDate) { + newestDate = child.date; + } + } + + // Create a hash for the directory + const dirHash = new Bun.CryptoHasher("sha1") + .update(dbPath + allHashes) + .digest("hex"); + + // Update directory metadata + MediaFile.markDirectoryProcessed({ + id: dir.id, + timestamp: newestDate, + contents: readmeContent, + size: totalSize, + hash: dirHash, + dirsort, + }); + } + + async findDeletedFiles(): Promise { + if (DRY_RUN) return; + + // Find all paths that exist in the DB but not in the filesystem + const deletedPaths = Array.from(this.previousPaths).filter( + (path) => !this.visitedPaths.has(path), + ); + + for (const dbPath of deletedPaths) { + const file = MediaFile.getByPath(dbPath); + if (!file) continue; + + log(`Item Deleted: ${dbPath}`, true); + if (file.processed === 2) { + if (BlobAsset.decrementOrDelete(file.hash)) { + log(`Deleted compressed asset ${file.hash}.{gzip, zstd}`, true); + await fsp.unlink( + path.join( + COMPRESS_STORE, + file.hash.substring(0, 2), + file.hash + ".gz", + ), + ); + await fsp.unlink( + path.join( + COMPRESS_STORE, + file.hash.substring(0, 2), + file.hash + ".zstd", + ), + ); + } + } + MediaFile.deleteByPath(dbPath); + } + } + + async loadPreviousPaths(): Promise { + // Get all files and directories from the database + // This uses a custom query to get all paths at once + const getAllPathsQuery = cache + .prepare(`SELECT path, kind FROM media_files`) + .all() as { + path: string; + kind: MediaFile.Kind; + }[]; + + let dirs = 0; + let files = 0; + for (const row of getAllPathsQuery) { + this.previousPaths.add(row.path); + if (row.kind === MediaFile.Kind.directory) { + dirs++; + } else { + files++; + } + } + + this.dirQueue.setEstimate(dirs); + this.fileQueue.setEstimate(files); + + // log(`Loaded ${this.previousPaths.size} paths from database`, true); + } + + async scan(): Promise { + log(`Starting file system scan in ${LOCAL_DIR}`, true); + + // Check if the root directory exists and is accessible + try { + const rootStat = await fsp.stat(LOCAL_DIR); + if (!rootStat.isDirectory()) { + throw new Error(`${LOCAL_DIR} is not a directory`); + } + } catch (error) { + console.error(`Error: Cannot access root directory ${LOCAL_DIR}`, error); + console.error( + `Aborting scan to prevent database corruption. Please check if the volume is mounted.`, + ); + process.exit(1); + } + + await this.loadPreviousPaths(); + + await this.dirQueue.add(LOCAL_DIR, this.scanDirectory.bind(this)); + + await this.dirQueue.waitForCompletion(); + await this.fileQueue.waitForCompletion(); + + await this.findDeletedFiles(); + + const allDirs = Array.from(this.visitedPaths) + .filter((path) => { + const file = MediaFile.getByPath(path); + return file && file.kind === MediaFile.Kind.directory; + }) + .sort((a, b) => b.length - a.length); + + const dirMetadataQueue = new AsyncQueue("Directory Metadata", 10); + for (const dirPath of allDirs) { + await this.processDirectoryMetadata(this.getLocalPath(dirPath)); + } + + await dirMetadataQueue.waitForCompletion(); + + if (SHOULD_COMPRESS) { + await this.compressQueue!.waitForCompletion(); + } + + log("Scan completed successfully!", true); + } +} + +// Main execution +function showHelp() { + console.log(` +MediaFile Scanner - Index filesystem content for paperclover.net + +Environment variables: + FILE_ROOT Required. Path to the directory to scan + COMPRESS_STORE Optional. Path to store compressed files (default: .clover/compressed) + +Options: + --help Show this help message + --dry-run Don't make any changes to the database + --verbose Show detailed output + +Usage: + bun ./media/scan.ts [options] + +`); + process.exit(0); +} + +{ + // Show help if requested + if (process.argv.includes("--help")) { + showHelp(); + process.exit(0); + } + + // Check if the root directory exists before starting + if (!existsSync(LOCAL_DIR)) { + console.error( + `Error: Root directory ${LOCAL_DIR} does not exist or is not accessible.`, + ); + console.error(`Please check if the volume is mounted correctly.`); + process.exit(1); + } + + const startTime = Date.now(); + + try { + const scanner = new FileSystemScanner(); + await scanner.scan(); + + const endTime = Date.now(); + log(`Scan completed in ${(endTime - startTime) / 1000} seconds`, true); + + const rootDir = MediaFile.getByPath("/")!; + const totalEntries = cache + .prepare(`SELECT COUNT(*) as count FROM media_files`) + .get() as { count: number }; + const totalDuration = cache + .prepare(`SELECT SUM(duration) as duration FROM media_files`) + .get() as { duration: number }; + console.log(); + console.log("Global Stats"); + console.log(` Entry count: ${totalEntries.count}`); + console.log(` Uncompressed size: ${formatSize(rootDir.size)}`); + console.log( + ` Total audio/video duration: ${ + ( + totalDuration.duration / + 60 / + 60 + ).toFixed(1) + } hours`, + ); + } catch (error) { + console.error("Error during scan:", error); + process.exit(1); + } +} diff --git a/src/file-viewer/cache.ts b/src/file-viewer/cache.ts new file mode 100644 index 0000000..c2865a8 --- /dev/null +++ b/src/file-viewer/cache.ts @@ -0,0 +1,418 @@ +import { Agent, get } from "node:https"; +import * as fs from "node:fs"; +import * as path from "node:path"; +import { Buffer } from "node:buffer"; +import type { ClientRequest } from "node:http"; +import { LRUCache } from "lru-cache"; +import { open } from "node:fs/promises"; +import { createHash } from "node:crypto"; +import { scoped } from "@paperclover/console"; +import { escapeUri } from "./share.ts"; + +declare const Deno: any; + +const sourceOfTruth = "https://nas.paperclover.net:43250"; +const caCert = fs.readFileSync(path.join(import.meta.dirname, "cert.pem")); + +const diskCacheRoot = path.join(import.meta.dirname, "../.clover/filecache/"); +const diskCacheMaxSize = 14 * 1024 * 1024 * 1024; // 14GB +const ramCacheMaxSize = 1 * 1024 * 1024 * 1024; // 1.5GB +const loadInProgress = new Map< + string, + Promise<{ stream: ReadableStream }> | { stream: ReadableStream } +>(); +// Disk cache serializes the access times +const diskCacheState: Record = + loadDiskCacheState(); +const diskCache = new LRUCache({ + maxSize: diskCacheMaxSize, + ttl: 0, + sizeCalculation: (value) => value, + dispose: (_, key) => { + delete diskCacheState[key]; + }, + onInsert: (size, key) => { + diskCacheState[key] = [size, Date.now()]; + }, +}); +const ramCache = new LRUCache({ + maxSize: ramCacheMaxSize, + ttl: 0, + sizeCalculation: (value) => value.byteLength, +}); +let diskCacheFlush: NodeJS.Timeout | undefined; + +{ + // Initialize the disk cache by validating all files exist, and then + // inserting them in last to start order. State is repaired pessimistically. + const toDelete = new Set(Object.keys(diskCacheState)); + fs.mkdirSync(diskCacheRoot, { recursive: true }); + for ( + const file of fs.readdirSync(diskCacheRoot, { + recursive: true, + encoding: "utf-8", + }) + ) { + const key = file.split("/").pop()!; + if (key.length !== 40) continue; + const entry = diskCacheState[key]; + if (!entry) { + fs.rmSync(path.join(diskCacheRoot, file), { + recursive: true, + force: true, + }); + delete diskCacheState[key]; + continue; + } + toDelete.delete(key); + } + for (const key of toDelete) { + delete diskCacheState[key]; + } + saveDiskCacheState(); + const sorted = Object.keys(diskCacheState).sort((a, b) => + diskCacheState[b][1] - diskCacheState[a][1] + ); + for (const key of sorted) { + diskCache.set(key, diskCacheState[key][0]); + } +} + +export type CacheSource = "ram" | "disk" | "miss" | "lan" | "flight"; +export type CompressionFormat = "gzip" | "zstd" | "raw"; +const compressionFormatMap = { + gzip: "gz", + zstd: "zstd", + raw: "file", +} as const; + +const log = scoped("file_cache"); + +const lanMount = "/Volumes/clover/Published"; +const hasLanMount = fs.existsSync(lanMount); + +/** + * Fetches a file with the given compression format. + * Uncompressed files are never persisted to disk. + * + * Returns a promise to either: + * - Buffer: the data is from RAM cache + * - ReadableStream: the data is being streamed in from disk/server + * + * Additionally, returns a string indicating the source of the data, for debugging. + * + * Callers must be able to consume both output types. + */ +export async function fetchFile( + pathname: string, + format: CompressionFormat = "raw", +): Promise< + [Buffer | ReadableStream, encoding: CompressionFormat, src: CacheSource] +> { + // 1. Ram cache + const cacheKey = hashKey(`${pathname}:${format}`); + const ramCacheHit = ramCache.get(cacheKey); + if (ramCacheHit) { + log(`ram hit: ${format}${pathname}`); + return [ramCacheHit, format, "ram"]; + } + + // 2. Tee an existing loading stream. + const inProgress = loadInProgress.get(cacheKey); + if (inProgress) { + const stream = await inProgress; + const [stream1, stream2] = stream.stream.tee(); + loadInProgress.set(cacheKey, { stream: stream2 }); + log(`in-flight copy: ${format}${pathname}`); + return [stream1, format, "flight"]; + } + + // 3. Disk cache + Load into ram cache. + if (format !== "raw") { + const diskCacheHit = diskCache.get(cacheKey); + if (diskCacheHit) { + diskCacheState[cacheKey] = [diskCacheHit, Date.now()]; + saveDiskCacheStateLater(); + log(`disk hit: ${format}/${pathname}`); + return [ + startInProgress( + cacheKey, + new ReadableStream({ + start: async (controller) => { + const stream = fs.createReadStream( + path.join(diskCacheRoot, cacheKey), + ); + const chunks: Buffer[] = []; + stream.on("data", (chunk) => { + controller.enqueue(chunk); + chunks.push(chunk as Buffer); + }); + stream.on("end", () => { + controller.close(); + ramCache.set(cacheKey, Buffer.concat(chunks)); + finishInProgress(cacheKey); + }); + stream.on("error", (error) => { + controller.error(error); + }); + }, + }), + ), + format, + "disk", + ]; + } + } + + // 4. Lan Mount (access files that prod may not have) + if (hasLanMount) { + log(`lan hit: ${format}/${pathname}`); + return [ + startInProgress( + cacheKey, + new ReadableStream({ + start: async (controller) => { + const stream = fs.createReadStream( + path.join(lanMount, pathname), + ); + const chunks: Buffer[] = []; + stream.on("data", (chunk) => { + controller.enqueue(chunk); + chunks.push(chunk as Buffer); + }); + stream.on("end", () => { + controller.close(); + ramCache.set(cacheKey, Buffer.concat(chunks)); + finishInProgress(cacheKey); + }); + stream.on("error", (error) => { + controller.error(error); + }); + }, + }), + ), + "raw", + "lan", + ]; + } + + // 4. Fetch from server + const url = `${compressionFormatMap[format]}${escapeUri(pathname)}`; + log(`miss: ${format}${pathname}`); + const response = await startInProgress(cacheKey, fetchFileUncached(url)); + const [stream1, stream2] = response.tee(); + handleDownload(cacheKey, format, stream2); + return [stream1, format, "miss"]; +} + +export async function prefetchFile( + pathname: string, + format: CompressionFormat = "zstd", +) { + const cacheKey = hashKey(`${pathname}:${format}`); + const ramCacheHit = ramCache.get(cacheKey); + if (ramCacheHit) { + return; + } + if (hasLanMount) return; + const url = `${compressionFormatMap[format]}${pathname}`; + log(`prefetch: ${format}${pathname}`); + const stream2 = await startInProgress(cacheKey, fetchFileUncached(url)); + handleDownload(cacheKey, format, stream2); +} + +async function handleDownload( + cacheKey: string, + format: CompressionFormat, + stream2: ReadableStream, +) { + let chunks: Buffer[] = []; + if (format !== "raw") { + const file = await open(path.join(diskCacheRoot, cacheKey), "w"); + try { + for await (const chunk of stream2) { + await file.write(chunk); + chunks.push(chunk); + } + } finally { + file.close(); + } + } else { + for await (const chunk of stream2) { + chunks.push(chunk); + } + } + const final = Buffer.concat(chunks); + chunks.length = 0; + ramCache.set(cacheKey, final); + if (format !== "raw") { + diskCache.set(cacheKey, final.byteLength); + } + finishInProgress(cacheKey); +} + +function hashKey(key: string): string { + return createHash("sha1").update(key).digest("hex"); +} + +function startInProgress | ReadableStream>( + cacheKey: string, + promise: T, +): T { + if (promise instanceof Promise) { + let resolve2: (stream: { stream: ReadableStream }) => void; + let reject2: (error: Error) => void; + const stream2Promise = new Promise<{ stream: ReadableStream }>( + (resolve, reject) => { + resolve2 = resolve; + reject2 = reject; + }, + ); + const stream1Promise = new Promise((resolve, reject) => { + promise.then((stream) => { + const [stream1, stream2] = stream.tee(); + const stream2Obj = { stream: stream2 }; + resolve2(stream2Obj); + loadInProgress.set(cacheKey, stream2Obj); + resolve(stream1); + }, reject); + }); + loadInProgress.set(cacheKey, stream2Promise); + return stream1Promise as T; + } else { + const [stream1, stream2] = promise.tee(); + loadInProgress.set(cacheKey, { stream: stream2 }); + return stream1 as T; + } +} + +function loadDiskCacheState(): Record< + string, + [size: number, lastAccess: number] +> { + try { + const state = JSON.parse( + fs.readFileSync(path.join(diskCacheRoot, "state.json"), "utf-8"), + ); + return state; + } catch (error) { + return {}; + } +} + +function saveDiskCacheStateLater() { + if (diskCacheFlush) { + return; + } + diskCacheFlush = setTimeout(() => { + saveDiskCacheState(); + }, 60_000) as NodeJS.Timeout; + if (diskCacheFlush.unref) { + diskCacheFlush.unref(); + } +} + +process.on("exit", () => { + saveDiskCacheState(); +}); + +function saveDiskCacheState() { + fs.writeFileSync( + path.join(diskCacheRoot, "state.json"), + JSON.stringify(diskCacheState), + ); +} + +function finishInProgress(cacheKey: string) { + loadInProgress.delete(cacheKey); +} + +// Self signed certificate must be trusted to be able to request the above URL. +// +// Unfortunately, Bun and Deno are both not node.js compatible, so those two +// runtimes need fallback implementations. The fallback implementations calls +// fetch with the `agent` value as the RequestInit. Since `fetch` decompresses +// the body for you, it must be disabled. +const agent: any = typeof Bun !== "undefined" + ? { + // Bun has two non-standard fetch extensions + decompress: false, + tls: { + ca: caCert, + }, + } + // TODO: https://github.com/denoland/deno/issues/12291 + // : typeof Deno !== "undefined" + // ? { + // // Deno configures through the non-standard `client` extension + // client: Deno.createHttpClient({ + // caCerts: [caCert.toString()], + // }), + // } + // Node.js supports node:http + : new Agent({ + ca: caCert, + }); + +function fetchFileNode(pathname: string): Promise { + return new Promise((resolve, reject) => { + const request: ClientRequest = get(`${sourceOfTruth}/${pathname}`, { + agent, + }); + request.on("response", (response) => { + if (response.statusCode !== 200) { + reject(new Error(`Failed to fetch ${pathname}`)); + return; + } + + const stream = new ReadableStream({ + start(controller) { + response.on("data", (chunk) => { + controller.enqueue(chunk); + }); + + response.on("end", () => { + controller.close(); + }); + + response.on("error", (error) => { + controller.error(error); + reject(error); + }); + }, + }); + + resolve(stream); + }); + + request.on("error", (error) => { + reject(error); + }); + }); +} + +async function fetchFileDenoBun(pathname: string): Promise { + const req = await fetch(`${sourceOfTruth}/${pathname}`, agent); + if (!req.ok) { + throw new Error(`Failed to fetch ${pathname}`); + } + return req.body!; +} + +const fetchFileUncached = + typeof Bun !== "undefined" || typeof Deno !== "undefined" + ? fetchFileDenoBun + : fetchFileNode; + +export async function toBuffer( + stream: ReadableStream | Buffer, +): Promise { + if (!(stream instanceof ReadableStream)) { + return stream; + } + const chunks: Buffer[] = []; + for await (const chunk of stream) { + chunks.push(chunk); + } + return Buffer.concat(chunks); +} diff --git a/src/file-viewer/cert.pem b/src/file-viewer/cert.pem new file mode 100644 index 0000000..824dd07 --- /dev/null +++ b/src/file-viewer/cert.pem @@ -0,0 +1,23 @@ +-----BEGIN CERTIFICATE----- +MIIDxTCCAq2gAwIBAgIUBaaOXVkkE+6yarNyvzofETb+WLEwDQYJKoZIhvcNAQEL +BQAwdzELMAkGA1UEBhMCVVMxDjAMBgNVBAgMBVN0YXRlMQ0wCwYDVQQHDARDaXR5 +MRUwEwYDVQQKDAxNZWRpYSBTZXJ2ZXIxDzANBgNVBAMMBnplbml0aDEhMB8GCSqG +SIb3DQEJARYSbWVAcGFwZXJjbG92ZXIubmV0MB4XDTI1MDQyNzIxNTU0MFoXDTM1 +MDQyNTIxNTU0MFowdzELMAkGA1UEBhMCVVMxDjAMBgNVBAgMBVN0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file mode 100644 index 0000000..85b4669 --- /dev/null +++ b/src/file-viewer/cotyledon.tsx @@ -0,0 +1,291 @@ +export function Speedbump() { + return ( +
+
+ an interlude +
+
+ + +
+

cotyledon

+
+ +
+

+ this place is sacred, but dangerous. i have to keep visitors to an + absolute minimum; you'll get dust on all the artifacts. +

+

+ by entering our museum, you agree not to use your camera. flash off + isn't enough; the bits and bytes are alergic even to a camera's + sensor +

+

+ (in english: please do not store downloads after you're done viewing + them) +

+
+ +
+
+
+
+ ); +} + +export function Readme() { + return ( +
+
+ cotyledon +
+
+
+

+ welcome to the archive. if this is your first time here, i recommend + starting in '2017' and going + chronologically from there. however, there is truly no wrong way to + explore. +

+

+ note that there is a blanket trigger warning for everything in this + archive: while there is nothing visually offensive, some portions of + the text and emotions conveyed through this may hit extremely hard. + you are warned. +

+

+ all file dates are real. at least as real as i could figure out. + when i moved data across drives over my years, i accidentally had a + few points where i stamped over all the dates with the day that + moved the files. even fucked it up a final time in february 2025, + while in the process of unfucking things. +

+

+ thankfully, my past self knew i'd want to assemble this kind of + site, and because of that they were crazy about storing the dates of + things inside of html, json/yaml files, and even in fucking + databases. i'm glad it was all stored though, but jeez what a nerd. +

+

+ a few files were touched up for privacy, or otherwise re-encoded. + some of them i added extra metadata. +

+

+ from the bottom of my heart: i hope you enjoy. it has been a + nightmare putting this all together. technically and emotionally + speaking. i'm glad we can put this all behind us, mark it as + completed, and get started with the good shit. +

+

+ love,
clo +

+
+

+ start here -> 2017 +

+
+
+
+ ); +} + +export function ForEveryone() { + // deno-fmt-ignore + return <>
+

today is my 21st birthday. april 30th, 2025.

+

it's been nearly six months starting hormones.

+

sometimes i feel great,

+

sometimes i get dysphoria.

+

with the walls around me gone

+

that shit hits way harder than it did before.

+

ugh..

+

i'm glad the pain i felt is now explained,

+

but now rendered in high definition.

+

the smallest strands of hair on my face and belly act

+

as sharpened nails to pierce my soul.

+

+

it's all a pathway to better days; the sun had risen.

+

one little step at a time for both of us.

+

today i quit my job. free falling, it feels so weird.

+

like sky diving.

+

the only thing i feel is cold wind.

+

the only thing i see is everything,

+

and it's beautiful.

+

i have a month of falling before the parachute activates,

+

gonna spend as much time of it on art as i can.

+

that was, after all, my life plan:

+

i wanted to make art, all the time,

+

for everyone.

+

+

then you see what happened

+

to the world and the internet.

+

i never really got to live through that golden age,

+

it probably sucked back then too.

+

but now the big sites definitely stopped being fun.

+

they slide their cold hands up my body

+

and feel me around. it's unwelcoming, and

+

inconsiderate to how sensitive my skin is.

+

i'm so fucking glad i broke up with YouTube

+

and their devilish friends.

+

my NAS is at 5 / 24 TB

+

and probably wont fill for the next decade.

+

+

it took 2 months for me to notice my body changed.

+

that day was really nice, but it hurt a lot.

+

a sharp, satisfying pain in my chest gave me life.

+

learned new instincts for my arms

+

so they'd stop poking my new shape.

+

when i look at my face

+

it's like a different person.

+

she was the same as before, but completely new.

+

something changed

+

or i'm now used to seeing what makes me smile.

+

regardless, whatever i see in the mirror, i smile.

+

and, i don't hear that old name much anymore

+

aside from nightmares. and you'll never repeat it, ok?

+

okay.

+

+

been playing 'new canaan' by 'bill wurtz' on loop

+

in the background.

+

it kinda just feels right.

+

especially when that verse near the end comes on.

+

+

more people have been allowed to visit me.

+

my apartment used to be just for me,

+

but the more i felt like a person

+

the more i felt like having others over.

+

still have to decorate and clean it a little,

+

but it isn't a job to do alone.

+

we dragged a giant a rug across the city one day,

+

and it felt was like anything was possible.

+

sometimes i have ten people visit in a day,

+

or sometimes i focus my little eyes on just one.

+

i never really know what i want to do

+

until the time actually comes.

+

+{/* FILIP */} +

i think about the times i was by the water with you.

+

the sun setting warmly, icy air fell on our shoulders.

+{/* NATALIE */} +

and how we walked up to the top of that hill,

+

you picked up and disposed a nail on the ground,

+

walking the city thru places i've never been.

+{/* BEN */} +

or hiking through the park talking about compilers,

+

tiring me out until i'd fall asleep in your arms.

+{/* ELENA */} +

and the way you held on to my hand as i woke up,

+

noticing how i was trying to hide nightmare's tears.

+

+{/* HIGH SCHOOL */} +

i remember we were yelling lyrics loudly,

+

out of key yet cheered on because it was fun.

+{/* ADVAITH/NATALIE */} +

and when we all toured the big corporate office,

+{/* AYU/HARRIS */} +

then snuck in to some startup's office after hours;

+

i don't remember what movie we watched.

+{/* COLLEGE, DAY 1 IN EV's ROOM */} +

i remember laying on the bunk bed,

+

while the rest played a card game.

+{/* MEGHAN/MORE */} +

with us all laying on the rug, staring at the TV

+

as the ending twist to {/* SEVERANCE */'that show'} was revealed.

+

+

all the moments i cherish,

+

i love because it was always me.

+

i didn't have to pretend,

+

even if i didn't know who i was at the time.

+

you all were there. for me.

+

+

i don't want to pretend any more

+

i want to be myself. for everyone.

+

+

oh, the song ended. i thought it was on loop?

+

it's late... can hear the crickets...

+

and i can almost see the moon... mmmm...

+

...nah, too much light pollution.

+

+

one day. one day.

+

+

before i go, i want to show the uncensored version of "journal about a girl", because i can trust you at least. keep in mind, i think you're one of the first people to ever see this.

+
+
+
+

journal - 2024-09-14

+

been at HackMIT today on behalf of the company. it's fun. me and zack were running around looking for people that might be good hires. he had this magic arbitrary criteria to tell "oh this person is probably cracked let's talk to them" and we go to the first one. they were a nerd, perfect. they seemed to be extremely talented with some extreme software projects.
+okay.. oof... its still clouding my mind
+i cant shake that feeling away

+

hold on...

+

at some point they open one of their profiles to navigate to some code, and it displays for a couple of seconds: "pronouns: she/they". i don't actually know anything about this person, but it was my perception that she is trans. their appearance, physique, and age felt similar to me, which tends makes people think you are male.

+

but... she was having fun being herself. being a legend of identity and of her skill in computer science. winning the physics major. making cool shit at the hackathon, and probably in life. my perception of her was the exact essence of who i myself wanted to be. i was jealous of her life.

+

i tried hard to avoid a breakdown. success. but i was feeling distant. the next hour or so was disorienting, trying not to think about it too hard. i think there was one possibly interesting person we talked to. i don't remember any of the other conversations. they were not important. but i couldn't think through them regardless.

+

later, i decided to read some of her code. i either have a huge dislike towards the Rust programming language and/or it was not high quality code. welp, so just is a person studying. my perception was just a perception, inaccurate but impacting. i know i need to become myself, whoever that is. otherwise, i'm just going to feel this shit at higher doses. i think about this every day, and the amount of time i feel being consumed by these problems only grows.

+

getting through it all is a lonely feeling. not because no one is around, but because i am isolated emotionally. i know other people hit these feelings, but we all are too afraid to speak up, and it's all lonely.

+

waiting on a reply from someone from healthcare. it'll be slow, but it will be okay.

+
+
+
+

+i've learned that even when i feel alone, it doesn't have to feel lonely. i know it's hard, dear. i know it's scary. but i promise it's possible. we're all in this together. struggling together. sacrificing together. we dedicate our lives to each you, and our art for everyone. +

+ +

+ and then we knew,
+ just like paper airplanes: that we could fly... +

+
+

+ fin. +

+
+ +} +ForEveryone.class = "text"; diff --git a/src/file-viewer/format.ts b/src/file-viewer/format.ts new file mode 100644 index 0000000..65fc14b --- /dev/null +++ b/src/file-viewer/format.ts @@ -0,0 +1,264 @@ +export function formatSize(bytes: number) { + if (bytes < 1024) return `${bytes} bytes`; + if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`; + if (bytes < 1024 * 1024 * 1024) { + return `${(bytes / 1024 / 1024).toFixed(1)} MB`; + } + return `${(bytes / 1024 / 1024 / 1024).toFixed(1)} GB`; +} +export function formatDate(date: Date) { + // YYYY-MM-DD, format in PST timezone + return date.toLocaleDateString("sv", { timeZone: "America/Los_Angeles" }); +} +export function formatShortDate(date: Date) { + // YY-MM-DD, format in PST timezone + return formatDate(date).slice(2); +} +export function formatDuration(seconds: number) { + const minutes = Math.floor(seconds / 60); + const remainingSeconds = seconds % 60; + return `${minutes}:${remainingSeconds.toString().padStart(2, "0")}`; +} +export const escapeUri = (uri: string) => + encodeURIComponent(uri) + .replace(/%2F/gi, "/") + .replace(/%3A/gi, ":") + .replace(/%2B/gi, "+") + .replace(/%40/gi, "@") + .replace(/%2D/gi, "-") + .replace(/%5F/gi, "_") + .replace(/%2E/gi, ".") + .replace(/%2C/gi, ","); + +import type { MediaFile } from "../db.ts"; +import { escapeHTML } from "../framework/bun-polyfill.ts"; +const findDomain = "paperclover.net"; + +// Returns escaped HTML +// Features: +// - autolink detection +// - via \bpaperclover.net/[a-zA-Z0-9_\.+-]+ +// - via \b/file/[a-zA-Z0-9_\.+-]+ +// - via \bhttps://... +// - via name of a sibling file's basename +// - reformat (c) into © +// +// This formatter was written with AI. +export function highlightLinksInTextView( + text: string, + siblingFiles: MediaFile[] = [], +) { + const siblingLookup = Object.fromEntries( + siblingFiles + .filter((f) => f.basename !== "readme.txt") + .map((f) => [f.basename, f]), + ); + + // First escape the HTML to prevent XSS + let processedText = escapeHTML(text); + + // Replace (c) with © + processedText = processedText.replace(/\(c\)/gi, "©"); + + // Process all URL patterns in a single pass to avoid nested links + // This regex matches: + // 1. https:// or http:// URLs + // 2. domain URLs without protocol (e.g., paperclover.net/path) + // 3. /file/ URLs + // 4. ./ relative paths + + // We'll use a function to determine what kind of URL it is and format accordingly + const urlRegex = new RegExp( + "(" + + // Group 1: https:// or http:// URLs + "\\bhttps?:\\/\\/[a-zA-Z0-9_\\.\\-]+\\.[a-zA-Z0-9_\\.\\-]+[a-zA-Z0-9_\\.\\-\\/\\?=&%+#]*" + + "|" + + // Group 2: domain URLs without protocol + findDomain + + "\\/\\/[a-zA-Z0-9_\\.\\+\\-]+" + + "|" + + // Group 3: /file/ URLs + "\\/file\\/[a-zA-Z0-9_\\.\\+\\-\\/]+" + + ")\\b" + + "|" + + // Group 4: ./ relative paths (not word-bounded) + "(?<=\\s|^)\\.\\/[\\w\\-\\.]+", + "g", + ); + + processedText = processedText.replace(urlRegex, (match: string) => { + // Case 1: https:// or http:// URLs + if (match.startsWith("http")) { + if (match.includes(findDomain)) { + return `${match}`; + } + return `${match}`; + } + + // Case 2: domain URLs without protocol + if (match.startsWith(findDomain)) { + return `${match}`; + } + + // Case 3: /file/ URLs + if (match.startsWith("/file/")) { + return `${match}`; + } + + // Case 4: ./ relative paths + if (match.startsWith("./")) { + const filename = match.substring(2); + + // Check if the filename exists in sibling files + const siblingFile = siblingFiles.find((f) => f.basename === filename); + if (siblingFile) { + return `${match}`; + } + + // If no exact match but we have sibling files, try to create a reasonable link + if (siblingFiles.length > 0) { + const currentDir = siblingFiles[0].path + .split("/") + .slice(0, -1) + .join("/"); + return `${match}`; + } + } + + return match; + }); + + // Match sibling file names (only if they're not already part of a link) + if (siblingFiles.length > 0) { + // Create a regex pattern that matches any of the sibling file basenames + // We need to escape special regex characters in the filenames + const escapedBasenames = siblingFiles.map((f) => + f.basename.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + ); + + // Join all basenames with | for the regex alternation + const pattern = new RegExp(`\\b(${escapedBasenames.join("|")})\\b`, "g"); + + // We need to be careful not to replace text that's already in a link + // So we'll split the text by HTML tags and only process the text parts + const parts = processedText.split(/(<[^>]*>)/); + + for (let i = 0; i < parts.length; i += 2) { + // Only process text parts (even indices), not HTML tags (odd indices) + if (i < parts.length) { + parts[i] = parts[i].replace(pattern, (match: string) => { + const file = siblingLookup[match]; + if (file) { + return `${match}`; + } + return match; + }); + } + } + + processedText = parts.join(""); + } + + return processedText; +} + +export function highlightConvo(text: string) { + text = text.replace(/^#mode=convo\n/, ""); + + const lines = text.split("\n"); + const paras: { speaker: string | null; lines: string[] }[] = []; + let currentPara: string[] = []; + let currentSpeaker: string | null = null; + let firstSpeaker = null; + + const speakers: Record = {}; + const getSpeaker = (s: string) => { + if (s[1] === " " && speakers[s[0]]) { + return s[0]; + } + return null; + }; + + for (const line of lines) { + let trimmed = line.trim(); + if (line.startsWith("#")) { + // parse #X=Y + const [_, speaker, color] = trimmed.match(/^#(.)=(.*)$/)!; + speakers[speaker] = color; + continue; + } + if (trimmed === "") { + continue; + } + let speaker = getSpeaker(trimmed); + if (speaker) { + trimmed = trimmed.substring(speaker.length).trimStart(); + speaker = speakers[speaker]; + } else { + speaker = "me"; + } + + trimmed = trimmed.replace( + /\[IMG:(\/file\/[^\]]+)\]/g, + 'attachment', + ); + + if (trimmed === "---" && speaker === "me") { + trimmed = "
"; + } + + if (speaker === currentSpeaker) { + currentPara.push(trimmed); + } else { + if (currentPara.length > 0) { + paras.push({ + speaker: currentSpeaker, + lines: currentPara, + }); + currentPara = []; + } + currentPara = [trimmed]; + currentSpeaker = speaker; + firstSpeaker ??= speaker; + } + } + + if (currentPara.length > 0) { + paras.push({ + speaker: currentSpeaker, + lines: currentPara, + }); + } + + return paras + .map(({ speaker, lines }) => { + return `
${ + lines + .map((line) => `
${line}
`) + .join("\n") + }
`; + }) + .join("\n"); +} + +export function highlightHashComments(text: string) { + const lines = text.split("\n"); + return lines + .map((line) => { + if (line.startsWith("#")) { + return `
${line}
`; + } + return `
${line.trimEnd() || " "}
`; + }) + .join("\n"); +} diff --git a/src/file-viewer/highlight-grammar/astro.plist b/src/file-viewer/highlight-grammar/astro.plist new file mode 100644 index 0000000..39449cc --- /dev/null +++ b/src/file-viewer/highlight-grammar/astro.plist @@ -0,0 +1,1203 @@ + + + + + fileTypes + + astro + + foldingStartMarker + (?x) +(<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|li|form|dl)\b.*?> +|<!--(?!.*--\s*>) +|^<!--\ \#tminclude\ (?>.*?-->)$ +|<\?(?:php)?.*\b(if|for(each)?|while)\b.+: +|\{\{?(if|foreach|capture|literal|foreach|php|section|strip) +|\{\s*($|\?>\s*$|//|/\*(.*\*/\s*$|(?!.*?\*/))) +) + foldingStopMarker + (?x) +(</(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|li|form|dl)> +|^(?!.*?<!--).*?--\s*> +|^<!--\ end\ tminclude\ -->$ +|<\?(?:php)?.*\bend(if|for(each)?|while)\b +|\{\{?/(if|foreach|capture|literal|foreach|php|section|strip) +|^[^{]*\} +) + keyEquivalent + ^~H + name + Astro + patterns + + + include + #astro-markdown + + + include + #astro-expressions + + + begin + (<)([a-zA-Z0-9:-]++)(?=[^>]*></\2>) + beginCaptures + + 1 + + name + punctuation.definition.tag.begin.html + + 2 + + name + entity.name.tag.html + + + end + (>)(<)(/)(\2)(>) + endCaptures + + 1 + + name + punctuation.definition.tag.end.html + + 2 + + name + punctuation.definition.tag.begin.html meta.scope.between-tag-pair.html + + 3 + + name + punctuation.definition.tag.begin.html + + 4 + + name + entity.name.tag.html + + 5 + + name + punctuation.definition.tag.end.html + + + name + meta.tag.any.html + patterns + + + include + #tag-stuff + + + + + begin + (<\?)(xml) + captures + + 1 + + name + punctuation.definition.tag.html + + 2 + + name + entity.name.tag.xml.html + + + end + (\?>) + name + meta.tag.preprocessor.xml.html + patterns + + + include + #tag-generic-attribute + + + include + #string-double-quoted + + + include + #string-single-quoted + + + + + begin + <!-- + captures + + + name + punctuation.definition.comment.html + + + end + --\s*> + name + comment.block.html + patterns + + + match + -- + name + invalid.illegal.bad-comments-or-CDATA.html + + + + + begin + <! + captures + + + name + punctuation.definition.tag.html + + + end + > + name + meta.tag.sgml.html + patterns + + + begin + (?i:DOCTYPE|doctype) + captures + + 1 + + name + entity.name.tag.doctype.html + + + end + (?=>) + name + meta.tag.sgml.doctype.html + patterns + + + match + "[^">]*" + name + string.quoted.double.doctype.identifiers-and-DTDs.html + + + + + begin + \[CDATA\[ + end + ]](?=>) + name + constant.other.inline-data.html + + + match + (\s*)(?!--|>)\S(\s*) + name + invalid.illegal.bad-comments-or-CDATA.html + + + + + begin + (?:^\s+)?(<)((?i:style))\b(?=[^>]*lang=(['"])css\1?) + captures + + 1 + + name + punctuation.definition.tag.begin.html + + 2 + + name + entity.name.tag.style.html + + 3 + + name + punctuation.definition.tag.html + + + end + (</)((?i:style))(>)(?:\s*\n)? + name + source.css.embedded.html + patterns + + + include + #tag-stuff + + + begin + (>) + beginCaptures + + 1 + + name + punctuation.definition.tag.end.html + + + end + (?=</(?i:style)) + patterns + + + include + source.css + + + + + + + begin + (?:^\s+)?(<)((?i:style))\b(?=[^>]*lang=(['"])sass\1?) + captures + + 1 + + name + punctuation.definition.tag.begin.html + + 2 + + name + entity.name.tag.style.html + + 3 + + name + punctuation.definition.tag.html + + + end + (</)((?i:style))(>)(?:\s*\n)? + name + source.sass.embedded.html + patterns + + + include + #tag-stuff + + + begin + (>) + beginCaptures + + 1 + + name + punctuation.definition.tag.end.html + + + end + (?=</(?i:style)) + patterns + + + include + source.sass + + + + + + + begin + (?:^\s+)?(<)((?i:style))\b(?=[^>]*lang=(['"])scss\1?) + captures + + 1 + + name + punctuation.definition.tag.begin.html + + 2 + + name + entity.name.tag.style.html + + 3 + + name + punctuation.definition.tag.html + + + end + (</)((?i:style))(>)(?:\s*\n)? + name + source.scss.embedded.html + patterns + + + include + #tag-stuff + + + begin + (>) + beginCaptures + + 1 + + name + punctuation.definition.tag.end.html + + + end + (?=</(?i:style)) + patterns + + + include + source.css.scss + + + + + + + begin + (?:^\s+)?(<)((?i:style))\b(?![^>]*/>) + captures + + 1 + + name + punctuation.definition.tag.begin.html + + 2 + + name + entity.name.tag.style.html + + 3 + + name + punctuation.definition.tag.html + + + end + (</)((?i:style))(>)(?:\s*\n)? + name + source.css.embedded.html + patterns + + + include + #tag-stuff + + + begin + (>) + beginCaptures + + 1 + + name + punctuation.definition.tag.end.html + + + end + (?=</(?i:style)) + patterns + + + include + source.css + + + + + + + begin + (?:^\s+)?(<)((?i:script))\b(?=[^>]*lang=(['"])tsx\1?) + beginCaptures + + 1 + + name + punctuation.definition.tag.begin.html + + 2 + + name + entity.name.tag.script.html + + + end + (?<=</(script|SCRIPT))(>)(?:\s*\n)? + endCaptures + + 2 + + name + punctuation.definition.tag.html + + + name + source.tsx.embedded.html + patterns + + + include + #tag-stuff + + + begin + (?<!</(?:script|SCRIPT))(>) + captures + + 1 + + name + punctuation.definition.tag.begin.html + + 2 + + name + entity.name.tag.script.html + + + end + (</)((?i:script)) + patterns + + + include + source.tsx + + + + + + + begin + (?:^\s+)?(<)((?i:script))\b(?=[^>]*lang=(['"])ts\1?) + beginCaptures + + 1 + + name + punctuation.definition.tag.begin.html + + 2 + + name + entity.name.tag.script.html + + + end + (?<=</(script|SCRIPT))(>)(?:\s*\n)? + endCaptures + + 2 + + name + punctuation.definition.tag.html + + + name + source.tsx.embedded.html + patterns + + + include + #tag-stuff + + + begin + (?<!</(?:script|SCRIPT))(>) + captures + + 1 + + name + punctuation.definition.tag.begin.html + + 2 + + name + entity.name.tag.script.html + + + end + (</)((?i:script)) + patterns + + + include + source.tsx + + + + + + + begin + (<)((?i:script))\b(?![^>]*/>)(?![^>]*(?i:type.?=.?text/((?!javascript|babel|ecmascript).*))) + beginCaptures + + 1 + + name + punctuation.definition.tag.begin.html + + 2 + + name + entity.name.tag.script.html + + + end + (?<=</(script|SCRIPT))(>)(?:\s*\n)? + endCaptures + + 2 + + name + punctuation.definition.tag.html + + + name + source.tsx.embedded.html + patterns + + + include + #tag-stuff + + + begin + (?<!</(?:script|SCRIPT))(>) + captures + + 1 + + name + punctuation.definition.tag.begin.html + + 2 + + name + entity.name.tag.script.html + + + end + (</)((?i:script)) + patterns + + + captures + + 1 + + name + punctuation.definition.comment.js + + + match + (//).*?((?=</script)|$\n?) + name + comment.line.double-slash.js + + + begin + /\* + captures + + + name + punctuation.definition.comment.js + + + end + \*/|(?=</script) + name + comment.block.js + + + include + source.tsx + + + + + + + begin + (</?)((?i:body|head|html)\b) + captures + + 1 + + name + punctuation.definition.tag.begin.html + + 2 + + name + entity.name.tag.structure.any.html + + + end + (>) + endCaptures + + 1 + + name + punctuation.definition.tag.end.html + + + name + meta.tag.structure.any.html + patterns + + + include + #tag-stuff + + + + + begin + (</?)((?i:address|blockquote|dd|div|dl|dt|fieldset|form|frame|frameset|h1|h2|h3|h4|h5|h6|iframe|noframes|object|ol|p|ul|applet|center|dir|hr|menu|pre)\b) + beginCaptures + + 1 + + name + punctuation.definition.tag.begin.html + + 2 + + name + entity.name.tag.block.any.html + + + end + (>) + endCaptures + + 1 + + name + punctuation.definition.tag.end.html + + + name + meta.tag.block.any.html + patterns + + + include + #tag-stuff + + + + + begin + (</?)((?i:a|abbr|acronym|area|b|base|basefont|bdo|big|br|button|caption|cite|code|col|colgroup|del|dfn|em|font|head|html|i|img|input|ins|isindex|kbd|label|legend|li|link|map|meta|noscript|optgroup|option|param|q|s|samp|script|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|var)\b) + beginCaptures + + 1 + + name + punctuation.definition.tag.begin.html + + 2 + + name + entity.name.tag.inline.any.html + + + end + ((?: ?/)?>) + endCaptures + + 1 + + name + punctuation.definition.tag.end.html + + + name + meta.tag.inline.any.html + patterns + + + include + #tag-stuff + + + + + begin + (</?)([A-Z][a-zA-Z0-9-\.]*|[a-z]+\.[a-zA-Z0-9-]+)(\:(load|idle|visible))? + beginCaptures + + 1 + + name + punctuation.definition.tag.begin.html + + 2 + + name + entity.name.tag.component.astro + + 3 + + name + keyword.control.loading.astro + + + end + (/?>) + endCaptures + + 1 + + name + punctuation.definition.tag.end.html + + + name + meta.tag.component.astro + patterns + + + include + #tag-stuff + + + + + begin + (</?)([a-zA-Z0-9:-]+) + beginCaptures + + 1 + + name + punctuation.definition.tag.begin.html + + 2 + + name + entity.name.tag.other.html + + + end + (/?>) + endCaptures + + 1 + + name + punctuation.definition.tag.end.html + + + name + meta.tag.other.html + patterns + + + include + #tag-stuff + + + + + include + #entities + + + include + #frontmatter + + + match + <> + name + invalid.illegal.incomplete.html + + + match + < + name + invalid.illegal.bad-angle-bracket.html + + + repository + + astro-expressions + + patterns + + + begin + \{ + beginCaptures + + + name + punctuation.definition.generic.begin.html + + + end + \} + endCaptures + + + name + punctuation.definition.generic.end.html + + + name + expression.embbeded.astro + patterns + + + include + source.tsx + + + + + + astro-markdown + + begin + (<)(Markdown)(>) + beginCaptures + + 1 + + name + punctuation.definition.tag.begin.html + + 2 + + name + entity.name.tag.html + + 3 + + name + punctuation.definition.tag.end.html + + + end + (</)(Markdown)(>) + endCaptures + + 1 + + name + punctuation.definition.tag.begin.html + + 2 + + name + entity.name.tag.html + + 3 + + name + punctuation.definition.tag.end.html + + + name + text.html.astro.markdown + patterns + + + include + text.html.markdown.astro + + + + entities + + patterns + + + captures + + 1 + + name + punctuation.definition.entity.html + + 3 + + name + punctuation.definition.entity.html + + + match + (&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;) + name + constant.character.entity.html + + + match + & + name + invalid.illegal.bad-ampersand.html + + + + frontmatter + + begin + \A(-{3})\s*$ + beginCaptures + + 1 + + name + comment.block.html + + + contentName + meta.embedded.block.frontmatter + end + (^|\G)(-{3})|\.{3}\s*$ + endCaptures + + 2 + + name + comment.block.html + + + patterns + + + include + source.tsx + + + + string-double-quoted + + begin + " + beginCaptures + + + name + punctuation.definition.string.begin.html + + + end + " + endCaptures + + + name + punctuation.definition.string.end.html + + + name + string.quoted.double.html + patterns + + + include + #entities + + + + string-single-quoted + + begin + ' + beginCaptures + + + name + punctuation.definition.string.begin.html + + + end + ' + endCaptures + + + name + punctuation.definition.string.end.html + + + name + string.quoted.single.html + patterns + + + include + #entities + + + + tag-generic-attribute + + match + \b([a-zA-Z\-:]+) + name + entity.other.attribute-name.html + + tag-id-attribute + + begin + \b(id)\b\s*(=) + captures + + 1 + + name + entity.other.attribute-name.id.html + + 2 + + name + punctuation.separator.key-value.html + + + end + (?<='|") + name + meta.attribute-with-value.id.html + patterns + + + begin + " + beginCaptures + + + name + punctuation.definition.string.begin.html + + + contentName + meta.toc-list.id.html + end + " + endCaptures + + + name + punctuation.definition.string.end.html + + + name + string.quoted.double.html + patterns + + + include + #astro-expressions + + + include + #entities + + + + + begin + ' + beginCaptures + + + name + punctuation.definition.string.begin.html + + + contentName + meta.toc-list.id.html + end + ' + endCaptures + + + name + punctuation.definition.string.end.html + + + name + string.quoted.single.html + patterns + + + include + #astro-expressions + + + include + #entities + + + + + + tag-stuff + + patterns + + + include + #tag-id-attribute + + + include + #tag-generic-attribute + + + include + #string-double-quoted + + + include + #string-single-quoted + + + include + #astro-load-directive + + + include + #astro-expressions + + + include + #astro-markdown + + + + + scopeName + text.html.astro + + \ No newline at end of file diff --git a/src/file-viewer/highlight-grammar/css.plist b/src/file-viewer/highlight-grammar/css.plist new file mode 100644 index 0000000..cb7fad4 --- /dev/null +++ b/src/file-viewer/highlight-grammar/css.plist @@ -0,0 +1,1036 @@ + + + + + fileTypes + + css + css.erb + + keyEquivalent + ^~C + name + CSS + patterns + + + include + #comment-block + + + include + #selector + + + begin + \s*((@)charset\b)\s* + captures + + 1 + + name + keyword.control.at-rule.charset.css + + 2 + + name + punctuation.definition.keyword.css + + + end + \s*((?=;|$)) + name + meta.at-rule.charset.css + patterns + + + include + #string-double + + + include + #string-single + + + + + begin + \s*((@)import\b)\s* + captures + + 1 + + name + keyword.control.at-rule.import.css + + 2 + + name + punctuation.definition.keyword.css + + + end + \s*((?=;|\})) + name + meta.at-rule.import.css + patterns + + + include + #string-double + + + include + #string-single + + + begin + \s*(url)\s*(\()\s* + beginCaptures + + 1 + + name + support.function.url.css + + 2 + + name + punctuation.section.function.css + + + end + \s*(\))\s* + endCaptures + + 1 + + name + punctuation.section.function.css + + + patterns + + + match + [^'") \t]+ + name + variable.parameter.url.css + + + include + #string-single + + + include + #string-double + + + + + include + #media-query-list + + + + + begin + ^\s*((@)font-face)\s*(?=\{) + beginCaptures + + 1 + + name + keyword.control.at-rule.font-face.css + + 2 + + name + punctuation.definition.keyword.css + + + end + (?!\G) + name + meta.at-rule.font-face.css + patterns + + + include + #rule-list + + + + + begin + (?=^\s*@media\s*.*?\{) + end + \s*(\}) + endCaptures + + 1 + + name + punctuation.section.property-list.end.css + + + patterns + + + begin + ^\s*((@)media)(?=.*?\{) + beginCaptures + + 1 + + name + keyword.control.at-rule.media.css + + 2 + + name + punctuation.definition.keyword.css + + 3 + + name + support.constant.media.css + + + end + \s*(?=\{) + name + meta.at-rule.media.css + patterns + + + include + #media-query-list + + + + + begin + \s*(\{) + beginCaptures + + 1 + + name + punctuation.section.property-list.begin.css + + + end + (?=\}) + patterns + + + include + $self + + + + + + + begin + (?=\{) + end + (?!\G) + patterns + + + include + #rule-list + + + + + repository + + color-values + + patterns + + + comment + http://www.w3.org/TR/CSS21/syndata.html#value-def-color + match + \b(aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)\b + name + support.constant.color.w3c-standard-color-name.css + + + comment + These colours are mostly recognised but will not validate. ref: http://www.w3schools.com/css/css_colornames.asp + match + \b(aliceblue|antiquewhite|aquamarine|azure|beige|bisque|blanchedalmond|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|gainsboro|ghostwhite|gold|goldenrod|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|limegreen|linen|magenta|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|oldlace|olivedrab|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|thistle|tomato|turquoise|violet|wheat|whitesmoke|yellowgreen)\b + name + invalid.deprecated.color.w3c-non-standard-color-name.css + + + begin + (hsla?|rgba?)\s*(\() + beginCaptures + + 1 + + name + support.function.misc.css + + 2 + + name + punctuation.section.function.css + + + end + (\)) + endCaptures + + 1 + + name + punctuation.section.function.css + + + patterns + + + match + (?x)\b + (0*((1?[0-9]{1,2})|(2([0-4][0-9]|5[0-5])))\s*,\s*){2} + (0*((1?[0-9]{1,2})|(2([0-4][0-9]|5[0-5])))\b) + (\s*,\s*((0?\.[0-9]+)|[0-1]))? + + name + constant.other.color.rgb-value.css + + + match + \b([0-9]{1,2}|100)\s*%,\s*([0-9]{1,2}|100)\s*%,\s*([0-9]{1,2}|100)\s*% + name + constant.other.color.rgb-percentage.css + + + include + #numeric-values + + + + + + comment-block + + begin + /\* + captures + + 0 + + name + punctuation.definition.comment.css + + + end + \*/ + name + comment.block.css + + media-query + + begin + (?i)\s*(only|not)?\s*(all|aural|braille|embossed|handheld|print|projection|screen|tty|tv)? + beginCaptures + + 1 + + name + keyword.operator.logic.media.css + + 2 + + name + support.constant.media.css + + + end + \s*(?:(,)|(?=[{;])) + endCaptures + + 1 + + name + punctuation.definition.arbitrary-repitition.css + + + patterns + + + begin + \s*(and)?\s*(\()\s* + beginCaptures + + 1 + + name + keyword.operator.logic.media.css + + + end + \) + patterns + + + begin + (?x) + ( + ((min|max)-)? + ( + ((device-)?(height|width|aspect-ratio))| + (color(-index)?)|monochrome|resolution + ) + )|grid|scan|orientation + \s*(?=[:)]) + beginCaptures + + 0 + + name + support.type.property-name.media.css + + + end + (:)|(?=\)) + endCaptures + + 1 + + name + punctuation.separator.key-value.css + + + + + match + \b(portrait|landscape|progressive|interlace) + name + support.constant.property-value.css + + + captures + + 1 + + name + constant.numeric.css + + 2 + + name + keyword.operator.arithmetic.css + + 3 + + name + constant.numeric.css + + + match + \s*(\d+)(/)(\d+) + + + include + #numeric-values + + + + + + media-query-list + + begin + \s*(?=[^{;]) + end + \s*(?=[{;]) + patterns + + + include + #media-query + + + + numeric-values + + patterns + + + captures + + 1 + + name + punctuation.definition.constant.css + + + match + (#)([0-9a-fA-F]{3}|[0-9a-fA-F]{6})\b + name + constant.other.color.rgb-value.css + + + captures + + 1 + + name + keyword.other.unit.css + + + match + (?x) + (?:-|\+)?(?:(?:[0-9]+(?:\.[0-9]+)?)|(?:\.[0-9]+)) + ((?:px|pt|ch|cm|mm|in|r?em|ex|pc|deg|g?rad|dpi|dpcm|s)\b|%)? + + name + constant.numeric.css + + + + property-values + + patterns + + + match + \b(absolute|all(-scroll)?|always|armenian|auto|avoid|baseline|below|bidi-override|block|bold|bolder|both|bottom|break-all|break-word|capitalize|center|char|circle|cjk-ideographic|col-resize|collapse|crosshair|dashed|decimal-leading-zero|decimal|default|disabled|disc|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ellipsis|fixed|flat|geometricPrecision|georgian|groove|hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|inherit|initial|inline-block|inline|inset|inside|inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|keep-all|left|lighter|line-edge|line-through|line|list-item|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|nw-resize|none|normal|not-allowed|nowrap|oblique|optimize(Legibility|Quality|Speed)|outset|outside|overline|pointer|pre(-(wrap|line))?|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|right|ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|solid|square|static|strict|sub|super|sw-resize|table-footer-group|table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|vertical(-(ideographic|text))|visible(Painted|Fill|Stroke)?|w-resize|wait|whitespace|zero|smaller|larger|((xx?-)?(small|large))|painted|fill|stroke|column|column-reverse|contain|cover|fill|flex-end|flex-start|row|row-reverse|scale-down|space-around|space-between|stretch|wrap|wrap-reverse|reverse|alternate-reverse|alternate|forwards|backwards|infinite|ease|ease-in|ease-out|ease-in-out|linear|step-start|step-end|steps|cubic-bezier|running|paused|sticky|page|soft-light|screen|saturation|overlay|multiply|luminosity|lighten|hue|hard-light|exclusion|difference|darken|color-dodge|color-burn|color|view-box|stroke-box|fill-box|border-box|padding-box|content-box|round|space|currentColor|subgrid|auto-fill|min-content|max-content|row|column|dense|minmax|calc|translate|translateX|translateY|translateZ|scale|scaleX|scaleY|scaleZ|rotate|rotateX|rotateY|rotateZ|skew|skewX|skewY|skewZ|linear-gradient|repeating-linear-gradient|radial-gradient|repeating-radial-gradient|farthest-side|closest-side|farthest-corner|closest-corner|ellipse|circle)\b + name + support.constant.property-value.css + + + match + (\b(?i:arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace)\b) + name + support.constant.font-name.css + + + include + #numeric-values + + + include + #color-values + + + include + #string-double + + + include + #string-single + + + begin + (rect)\s*(\() + beginCaptures + + 1 + + name + support.function.misc.css + + 2 + + name + punctuation.section.function.css + + + end + (\)) + endCaptures + + 1 + + name + punctuation.section.function.css + + + patterns + + + include + #numeric-values + + + + + begin + (format|local|url|attr|counter|counters)\s*(\() + beginCaptures + + 1 + + name + support.function.misc.css + + 2 + + name + punctuation.section.function.css + + + end + (\)) + endCaptures + + 1 + + name + punctuation.section.function.css + + + patterns + + + include + #string-single + + + include + #string-double + + + match + [^'") \t]+ + name + variable.parameter.misc.css + + + + + begin + (matrix(3d)?|perspective|(rotate|scale|translate)([XYZ]|3d)?|skew[XY]?)\s*(\() + beginCaptures + + 1 + + name + support.function.transform.css + + 2 + + name + punctuation.section.function.css + + + end + (\)) + endCaptures + + 1 + + name + punctuation.section.function.css + + + patterns + + + include + #numeric-values + + + + + match + \!\s*important + name + keyword.other.important.css + + + + rule-list + + begin + \{ + beginCaptures + + 0 + + name + punctuation.section.property-list.begin.css + + + end + \} + endCaptures + + 0 + + name + punctuation.section.property-list.end.css + + + name + meta.property-list.css + patterns + + + include + #comment-block + + + begin + (?<![-a-z])(?=[-a-z]) + end + $|(?![-a-z]) + name + meta.property-name.css + patterns + + + match + -(webkit|moz|o|ms|khtml)(-[A-Za-z]+)+\b + name + support.type.property-name.css + + + match + \b(zoom|z-index|y|x|writing-mode|wrap-through|wrap-flow|wrap|word-wrap|word-spacing|word-break|word|will-change|width|widows|white-space-collapse|white-space|white|weight|volume|voice-volume|voice-stress|voice-rate|voice-range|voice-pitch-range|voice-pitch|voice-family|voice-duration|voice-balance|voice|visibility|vertical-align|variant|user-select|up|unicode-bidi|unicode|trim|transition-timing-function|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|timing-function|text-wrap|text-underline-position|text-transform|text-space-collapse|text-shadow|text-replace|text-overflow|text-outline|text-orientation|text-justify|text-indent|text-height|text-emphasis-style|text-emphasis-position|text-emphasis-color|text-emphasis|text-decoration-style|text-decoration-skip|text-decoration-line|text-decoration-color|text-decoration|text-combine-upright|text-align-last|text-align|text|target-position|target-new|target-name|target|table-layout|tab-size|style-type|style-position|style-image|style|stroke|string-set|stretch|stress|stacking-strategy|stacking-shift|stacking-ruby|stacking|src|speed|speech-rate|speech|speak-punctuation|speak-numeral|speak-header|speak-as|speak|span|spacing|space-collapse|space|sizing|size-adjust|size|shape-outside|shape-margin|shape-inside|shape-image-threshold|shadow|setting-named-strings-string-set-pro|scroll-snap-type|scroll-snap-stop|scroll-snap-margin-top|scroll-snap-margin-right|scroll-snap-margin-left|scroll-snap-margin-inline-start|scroll-snap-margin-inline-end|scroll-snap-margin-inline|scroll-snap-margin-bottom|scroll-snap-margin-block-start|scroll-snap-margin-block-end|scroll-snap-margin-block|scroll-snap-margin|scroll-snap-align|scroll-padding-top|scroll-padding-right|scroll-padding-left|scroll-padding-inline-start|scroll-padding-inline-end|scroll-padding-inline|scroll-padding-bottom|scroll-padding-block-start|scroll-padding-block-end|scroll-padding-block|scroll-padding|rule-width|rule-style|rule-color|rule|ruby-span|ruby-position|ruby-overhang|ruby-merge|ruby-align|ruby|rows|row-gap|rotation-point|rotation|rotating|role|right|richness|rest-before|rest-after|rest|respond-to|resource|resolution|resize|reset|replace|repeat|rendering-intent|region-fragment|rate|radius|quotes|punctuation-trim|punctuation|property|profile|presentation-level|presentation|position|polar-origin|polar-distance|polar-angle|polar-anchor|pointer-events|point|play-state|play-during|play-count|pitch-range|pitch|phonemes|perspective-origin|perspective|pause-before|pause-after|pause|page-policy|page-break-inside|page-break-before|page-break-after|page|padding-top|padding-right|padding-left|padding-bottom|padding|pack|overhang|overflow-y|overflow-x|overflow-wrap|overflow-style|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|origin|orientation|orient|ordinal-group|order|opacity|offset|object-position|object-fit|numeral|new|nav-up|nav-right|nav-left|nav-index|nav-down|nav-dir|nav|name|moving|move-to|model|min-width|min-height|min|max-width|max-lines|max-height|max|mask-type|mask-source-type|mask-size|mask-repeat|mask-position|mask-origin|mask-image|mask-clip|mask-box-width|mask-box-source|mask-box-slice|mask-box-repeat|mask-box-outset|mask-box|mask|marquee-style|marquee-speed|marquee-play-count|marquee-direction|marquee|marks|marker-side|mark-before|mark-after|mark|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|list|lines|line-stacking-strategy|line-stacking-shift|line-stacking-ruby|line-stacking|line-snap|line-height|line-grid|line-break|line|lighting-color|level|letter-spacing|length|left|label|justify-self|justify-items|justify-content|justify|iteration-count|input-method-editor|inline-box-align|initial-value|initial-size|initial-letter|initial-before-align|initial-before-adjust|initial-after-align|initial-after-adjust|index|indent|increment|image-resolution|image-rendering|image-orientation|image|icon|hyphens|hyphenate-resource|hyphenate-lines|hyphenate-character|hyphenate-before|hyphenate-after|hyphenate|height|header|hanging-punctuation|grid-template-rows|grid-template-columns|grid-template-areas|grid-template|grid-rows|grid-row-start|grid-row-end|grid-row|grid-columns|grid-column-start|grid-column-end|grid-column|grid-auto-rows|grid-auto-flow|grid-auto-columns|grid-area|grid|gap|font-weight|font-variant-position|font-variant-numeric|font-variant-ligatures|font-variant-east-asian|font-variant-caps|font-variant-alternates|font-variant|font-synthesis|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|flow-into|flow-from|flood-opacity|flood-color|float-offset|float|flex-wrap|flex-shrink|flex-grow|flex-group|flex-flow|flex-direction|flex-basis|flex|fit-position|fit|filter|fill|family|empty-cells|emphasis|elevation|duration|drop-initial-value|drop-initial-size|drop-initial-before-align|drop-initial-before-adjust|drop-initial-after-align|drop-initial-after-adjust|drop|down|dominant-baseline|display-role|display-outside|display-model|display-list|display-inside|display|direction|delay|decoration-break|decoration|cursor|cue-before|cue-after|cue|crop|counter-set|counter-reset|counter-increment|counter|count|content|contain|columns|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|column-break-before|column-break-after|column|color-profile|color-interpolation-filters|color|collapse|clip-rule|clip-path|clip|clear|character|chains|caption-side|break-inside|break-before|break-after|break|box-suppress|box-snap|box-sizing|box-shadow|box-pack|box-orient|box-ordinal-group|box-lines|box-flex-group|box-flex|box-direction|box-decoration-break|box-align|box|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-length|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-boundary|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|bookmark-target|bookmark-state|bookmark-level|bookmark-label|bookmark|bleed|binding|bidi|before|baseline-shift|baseline|balance|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-break|background-attachment|background|backface-visibility|azimuth|attachment|appearance|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|all|alignment-baseline|alignment-adjust|alignment|align-self|align-last|align-items|align-content|align|after|adjust)\b + name + support.type.property-name.css + + + + + begin + (:)\s* + beginCaptures + + 1 + + name + punctuation.separator.key-value.css + + + end + \s*(;|(?=\})) + endCaptures + + 1 + + name + punctuation.terminator.rule.css + + + name + meta.property-value.css + patterns + + + include + #property-values + + + + + + selector + + begin + \s*(?=[:.*#a-zA-Z]) + end + (?=[/@{)]) + name + meta.selector.css + patterns + + + match + \b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|main|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|samp|script|section|select|small|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\b + name + entity.name.tag.css + + + captures + + 1 + + name + punctuation.definition.entity.css + + + match + (\.)[a-zA-Z0-9_-]+ + name + entity.other.attribute-name.class.css + + + captures + + 1 + + name + punctuation.definition.entity.css + + + match + (#)[a-zA-Z][a-zA-Z0-9_-]* + name + entity.other.attribute-name.id.css + + + match + \* + name + entity.name.tag.wildcard.css + + + captures + + 1 + + name + punctuation.definition.entity.css + + + match + (:+)(after|before|first-letter|first-line|selection)\b + name + entity.other.attribute-name.pseudo-element.css + + + captures + + 1 + + name + punctuation.definition.entity.css + + + match + (:)((first|last)-child|(first|last|only)-of-type|empty|root|target|first|left|right)\b + name + entity.other.attribute-name.pseudo-class.css + + + captures + + 1 + + name + punctuation.definition.entity.css + + + match + (:)(checked|enabled|default|disabled|indeterminate|invalid|optional|required|valid)\b + name + entity.other.attribute-name.pseudo-class.ui-state.css + + + begin + ((:)not)(\() + beginCaptures + + 1 + + name + entity.other.attribute-name.pseudo-class.css + + 2 + + name + punctuation.definition.entity.css + + 3 + + name + punctuation.section.function.css + + + end + \) + endCaptures + + 0 + + name + punctuation.section.function.css + + + patterns + + + include + #selector + + + + + captures + + 1 + + name + entity.other.attribute-name.pseudo-class.css + + 2 + + name + punctuation.definition.entity.css + + 3 + + name + punctuation.section.function.css + + 4 + + name + constant.numeric.css + + 5 + + name + punctuation.section.function.css + + + match + ((:)nth-(?:(?:last-)?child|(?:last-)?of-type))(\()(\-?(?:\d+n?|n)(?:\+\d+)?|even|odd)(\)) + + + captures + + 1 + + name + punctuation.definition.entity.css + + + match + (:)(active|hover|link|visited|focus)\b + name + entity.other.attribute-name.pseudo-class.css + + + captures + + 1 + + name + punctuation.definition.entity.css + + 2 + + name + entity.other.attribute-name.attribute.css + + 3 + + name + punctuation.separator.operator.css + + 4 + + name + string.unquoted.attribute-value.css + + 5 + + name + string.quoted.double.attribute-value.css + + 6 + + name + punctuation.definition.string.begin.css + + 7 + + name + punctuation.definition.string.end.css + + + match + (?i)(\[)\s*(-?[_a-z\\[[:^ascii:]]][_a-z0-9\-\\[[:^ascii:]]]*)(?:\s*([~|^$*]?=)\s*(?:(-?[_a-z\\[[:^ascii:]]][_a-z0-9\-\\[[:^ascii:]]]*)|((?>(['"])(?:[^\\]|\\.)*?(\6)))))?\s*(\]) + name + meta.attribute-selector.css + + + + string-double + + begin + " + beginCaptures + + 0 + + name + punctuation.definition.string.begin.css + + + end + " + endCaptures + + 0 + + name + punctuation.definition.string.end.css + + + name + string.quoted.double.css + patterns + + + match + \\. + name + constant.character.escape.css + + + + string-single + + begin + ' + beginCaptures + + 0 + + name + punctuation.definition.string.begin.css + + + end + ' + endCaptures + + 0 + + name + punctuation.definition.string.end.css + + + name + string.quoted.single.css + patterns + + + match + \\. + name + constant.character.escape.css + + + + + scopeName + source.css + uuid + 69AA0917-B7BB-11D9-A7E2-000D93C8BE28 + + \ No newline at end of file diff --git a/src/file-viewer/highlight-grammar/diff.plist b/src/file-viewer/highlight-grammar/diff.plist new file mode 100644 index 0000000..1ca0ed7 --- /dev/null +++ b/src/file-viewer/highlight-grammar/diff.plist @@ -0,0 +1,268 @@ + + + + + fileTypes + + patch + diff + rej + + firstLineMatch + (?x)^ + (===\ modified\ file + |==== \s* // .+ \s - \s .+ \s+ ==== + |Index:\ + |---\ [^%\n] + |\*\*\*.*\d{4}\s*$ + |\d+(,\d+)* (a|d|c) \d+(,\d+)* $ + |diff\ --git\ + |commit\ [0-9a-f]{40}$ + ) + keyEquivalent + ^~D + name + Diff + patterns + + + captures + + 1 + + name + punctuation.definition.separator.diff + + + match + ^((\*{15})|(={67})|(-{3}))$\n? + name + meta.separator.diff + + + match + ^\d+(,\d+)*(a|d|c)\d+(,\d+)*$\n? + name + meta.diff.range.normal + + + captures + + 1 + + name + punctuation.definition.range.diff + + 2 + + name + meta.toc-list.line-number.diff + + 3 + + name + punctuation.definition.range.diff + + + match + ^(@@)\s*(.+?)\s*(@@.*)($\n?)? + name + meta.diff.range.unified + + + captures + + 3 + + name + punctuation.definition.range.diff + + 4 + + name + punctuation.definition.range.diff + + 6 + + name + punctuation.definition.range.diff + + 7 + + name + punctuation.definition.range.diff + + + match + ^(((\-{3}) .+ (\-{4}))|((\*{3}) .+ (\*{4})))$\n? + name + meta.diff.range.context + + + match + ^diff --git a/.*$\n? + name + meta.diff.header.git + + + match + ^diff (-|\S+\s+\S+).*$\n? + name + meta.diff.header.command + + + captures + + 4 + + name + punctuation.definition.from-file.diff + + 6 + + name + punctuation.definition.from-file.diff + + 7 + + name + punctuation.definition.from-file.diff + + + match + (^(((-{3}) .+)|((\*{3}) .+))$\n?|^(={4}) .+(?= - )) + name + meta.diff.header.from-file + + + captures + + 2 + + name + punctuation.definition.to-file.diff + + 3 + + name + punctuation.definition.to-file.diff + + 4 + + name + punctuation.definition.to-file.diff + + + match + (^(\+{3}) .+$\n?| (-) .* (={4})$\n?) + name + meta.diff.header.to-file + + + captures + + 3 + + name + punctuation.definition.inserted.diff + + 6 + + name + punctuation.definition.inserted.diff + + + match + ^(((>)( .*)?)|((\+).*))$\n? + name + markup.inserted.diff + + + captures + + 1 + + name + punctuation.definition.changed.diff + + + match + ^(!).*$\n? + name + markup.changed.diff + + + captures + + 3 + + name + punctuation.definition.deleted.diff + + 6 + + name + punctuation.definition.deleted.diff + + + match + ^(((<)( .*)?)|((-).*))$\n? + name + markup.deleted.diff + + + begin + ^(#) + captures + + 1 + + name + punctuation.definition.comment.diff + + + comment + Git produces unified diffs with embedded comments" + end + \n + name + comment.line.number-sign.diff + + + match + ^index [0-9a-f]{7,40}\.\.[0-9a-f]{7,40}.*$\n? + name + meta.diff.index.git + + + captures + + 1 + + name + punctuation.separator.key-value.diff + + 2 + + name + meta.toc-list.file-name.diff + + + match + ^Index(:) (.+)$\n? + name + meta.diff.index + + + match + ^Only in .*: .*$\n? + name + meta.diff.only-in + + + scopeName + source.diff + uuid + 7E848FF4-708E-11D9-97B4-0011242E4184 + + diff --git a/src/file-viewer/highlight-grammar/dosbatch.plist b/src/file-viewer/highlight-grammar/dosbatch.plist new file mode 100644 index 0000000..4990963 --- /dev/null +++ b/src/file-viewer/highlight-grammar/dosbatch.plist @@ -0,0 +1,169 @@ + + + + + uuid + E07EC438-7B75-4437-8AA1-DA94C1E6EACC + patterns + + + name + keyword.command.dosbatch + match + \b(?i)(?:append|assoc|at|attrib|break|cacls|cd|chcp|chdir|chkdsk|chkntfs|cls|cmd|color|comp|compact|convert|copy|date|del|dir|diskcomp|diskcopy|doskey|echo|endlocal|erase|fc|find|findstr|format|ftype|graftabl|help|keyb|label|md|mkdir|mode|more|move|path|pause|popd|print|prompt|pushd|rd|recover|ren|rename|replace|restore|rmdir|set|setlocal|shift|sort|start|subst|time|title|tree|type|ver|verify|vol|xcopy)\b + + + name + keyword.control.statement.dosbatch + match + \b(?i)(?:goto|call|exit)\b + + + name + keyword.control.conditional.if.dosbatch + match + \b(?i)if\s+((not)\s+)(exist|defined|errorlevel|cmdextversion)\b + + + name + keyword.control.conditional.dosbatch + match + \b(?i)(?:if|else)\b + + + name + keyword.control.repeat.dosbatch + match + \b(?i)for\b + + + name + keyword.operator.dosbatch + match + \b(?:EQU|NEQ|LSS|LEQ|GTR|GEQ)\b + + + name + comment.line.rem.dosbatch + match + \b(?i)rem(?:$|\s.*$) + + + name + comment.line.colons.dosbatch + match + \s*:\s*:.*$ + + + captures + + 1 + + name + variable.parameter.function.begin.shell + + + name + variable.parameter.function.dosbatch + match + (?i)(%)(~(?:f|d|p|n|x|s|a|t|z|\$[^:]*:)*)?\d + + + captures + + 1 + + name + variable.parameter.loop.begin.shell + + + name + variable.parameter.loop.dosbatch + match + (?i)(%%)(~(?:f|d|p|n|x|s|a|t|z|\$[^:]*:)*)?[a-z] + + + captures + + 1 + + name + variable.other.parsetime.begin.shell + + 2 + + name + variable.other.parsetime.end.shell + + + name + variable.other.parsetime.dosbatch + match + (%)[^%]+(%) + + + captures + + 1 + + name + variable.other.delayed.begin.shell + + 2 + + name + variable.other.delayed.end.shell + + + name + variable.other.delayed.dosbatch + match + (!)[^!]+(!) + + + begin + " + endCaptures + + 0 + + name + punctuation.definition.string.end.shell + + + beginCaptures + + 0 + + name + punctuation.definition.string.begin.shell + + + name + string.quoted.double.dosbatch + end + "|$ + + + name + keyword.operator.pipe.dosbatch + match + [|] + + + name + keyword.operator.redirect.shell + match + &>|\d*>&\d*|\d*(>>|>|<)|\d*<&|\d*<> + + + name + Batch File + scopeName + source.dosbatch + fileTypes + + bat + + + \ No newline at end of file diff --git a/src/file-viewer/highlight-grammar/json.plist b/src/file-viewer/highlight-grammar/json.plist new file mode 100644 index 0000000..29075b6 --- /dev/null +++ b/src/file-viewer/highlight-grammar/json.plist @@ -0,0 +1,386 @@ + + + + + fileTypes + + json + sublime-settings + sublime-menu + sublime-keymap + sublime-mousemap + sublime-theme + sublime-build + sublime-project + sublime-completions + + foldingStartMarker + (?x) # turn on extended mode + ^ # a line beginning with + \s* # some optional space + [{\[] # the start of an object or array + (?! # but not followed by + .* # whatever + [}\]] # and the close of an object or array + ,? # an optional comma + \s* # some optional space + $ # at the end of the line + ) + | # ...or... + [{\[] # the start of an object or array + \s* # some optional space + $ # at the end of the line + foldingStopMarker + (?x) # turn on extended mode + ^ # a line beginning with + \s* # some optional space + [}\]] # and the close of an object or array + keyEquivalent + ^~J + name + JSON (Javascript Next) + patterns + + + include + #value + + + repository + + array + + begin + \[ + beginCaptures + + 0 + + name + punctuation.definition.array.begin.json + + + end + \] + endCaptures + + 0 + + name + punctuation.definition.array.end.json + + + name + meta.structure.array.json + patterns + + + include + #value + + + match + , + name + punctuation.separator.array.json + + + match + [^\s\]] + name + invalid.illegal.expected-array-separator.json + + + + comments + + patterns + + + begin + /\*\*(?!/) + captures + + 0 + + name + punctuation.definition.comment.json + + + end + \*/ + name + comment.block.documentation.json + + + begin + /\* + captures + + 0 + + name + punctuation.definition.comment.json + + + end + \*/ + name + comment.block.json + + + captures + + 1 + + name + punctuation.definition.comment.json + + + match + (//).*$\n? + name + comment.line.double-slash.js + + + + constant + + match + \b(?:true|false|null)\b + name + constant.language.json + + number + + match + (?x) # turn on extended mode + -? # an optional minus + (?: + 0 # a zero + | # ...or... + [1-9] # a 1-9 character + \d* # followed by zero or more digits + ) + (?: + (?: + \. # a period + \d+ # followed by one or more digits + )? + (?: + [eE] # an e character + [+-]? # followed by an option +/- + \d+ # followed by one or more digits + )? # make exponent optional + )? # make decimal portion optional + name + constant.numeric.json + + object + + begin + \{ + beginCaptures + + 0 + + name + punctuation.definition.dictionary.begin.json + + + end + \} + endCaptures + + 0 + + name + punctuation.definition.dictionary.end.json + + + name + meta.structure.dictionary.json + patterns + + + comment + the JSON object key + include + #objectkey + + + include + #comments + + + begin + : + beginCaptures + + 0 + + name + punctuation.separator.dictionary.key-value.json + + + end + (,)|(?=\}) + endCaptures + + 1 + + name + punctuation.separator.dictionary.pair.json + + + name + meta.structure.dictionary.value.json + patterns + + + comment + the JSON object value + include + #value + + + match + [^\s,] + name + invalid.illegal.expected-dictionary-separator.json + + + + + match + [^\s\}] + name + invalid.illegal.expected-dictionary-separator.json + + + + string + + begin + " + beginCaptures + + 0 + + name + punctuation.definition.string.begin.json + + + end + " + endCaptures + + 0 + + name + punctuation.definition.string.end.json + + + name + string.quoted.double.json + patterns + + + include + #stringcontent + + + + objectkey + + begin + " + beginCaptures + + 0 + + name + punctuation.support.type.property-name.begin.json + + + end + " + endCaptures + + 0 + + name + punctuation.support.type.property-name.end.json + + + name + string.json support.type.property-name.json + patterns + + + include + #stringcontent + + + + stringcontent + + patterns + + + match + (?x) # turn on extended mode + \\ # a literal backslash + (?: # ...followed by... + ["\\/bfnrt] # one of these characters + | # ...or... + u # a u + [0-9a-fA-F]{4}) # and four hex digits + name + constant.character.escape.json + + + match + \\. + name + invalid.illegal.unrecognized-string-escape.json + + + + value + + patterns + + + include + #constant + + + include + #number + + + include + #string + + + include + #array + + + include + #object + + + include + #comments + + + + + scopeName + source.json + uuid + 8f97457b-516e-48ce-83c7-08ae12fb327a + + \ No newline at end of file diff --git a/src/file-viewer/highlight-grammar/lua.plist b/src/file-viewer/highlight-grammar/lua.plist new file mode 100644 index 0000000..e519492 --- /dev/null +++ b/src/file-viewer/highlight-grammar/lua.plist @@ -0,0 +1,1462 @@ + + + + + name + Lua + scopeName + source.lua + patterns + + + begin + \b(?:(local)\s+)?(function)\b(?![,:]) + beginCaptures + + 1 + + name + keyword.local.lua + + 2 + + name + keyword.control.lua + + + end + (?<=[\)\-{}\[\]"']) + name + meta.function.lua + patterns + + + include + #comment + + + begin + (\() + beginCaptures + + 1 + + name + punctuation.definition.parameters.begin.lua + + + end + (\))|(?=[\-\.{}\[\]"']) + endCaptures + + 1 + + name + punctuation.definition.parameters.finish.lua + + + name + meta.parameter.lua + patterns + + + include + #comment + + + match + [a-zA-Z_][a-zA-Z0-9_]* + name + variable.parameter.function.lua + + + match + , + name + punctuation.separator.arguments.lua + + + begin + : + beginCaptures + + 0 + + name + punctuation.separator.arguments.lua + + + end + (?=[\),]) + patterns + + + include + #emmydoc.type + + + + + + + match + \b([a-zA-Z_][a-zA-Z0-9_]*)\b\s*(?=:) + name + entity.name.class.lua + + + match + \b([a-zA-Z_][a-zA-Z0-9_]*)\b + name + entity.name.function.lua + + + + + match + (?<![\w\d.])0[xX][0-9A-Fa-f]+(\.[0-9A-Fa-f]*)?([eE]-?\d*)?([pP][-+]\d+)? + name + constant.numeric.float.hexadecimal.lua + + + match + (?<![\w\d.])0[xX]\.[0-9A-Fa-f]+([eE]-?\d*)?([pP][-+]\d+)? + name + constant.numeric.float.hexadecimal.lua + + + match + (?<![\w\d.])0[xX][0-9A-Fa-f]+(?![pPeE.0-9]) + name + constant.numeric.integer.hexadecimal.lua + + + match + (?<![\w\d.])\d+(\.\d*)?([eE]-?\d*)? + name + constant.numeric.float.lua + + + match + (?<![\w\d.])\.\d+([eE]-?\d*)? + name + constant.numeric.float.lua + + + match + (?<![\w\d.])\d+(?![pPeE.0-9]) + name + constant.numeric.integer.lua + + + include + #string + + + captures + + 1 + + name + punctuation.definition.comment.lua + + + match + \A(#!).*$\n? + name + comment.line.shebang.lua + + + include + #comment + + + captures + + 1 + + name + keyword.control.goto.lua + + 2 + + name + string.tag.lua + + + match + \b(goto)\s+([a-zA-Z_][a-zA-Z0-9_]*) + + + captures + + 1 + + name + punctuation.section.embedded.begin.lua + + 2 + + name + punctuation.section.embedded.end.lua + + + match + (::)\s*[a-zA-Z_][a-zA-Z0-9_]*\s*(::) + name + string.tag.lua + + + match + <\s*(const|close)\s*> + captures + + 0 + + name + storage.type.attribute.lua + + + + + match + \<[a-zA-Z_\*][a-zA-Z0-9_\.\*\-]*\> + name + storage.type.generic.lua + + + match + \b(break|do|else|for|if|elseif|goto|return|then|repeat|while|until|end|in)\b + name + keyword.control.lua + + + match + \b(local)\b + name + keyword.local.lua + + + match + \b(function)\b(?![,:]) + name + keyword.control.lua + + + match + (?<![^.]\.|:)\b(false|nil(?!:)|true|_ENV|_G|_VERSION|math\.(pi|huge|maxinteger|mininteger)|utf8\.charpattern|io\.(stdin|stdout|stderr)|package\.(config|cpath|loaded|loaders|path|preload|searchers))\b|(?<![.])\.{3}(?!\.) + name + constant.language.lua + + + match + (?<![^.]\.|:)\b(self)\b + name + variable.language.self.lua + + + match + (?<![^.]\.|:)\b(assert|collectgarbage|dofile|error|getfenv|getmetatable|ipairs|load|loadfile|loadstring|module|next|pairs|pcall|print|rawequal|rawget|rawlen|rawset|require|select|setfenv|setmetatable|tonumber|tostring|type|unpack|xpcall)\b(?!\s*=(?!=)) + name + support.function.lua + + + match + (?<![^.]\.|:)\b(async)\b(?!\s*=(?!=)) + name + entity.name.tag.lua + + + match + (?<![^.]\.|:)\b(coroutine\.(create|isyieldable|close|resume|running|status|wrap|yield)|string\.(byte|char|dump|find|format|gmatch|gsub|len|lower|match|pack|packsize|rep|reverse|sub|unpack|upper)|table\.(concat|insert|maxn|move|pack|remove|sort|unpack)|math\.(abs|acos|asin|atan2?|ceil|cosh?|deg|exp|floor|fmod|frexp|ldexp|log|log10|max|min|modf|pow|rad|random|randomseed|sinh?|sqrt|tanh?|tointeger|type)|io\.(close|flush|input|lines|open|output|popen|read|tmpfile|type|write)|os\.(clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)|package\.(loadlib|seeall|searchpath)|debug\.(debug|[gs]etfenv|[gs]ethook|getinfo|[gs]etlocal|[gs]etmetatable|getregistry|[gs]etupvalue|[gs]etuservalue|set[Cc]stacklimit|traceback|upvalueid|upvaluejoin)|bit32\.(arshift|band|bnot|bor|btest|bxor|extract|replace|lrotate|lshift|rrotate|rshift)|utf8\.(char|codes|codepoint|len|offset))\b(?!\s*=(?!=)) + name + support.function.library.lua + + + match + \b(and|or|not|\|\||\&\&|\!)\b + name + keyword.operator.lua + + + match + \b([a-zA-Z_][a-zA-Z0-9_]*)\b(?=\s*(?:[({"']|\[\[)) + name + support.function.any-method.lua + + + match + \b([a-zA-Z_][a-zA-Z0-9_]*)\b(?=\s*\??:) + name + entity.name.class.lua + + + match + (?<=[^.]\.|:)\b([a-zA-Z_][a-zA-Z0-9_]*)\b(?!\s*=\s*\b(function)\b) + name + entity.other.attribute.lua + + + match + \b([a-zA-Z_][a-zA-Z0-9_]*)\b(?!\s*=\s*\b(function)\b) + name + variable.other.lua + + + match + \b([a-zA-Z_][a-zA-Z0-9_]*)\b(?=\s*=\s*\b(function)\b) + name + entity.name.function.lua + + + match + \+|-|%|#|\*|\/|\^|==?|~=|!=|<=?|>=?|(?<!\.)\.{2}(?!\.) + name + keyword.operator.lua + + + repository + + escaped_char + + patterns + + + match + \\[abfnrtv\\"'\n] + name + constant.character.escape.lua + + + match + \\z[\n\t ]* + name + constant.character.escape.lua + + + match + \\\d{1,3} + name + constant.character.escape.byte.lua + + + match + \\x[0-9A-Fa-f][0-9A-Fa-f] + name + constant.character.escape.byte.lua + + + match + \\u\{[0-9A-Fa-f]+\} + name + constant.character.escape.unicode.lua + + + match + \\. + name + invalid.illegal.character.escape.lua + + + + string + + patterns + + + begin + ' + beginCaptures + + 0 + + name + punctuation.definition.string.begin.lua + + + end + '[ \t]*|(?=\n) + endCaptures + + 0 + + name + punctuation.definition.string.end.lua + + + name + string.quoted.single.lua + patterns + + + include + #escaped_char + + + + + begin + " + beginCaptures + + 0 + + name + punctuation.definition.string.begin.lua + + + end + "[ \t]*|(?=\n) + endCaptures + + 0 + + name + punctuation.definition.string.end.lua + + + name + string.quoted.double.lua + patterns + + + include + #escaped_char + + + + + begin + ` + beginCaptures + + 0 + + name + punctuation.definition.string.begin.lua + + + end + `[ \t]*|(?=\n) + endCaptures + + 0 + + name + punctuation.definition.string.end.lua + + + name + string.quoted.double.lua + + + begin + (?<=\.cdef)\s*(\[(=*)\[) + beginCaptures + + 0 + + name + string.quoted.other.multiline.lua + + 1 + + name + punctuation.definition.string.begin.lua + + + contentName + meta.embedded.lua + end + (\]\2\])[ \t]* + endCaptures + + 0 + + name + string.quoted.other.multiline.lua + + 1 + + name + punctuation.definition.string.end.lua + + + patterns + + + include + source.c + + + + + begin + (?<!--)\[(=*)\[ + beginCaptures + + 0 + + name + punctuation.definition.string.begin.lua + + + end + \]\1\][ \t]* + endCaptures + + 0 + + name + punctuation.definition.string.end.lua + + + name + string.quoted.other.multiline.lua + + + + comment + + patterns + + + begin + (^[ \t]+)?(?=--) + beginCaptures + + 1 + + name + punctuation.whitespace.comment.leading.lua + + + end + (?!\G)((?!^)[ \t]+\n)? + endCaptures + + 1 + + name + punctuation.whitespace.comment.trailing.lua + + + patterns + + + begin + --\[(=*)\[@@@ + beginCaptures + + 0 + + name + punctuation.definition.comment.begin.lua + + + end + (--)?\]\1\] + endCaptures + + 0 + + name + punctuation.definition.comment.end.lua + + + name + + patterns + + + include + source.lua + + + + + begin + --\[(=*)\[ + beginCaptures + + 0 + + name + punctuation.definition.comment.begin.lua + + + end + (--)?\]\1\] + endCaptures + + 0 + + name + punctuation.definition.comment.end.lua + + + name + comment.block.lua + patterns + + + include + #emmydoc + + + include + #ldoc_tag + + + + + begin + ---- + beginCaptures + + 0 + + name + punctuation.definition.comment.lua + + + end + \n + name + comment.line.double-dash.lua + + + begin + --- + beginCaptures + + 0 + + name + punctuation.definition.comment.lua + + + end + \n + name + comment.line.double-dash.documentation.lua + patterns + + + include + #emmydoc + + + include + #ldoc_tag + + + + + begin + -- + beginCaptures + + 0 + + name + punctuation.definition.comment.lua + + + end + \n + name + comment.line.double-dash.lua + patterns + + + include + #ldoc_tag + + + + + + + begin + \/\* + beginCaptures + + 0 + + name + punctuation.definition.comment.begin.lua + + + end + \*\/ + endCaptures + + 0 + + name + punctuation.definition.comment.end.lua + + + name + comment.block.lua + patterns + + + include + #emmydoc + + + include + #ldoc_tag + + + + + + emmydoc + + patterns + + + begin + (?<=---)[ \t]*@class + beginCaptures + + 0 + + name + storage.type.annotation.lua + + + end + (?=[\n@#]) + patterns + + + match + \b([a-zA-Z_\*][a-zA-Z0-9_\.\*\-]*) + name + support.class.lua + + + match + :|, + name + keyword.operator.lua + + + + + begin + (?<=---)[ \t]*@enum + beginCaptures + + 0 + + name + storage.type.annotation.lua + + + end + (?=[\n@#]) + patterns + + + begin + \b([a-zA-Z_\*][a-zA-Z0-9_\.\*\-]*) + beginCaptures + + 0 + + name + variable.lua + + + end + (?=\n) + + + + + begin + (?<=---)[ \t]*@type + beginCaptures + + 0 + + name + storage.type.annotation.lua + + + end + (?=[\n@#]) + patterns + + + include + #emmydoc.type + + + + + begin + (?<=---)[ \t]*@alias + beginCaptures + + 0 + + name + storage.type.annotation.lua + + + end + (?=[\n@#]) + patterns + + + begin + \b([a-zA-Z_\*][a-zA-Z0-9_\.\*\-]*) + beginCaptures + + 0 + + name + variable.lua + + + end + (?=[\n#]) + patterns + + + include + #emmydoc.type + + + + + + + begin + (?<=---)[ \t]*(@operator)\s*(\b[a-z]+)? + beginCaptures + + 1 + + name + storage.type.annotation.lua + + 2 + + name + support.function.library.lua + + + end + (?=[\n@#]) + patterns + + + include + #emmydoc.type + + + + + begin + (?<=---)[ \t]*@cast + beginCaptures + + 0 + + name + storage.type.annotation.lua + + + end + (?=[\n@#]) + patterns + + + begin + \b([a-zA-Z_\*][a-zA-Z0-9_\.\*\-]*) + beginCaptures + + 0 + + name + variable.other.lua + + + end + (?=\n) + patterns + + + include + #emmydoc.type + + + match + ([+-|]) + name + keyword.operator.lua + + + + + + + begin + (?<=---)[ \t]*@param + beginCaptures + + 0 + + name + storage.type.annotation.lua + + + end + (?=[\n@#]) + patterns + + + begin + \b([a-zA-Z_][a-zA-Z0-9_]*)\b(\??) + beginCaptures + + 1 + + name + entity.name.variable.lua + + 2 + + name + keyword.operator.lua + + + end + (?=[\n#]) + patterns + + + include + #emmydoc.type + + + + + + + begin + (?<=---)[ \t]*@return + beginCaptures + + 0 + + name + storage.type.annotation.lua + + + end + (?=[\n@#]) + patterns + + + match + \? + name + keyword.operator.lua + + + include + #emmydoc.type + + + + + begin + (?<=---)[ \t]*@field + beginCaptures + + 0 + + name + storage.type.annotation.lua + + + end + (?=[\n@#]) + patterns + + + begin + (\b([a-zA-Z_][a-zA-Z0-9_]*)\b|(\[))(\??) + beginCaptures + + 2 + + name + entity.name.variable.lua + + 3 + + name + keyword.operator.lua + + + end + (?=[\n#]) + patterns + + + include + #string + + + include + #emmydoc.type + + + match + \] + name + keyword.operator.lua + + + + + + + begin + (?<=---)[ \t]*@generic + beginCaptures + + 0 + + name + storage.type.annotation.lua + + + end + (?=[\n@#]) + patterns + + + begin + \b([a-zA-Z_][a-zA-Z0-9_]*)\b + beginCaptures + + 0 + + name + storage.type.generic.lua + + + end + (?=\n)|(,) + endCaptures + + 0 + + name + keyword.operator.lua + + + patterns + + + match + : + name + keyword.operator.lua + + + include + #emmydoc.type + + + + + + + begin + (?<=---)[ \t]*@vararg + beginCaptures + + 0 + + name + storage.type.annotation.lua + + + end + (?=[\n@#]) + patterns + + + include + #emmydoc.type + + + + + begin + (?<=---)[ \t]*@overload + beginCaptures + + 0 + + name + storage.type.annotation.lua + + + end + (?=[\n@#]) + patterns + + + include + #emmydoc.type + + + + + begin + (?<=---)[ \t]*@deprecated + beginCaptures + + 0 + + name + storage.type.annotation.lua + + + end + (?=[\n@#]) + + + begin + (?<=---)[ \t]*@meta + beginCaptures + + 0 + + name + storage.type.annotation.lua + + + end + (?=[\n@#]) + + + begin + (?<=---)[ \t]*@private + beginCaptures + + 0 + + name + storage.type.annotation.lua + + + end + (?=[\n@#]) + + + begin + (?<=---)[ \t]*@protected + beginCaptures + + 0 + + name + storage.type.annotation.lua + + + end + (?=[\n@#]) + + + begin + (?<=---)[ \t]*@package + beginCaptures + + 0 + + name + storage.type.annotation.lua + + + end + (?=[\n@#]) + + + begin + (?<=---)[ \t]*@version + beginCaptures + + 0 + + name + storage.type.annotation.lua + + + end + (?=[\n@#]) + patterns + + + match + \b(5\.1|5\.2|5\.3|5\.4|JIT)\b + name + support.class.lua + + + match + ,|\>|\< + name + keyword.operator.lua + + + + + begin + (?<=---)[ \t]*@see + beginCaptures + + 0 + + name + storage.type.annotation.lua + + + end + (?=[\n@#]) + patterns + + + match + \b([a-zA-Z_\*][a-zA-Z0-9_\.\*\-]*) + name + support.class.lua + + + match + # + name + keyword.operator.lua + + + + + begin + (?<=---)[ \t]*@diagnostic + beginCaptures + + 0 + + name + storage.type.annotation.lua + + + end + (?=[\n@#]) + patterns + + + begin + ([a-zA-Z_\-0-9]+)[ \t]*(:)? + beginCaptures + + 1 + + name + keyword.other.unit + + 2 + + name + keyword.operator.unit + + + end + (?=\n) + patterns + + + match + \b([a-zA-Z_\*][a-zA-Z0-9_\-]*) + name + support.class.lua + + + match + , + name + keyword.operator.lua + + + + + + + begin + (?<=---)[ \t]*@module + beginCaptures + + 0 + + name + storage.type.annotation.lua + + + end + (?=[\n@#]) + patterns + + + include + #string + + + + + match + (?<=---)[ \t]*@(async|nodiscard) + name + storage.type.annotation.lua + + + begin + (?<=---)\|\s*[\>\+]? + beginCaptures + + 0 + + name + storage.type.annotation.lua + + + end + (?=[\n@#]) + patterns + + + include + #string + + + + + + emmydoc.type + + patterns + + + begin + \bfun\b + beginCaptures + + 0 + + name + keyword.control.lua + + + end + (?=[\s#]) + patterns + + + match + [\(\),:\?][ \t]* + name + keyword.operator.lua + + + match + ([a-zA-Z_][a-zA-Z0-9_\.\*\[\]\<\>\,\-]*)(?<!,)[ \t]*(?=\??:) + name + entity.name.variable.lua + + + include + #emmydoc.type + + + include + #string + + + + + match + \<[a-zA-Z_\*][a-zA-Z0-9_\.\*\-]*\> + name + storage.type.generic.lua + + + match + \basync\b + name + entity.name.tag.lua + + + match + [\{\}\:\,\?\|\`][ \t]* + name + keyword.operator.lua + + + begin + (?=[a-zA-Z_\.\*"'\[]) + end + (?=[\s\)\,\?\:\}\|#]) + patterns + + + match + ([a-zA-Z0-9_\.\*\[\]\<\>\,\-]+)(?<!,)[ \t]* + name + support.type.lua + + + match + (\.\.\.)[ \t]* + name + constant.language.lua + + + include + #string + + + + + + ldoc_tag + + match + \G[ \t]*(@)(alias|annotation|author|charset|class|classmod|comment|constructor|copyright|description|example|export|factory|field|file|fixme|function|include|lfunction|license|local|module|name|param|pragma|private|raise|release|return|script|section|see|set|static|submodule|summary|tfield|thread|tparam|treturn|todo|topic|type|usage|warning|within)\b + captures + + 1 + + name + punctuation.definition.block.tag.ldoc + + 2 + + name + storage.type.class.ldoc + + + + + + \ No newline at end of file diff --git a/src/file-viewer/highlight-grammar/mdx.plist b/src/file-viewer/highlight-grammar/mdx.plist new file mode 100644 index 0000000..bc24b8e --- /dev/null +++ b/src/file-viewer/highlight-grammar/mdx.plist @@ -0,0 +1,9527 @@ + + + + + fileTypes + + mdx + + name + MDX + patterns + + + include + #markdown-frontmatter + + + include + #markdown-sections + + + repository + + markdown-frontmatter + + patterns + + + include + #extension-toml + + + include + #extension-yaml + + + + markdown-sections + + patterns + + + include + #commonmark-block-quote + + + include + #commonmark-code-fenced + + + include + #extension-gfm-footnote-definition + + + include + #commonmark-definition + + + include + #commonmark-heading-atx + + + include + #commonmark-thematic-break + + + include + #commonmark-heading-setext + + + include + #commonmark-list-item + + + include + #extension-gfm-table + + + include + #extension-math-flow + + + include + #extension-mdx-esm + + + include + #extension-mdx-expression-flow + + + include + #extension-mdx-jsx-flow + + + include + #commonmark-paragraph + + + + markdown-string + + patterns + + + include + #commonmark-character-escape + + + include + #commonmark-character-reference + + + + markdown-text + + patterns + + + include + #commonmark-attention + + + include + #commonmark-character-escape + + + include + #commonmark-character-reference + + + include + #commonmark-code-text + + + include + #commonmark-hard-break-trailing + + + include + #commonmark-hard-break-escape + + + include + #commonmark-label-end + + + include + #extension-gfm-footnote-call + + + include + #commonmark-label-start + + + include + #extension-gfm-autolink-literal + + + include + #extension-gfm-strikethrough + + + include + #extension-github-gemoji + + + include + #extension-github-mention + + + include + #extension-github-reference + + + include + #extension-math-text + + + include + #extension-mdx-expression-text + + + include + #extension-mdx-jsx-text + + + + commonmark-attention + + patterns + + + match + (?<=\S)\*{3,}|\*{3,}(?=\S) + name + string.other.strong.emphasis.asterisk.mdx + + + match + (?<=[\p{L}\p{N}])_{3,}(?![\p{L}\p{N}])|(?<=\p{P})_{3,}|(?<![\p{L}\p{N}]|\p{P})_{3,}(?!\s) + name + string.other.strong.emphasis.underscore.mdx + + + match + (?<=\S)\*{2}|\*{2}(?=\S) + name + string.other.strong.asterisk.mdx + + + match + (?<=[\p{L}\p{N}])_{2}(?![\p{L}\p{N}])|(?<=\p{P})_{2}|(?<![\p{L}\p{N}]|\p{P})_{2}(?!\s) + name + string.other.strong.underscore.mdx + + + match + (?<=\S)\*|\*(?=\S) + name + string.other.emphasis.asterisk.mdx + + + match + (?<=[\p{L}\p{N}])_(?![\p{L}\p{N}])|(?<=\p{P})_|(?<![\p{L}\p{N}]|\p{P})_(?!\s) + name + string.other.emphasis.underscore.mdx + + + + commonmark-block-quote + + begin + (?:^|\G)[\t ]*(>)[ ]? + beginCaptures + + 0 + + name + markup.quote.mdx + + 1 + + name + punctuation.definition.quote.begin.mdx + + + patterns + + + include + #markdown-sections + + + name + markup.quote.mdx + while + (>)[ ]? + whileCaptures + + 0 + + name + markup.quote.mdx + + 1 + + name + punctuation.definition.quote.begin.mdx + + + + commonmark-character-escape + + match + \\(?:[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]) + name + constant.language.character-escape.mdx + + commonmark-character-reference + + patterns + + + include + #whatwg-html-data-character-reference-named-terminated + + + match + (&)(#)([Xx])([0-9A-Fa-f]{1,6})(;) + name + constant.language.character-reference.numeric.hexadecimal.html + captures + + 1 + + name + punctuation.definition.character-reference.begin.html + + 2 + + name + punctuation.definition.character-reference.numeric.html + + 3 + + name + punctuation.definition.character-reference.numeric.hexadecimal.html + + 4 + + name + constant.numeric.integer.hexadecimal.html + + 5 + + name + punctuation.definition.character-reference.end.html + + + + + match + (&)(#)([0-9]{1,7})(;) + name + constant.language.character-reference.numeric.decimal.html + captures + + 1 + + name + punctuation.definition.character-reference.begin.html + + 2 + + name + punctuation.definition.character-reference.numeric.html + + 3 + + name + constant.numeric.integer.decimal.html + + 4 + + name + punctuation.definition.character-reference.end.html + + + + + + commonmark-code-fenced + + patterns + + + include + #commonmark-code-fenced-apib + + + include + #commonmark-code-fenced-asciidoc + + + include + #commonmark-code-fenced-c + + + include + #commonmark-code-fenced-clojure + + + include + #commonmark-code-fenced-coffee + + + include + #commonmark-code-fenced-console + + + include + #commonmark-code-fenced-cpp + + + include + #commonmark-code-fenced-cs + + + include + #commonmark-code-fenced-css + + + include + #commonmark-code-fenced-diff + + + include + #commonmark-code-fenced-dockerfile + + + include + #commonmark-code-fenced-elixir + + + include + #commonmark-code-fenced-elm + + + include + #commonmark-code-fenced-erlang + + + include + #commonmark-code-fenced-gitconfig + + + include + #commonmark-code-fenced-go + + + include + #commonmark-code-fenced-graphql + + + include + #commonmark-code-fenced-haskell + + + include + #commonmark-code-fenced-html + + + include + #commonmark-code-fenced-ini + + + include + #commonmark-code-fenced-java + + + include + #commonmark-code-fenced-js + + + include + #commonmark-code-fenced-json + + + include + #commonmark-code-fenced-julia + + + include + #commonmark-code-fenced-kotlin + + + include + #commonmark-code-fenced-less + + + include + #commonmark-code-fenced-less + + + include + #commonmark-code-fenced-lua + + + include + #commonmark-code-fenced-makefile + + + include + #commonmark-code-fenced-md + + + include + #commonmark-code-fenced-mdx + + + include + #commonmark-code-fenced-objc + + + include + #commonmark-code-fenced-perl + + + include + #commonmark-code-fenced-php + + + include + #commonmark-code-fenced-php + + + include + #commonmark-code-fenced-python + + + include + #commonmark-code-fenced-r + + + include + #commonmark-code-fenced-raku + + + include + #commonmark-code-fenced-ruby + + + include + #commonmark-code-fenced-rust + + + include + #commonmark-code-fenced-scala + + + include + #commonmark-code-fenced-scss + + + include + #commonmark-code-fenced-shell + + + include + #commonmark-code-fenced-shell-session + + + include + #commonmark-code-fenced-sql + + + include + #commonmark-code-fenced-svg + + + include + #commonmark-code-fenced-swift + + + include + #commonmark-code-fenced-toml + + + include + #commonmark-code-fenced-ts + + + include + #commonmark-code-fenced-tsx + + + include + #commonmark-code-fenced-vbnet + + + include + #commonmark-code-fenced-xml + + + include + #commonmark-code-fenced-yaml + + + include + #commonmark-code-fenced-unknown + + + + commonmark-code-fenced-unknown + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?:[^\t\n\r` ])+)(?:[\t ]+((?:[^\n\r`])+))?)?(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + contentName + markup.raw.code.fenced.mdx + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.other.mdx + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?:[^\t\n\r ])+)(?:[\t ]+((?:[^\n\r])+))?)?(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + contentName + markup.raw.code.fenced.mdx + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.other.mdx + + + + commonmark-code-text + + match + (?<!`)(`+)(?!`)(.+?)(?<!`)(\1)(?!`) + name + markup.code.other.mdx + captures + + 1 + + name + string.other.begin.code.mdx + + 2 + + name + markup.raw.code.mdx markup.inline.raw.code.mdx + + 3 + + name + string.other.end.code.mdx + + + + commonmark-definition + + match + (?:^|\G)[\t ]*(\[)((?:[^\[\\\]]|\\[\[\\\]]?)+?)(\])(:)[ \t]*(?:(<)((?:[^\n<\\>]|\\[<\\>]?)*)(>)|(\g<destination_raw>))(?:[\t ]+(?:(")((?:[^"\\]|\\["\\]?)*)(")|(')((?:[^'\\]|\\['\\]?)*)(')|(\()((?:[^\)\\]|\\[\)\\]?)*)(\))))?$(?<destination_raw>(?!\<)(?:(?:[^\p{Cc}\ \\\(\)]|\\[\(\)\\]?)|\(\g<destination_raw>*\))+){0} + name + meta.link.reference.def.mdx + captures + + 1 + + name + string.other.begin.mdx + + 2 + + name + entity.name.identifier.mdx + patterns + + + include + #markdown-string + + + + 3 + + name + string.other.end.mdx + + 4 + + name + punctuation.separator.key-value.mdx + + 5 + + name + string.other.begin.destination.mdx + + 6 + + name + string.other.link.destination.mdx + patterns + + + include + #markdown-string + + + + 7 + + name + string.other.end.destination.mdx + + 8 + + name + string.other.link.destination.mdx + patterns + + + include + #markdown-string + + + + 9 + + name + string.other.begin.mdx + + 10 + + name + string.quoted.double.mdx + patterns + + + include + #markdown-string + + + + 11 + + name + string.other.end.mdx + + 12 + + name + string.other.begin.mdx + + 13 + + name + string.quoted.single.mdx + patterns + + + include + #markdown-string + + + + 14 + + name + string.other.end.mdx + + 15 + + name + string.other.begin.mdx + + 16 + + name + string.quoted.paren.mdx + patterns + + + include + #markdown-string + + + + 17 + + name + string.other.end.mdx + + + + commonmark-hard-break-escape + + match + \\$ + name + constant.language.character-escape.line-ending.mdx + + commonmark-hard-break-trailing + + match + ( ){2,}$ + name + carriage-return constant.language.character-escape.line-ending.mdx + + commonmark-heading-atx + + patterns + + + match + (?:^|\G)[\t ]*(#{1}(?!#))(?:[ \t]+([^\r\n]+?)(?:[ \t]+(#+?))?)?[ \t]*$ + name + markup.heading.atx.1.mdx + captures + + 1 + + name + punctuation.definition.heading.mdx + + 2 + + name + entity.name.section.mdx + patterns + + + include + #markdown-text + + + + 3 + + name + punctuation.definition.heading.mdx + + + + + match + (?:^|\G)[\t ]*(#{2}(?!#))(?:[ \t]+([^\r\n]+?)(?:[ \t]+(#+?))?)?[ \t]*$ + name + markup.heading.atx.2.mdx + captures + + 1 + + name + punctuation.definition.heading.mdx + + 2 + + name + entity.name.section.mdx + patterns + + + include + #markdown-text + + + + 3 + + name + punctuation.definition.heading.mdx + + + + + match + (?:^|\G)[\t ]*(#{3}(?!#))(?:[ \t]+([^\r\n]+?)(?:[ \t]+(#+?))?)?[ \t]*$ + name + markup.heading.atx.3.mdx + captures + + 1 + + name + punctuation.definition.heading.mdx + + 2 + + name + entity.name.section.mdx + patterns + + + include + #markdown-text + + + + 3 + + name + punctuation.definition.heading.mdx + + + + + match + (?:^|\G)[\t ]*(#{4}(?!#))(?:[ \t]+([^\r\n]+?)(?:[ \t]+(#+?))?)?[ \t]*$ + name + markup.heading.atx.4.mdx + captures + + 1 + + name + punctuation.definition.heading.mdx + + 2 + + name + entity.name.section.mdx + patterns + + + include + #markdown-text + + + + 3 + + name + punctuation.definition.heading.mdx + + + + + match + (?:^|\G)[\t ]*(#{5}(?!#))(?:[ \t]+([^\r\n]+?)(?:[ \t]+(#+?))?)?[ \t]*$ + name + markup.heading.atx.5.mdx + captures + + 1 + + name + punctuation.definition.heading.mdx + + 2 + + name + entity.name.section.mdx + patterns + + + include + #markdown-text + + + + 3 + + name + punctuation.definition.heading.mdx + + + + + match + (?:^|\G)[\t ]*(#{6}(?!#))(?:[ \t]+([^\r\n]+?)(?:[ \t]+(#+?))?)?[ \t]*$ + name + markup.heading.atx.6.mdx + captures + + 1 + + name + punctuation.definition.heading.mdx + + 2 + + name + entity.name.section.mdx + patterns + + + include + #markdown-text + + + + 3 + + name + punctuation.definition.heading.mdx + + + + + + commonmark-heading-setext + + patterns + + + match + (?:^|\G)[\t ]*(={1,})[ \t]*$ + name + markup.heading.setext.1.mdx + + + match + (?:^|\G)[\t ]*(-{1,})[ \t]*$ + name + markup.heading.setext.2.mdx + + + + commonmark-label-end + + patterns + + + match + (\])(\()[\t ]*(?:(?:(<)((?:[^\n<\\>]|\\[<\\>]?)*)(>)|(\g<destination_raw>))(?:[\t ]+(?:(")((?:[^"\\]|\\["\\]?)*)(")|(')((?:[^'\\]|\\['\\]?)*)(')|(\()((?:[^\)\\]|\\[\)\\]?)*)(\))))?)?[\t ]*(\))(?<destination_raw>(?!\<)(?:(?:[^\p{Cc}\ \\\(\)]|\\[\(\)\\]?)|\(\g<destination_raw>*\))+){0} + captures + + 1 + + name + string.other.end.mdx + + 2 + + name + string.other.begin.mdx + + 3 + + name + string.other.begin.destination.mdx + + 4 + + name + string.other.link.destination.mdx + patterns + + + include + #markdown-string + + + + 5 + + name + string.other.end.destination.mdx + + 6 + + name + string.other.link.destination.mdx + patterns + + + include + #markdown-string + + + + 7 + + name + string.other.begin.mdx + + 8 + + name + string.quoted.double.mdx + patterns + + + include + #markdown-string + + + + 9 + + name + string.other.end.mdx + + 10 + + name + string.other.begin.mdx + + 11 + + name + string.quoted.single.mdx + patterns + + + include + #markdown-string + + + + 12 + + name + string.other.end.mdx + + 13 + + name + string.other.begin.mdx + + 14 + + name + string.quoted.paren.mdx + patterns + + + include + #markdown-string + + + + 15 + + name + string.other.end.mdx + + 16 + + name + string.other.end.mdx + + + + + match + (\])(\[)((?:[^\[\\\]]|\\[\[\\\]]?)+?)(\]) + captures + + 1 + + name + string.other.end.mdx + + 2 + + name + string.other.begin.mdx + + 3 + + name + entity.name.identifier.mdx + patterns + + + include + #markdown-string + + + + 4 + + name + string.other.end.mdx + + + + + match + (\]) + captures + + 1 + + name + string.other.end.mdx + + + + + + commonmark-label-start + + patterns + + + match + \!\[(?!\^) + name + string.other.begin.image.mdx + + + match + \[ + name + string.other.begin.link.mdx + + + + commonmark-list-item + + patterns + + + begin + (?:^|\G)[\t ]*((?:[*+-]))(?:[ ]{4}(?![ ])|\t)(\[[\t Xx]\](?=[\t\n\r ]+(?:$|[^\t\n\r ])))? + beginCaptures + + 1 + + name + variable.unordered.list.mdx + + 2 + + name + keyword.other.tasklist.mdx + + + patterns + + + include + #markdown-sections + + + while + ^(?=[\t ]*$)|(?:^|\G)(?:[ ]{4}|\t)[ ]{1} + + + begin + (?:^|\G)[\t ]*((?:[*+-]))(?:[ ]{3}(?![ ]))(\[[\t Xx]\](?=[\t\n\r ]+(?:$|[^\t\n\r ])))? + beginCaptures + + 1 + + name + variable.unordered.list.mdx + + 2 + + name + keyword.other.tasklist.mdx + + + patterns + + + include + #markdown-sections + + + while + ^(?=[\t ]*$)|(?:^|\G)(?:[ ]{4}|\t) + + + begin + (?:^|\G)[\t ]*((?:[*+-]))(?:[ ]{2}(?![ ]))(\[[\t Xx]\](?=[\t\n\r ]+(?:$|[^\t\n\r ])))? + beginCaptures + + 1 + + name + variable.unordered.list.mdx + + 2 + + name + keyword.other.tasklist.mdx + + + patterns + + + include + #markdown-sections + + + while + ^(?=[\t ]*$)|(?:^|\G)[ ]{3} + + + begin + (?:^|\G)[\t ]*((?:[*+-]))(?:[ ]{1}|(?=\n))(\[[\t Xx]\](?=[\t\n\r ]+(?:$|[^\t\n\r ])))? + beginCaptures + + 1 + + name + variable.unordered.list.mdx + + 2 + + name + keyword.other.tasklist.mdx + + + patterns + + + include + #markdown-sections + + + while + ^(?=[\t ]*$)|(?:^|\G)[ ]{2} + + + begin + (?:^|\G)[\t ]*([0-9]{9})((?:\.|\)))(?:[ ]{4}(?![ ])|\t(?![\t ]))(\[[\t Xx]\](?=[\t\n\r ]+(?:$|[^\t\n\r ])))? + beginCaptures + + 1 + + name + string.other.number.mdx + + 2 + + name + variable.ordered.list.mdx + + 3 + + name + keyword.other.tasklist.mdx + + + patterns + + + include + #markdown-sections + + + while + ^(?=[\t ]*$)|(?:^|\G)(?:[ ]{4}|\t){3}[ ]{2} + + + begin + (?:^|\G)[\t ]*(?:([0-9]{9})((?:\.|\)))(?:[ ]{3}(?![ ]))|([0-9]{8})((?:\.|\)))(?:[ ]{4}(?![ ])))(\[[\t Xx]\](?=[\t\n\r ]+(?:$|[^\t\n\r ])))? + beginCaptures + + 1 + + name + string.other.number.mdx + + 2 + + name + variable.ordered.list.mdx + + 3 + + name + string.other.number.mdx + + 4 + + name + variable.ordered.list.mdx + + 5 + + name + keyword.other.tasklist.mdx + + + patterns + + + include + #markdown-sections + + + while + ^(?=[\t ]*$)|(?:^|\G)(?:[ ]{4}|\t){3}[ ]{1} + + + begin + (?:^|\G)[\t ]*(?:([0-9]{9})((?:\.|\)))(?:[ ]{2}(?![ ]))|([0-9]{8})((?:\.|\)))(?:[ ]{3}(?![ ]))|([0-9]{7})((?:\.|\)))(?:[ ]{4}(?![ ])))(\[[\t Xx]\](?=[\t\n\r ]+(?:$|[^\t\n\r ])))? + beginCaptures + + 1 + + name + string.other.number.mdx + + 2 + + name + variable.ordered.list.mdx + + 3 + + name + string.other.number.mdx + + 4 + + name + variable.ordered.list.mdx + + 5 + + name + string.other.number.mdx + + 6 + + name + variable.ordered.list.mdx + + 7 + + name + keyword.other.tasklist.mdx + + + patterns + + + include + #markdown-sections + + + while + ^(?=[\t ]*$)|(?:^|\G)(?:[ ]{4}|\t){3} + + + begin + (?:^|\G)[\t ]*(?:([0-9]{9})((?:\.|\)))(?:[ ]{1}|(?=[ \t]*\n))|([0-9]{8})((?:\.|\)))(?:[ ]{2}(?![ ]))|([0-9]{7})((?:\.|\)))(?:[ ]{3}(?![ ]))|([0-9]{6})((?:\.|\)))(?:[ ]{4}(?![ ])))(\[[\t Xx]\](?=[\t\n\r ]+(?:$|[^\t\n\r ])))? + beginCaptures + + 1 + + name + string.other.number.mdx + + 2 + + name + variable.ordered.list.mdx + + 3 + + name + string.other.number.mdx + + 4 + + name + variable.ordered.list.mdx + + 5 + + name + string.other.number.mdx + + 6 + + name + variable.ordered.list.mdx + + 7 + + name + string.other.number.mdx + + 8 + + name + variable.ordered.list.mdx + + 9 + + name + keyword.other.tasklist.mdx + + + patterns + + + include + #markdown-sections + + + while + ^(?=[\t ]*$)|(?:^|\G)(?:[ ]{4}|\t){2}[ ]{3} + + + begin + (?:^|\G)[\t ]*(?:([0-9]{8})((?:\.|\)))(?:[ ]{1}|(?=[ \t]*\n))|([0-9]{7})((?:\.|\)))(?:[ ]{2}(?![ ]))|([0-9]{6})((?:\.|\)))(?:[ ]{3}(?![ ]))|([0-9]{5})((?:\.|\)))(?:[ ]{4}(?![ ])))(\[[\t Xx]\](?=[\t\n\r ]+(?:$|[^\t\n\r ])))? + beginCaptures + + 1 + + name + string.other.number.mdx + + 2 + + name + variable.ordered.list.mdx + + 3 + + name + string.other.number.mdx + + 4 + + name + variable.ordered.list.mdx + + 5 + + name + string.other.number.mdx + + 6 + + name + variable.ordered.list.mdx + + 7 + + name + string.other.number.mdx + + 8 + + name + variable.ordered.list.mdx + + 9 + + name + keyword.other.tasklist.mdx + + + patterns + + + include + #markdown-sections + + + while + ^(?=[\t ]*$)|(?:^|\G)(?:[ ]{4}|\t){2}[ ]{2} + + + begin + (?:^|\G)[\t ]*(?:([0-9]{7})((?:\.|\)))(?:[ ]{1}|(?=[ \t]*\n))|([0-9]{6})((?:\.|\)))(?:[ ]{2}(?![ ]))|([0-9]{5})((?:\.|\)))(?:[ ]{3}(?![ ]))|([0-9]{4})((?:\.|\)))(?:[ ]{4}(?![ ])))(\[[\t Xx]\](?=[\t\n\r ]+(?:$|[^\t\n\r ])))? + beginCaptures + + 1 + + name + string.other.number.mdx + + 2 + + name + variable.ordered.list.mdx + + 3 + + name + string.other.number.mdx + + 4 + + name + variable.ordered.list.mdx + + 5 + + name + string.other.number.mdx + + 6 + + name + variable.ordered.list.mdx + + 7 + + name + string.other.number.mdx + + 8 + + name + variable.ordered.list.mdx + + 9 + + name + keyword.other.tasklist.mdx + + + patterns + + + include + #markdown-sections + + + while + ^(?=[\t ]*$)|(?:^|\G)(?:[ ]{4}|\t){2}[ ]{1} + + + begin + (?:^|\G)[\t ]*(?:([0-9]{6})((?:\.|\)))(?:[ ]{1}|(?=[ \t]*\n))|([0-9]{5})((?:\.|\)))(?:[ ]{2}(?![ ]))|([0-9]{4})((?:\.|\)))(?:[ ]{3}(?![ ]))|([0-9]{3})((?:\.|\)))(?:[ ]{4}(?![ ])))(\[[\t Xx]\](?=[\t\n\r ]+(?:$|[^\t\n\r ])))? + beginCaptures + + 1 + + name + string.other.number.mdx + + 2 + + name + variable.ordered.list.mdx + + 3 + + name + string.other.number.mdx + + 4 + + name + variable.ordered.list.mdx + + 5 + + name + string.other.number.mdx + + 6 + + name + variable.ordered.list.mdx + + 7 + + name + string.other.number.mdx + + 8 + + name + variable.ordered.list.mdx + + 9 + + name + keyword.other.tasklist.mdx + + + patterns + + + include + #markdown-sections + + + while + ^(?=[\t ]*$)|(?:^|\G)(?:[ ]{4}|\t){2} + + + begin + (?:^|\G)[\t ]*(?:([0-9]{5})((?:\.|\)))(?:[ ]{1}|(?=[ \t]*\n))|([0-9]{4})((?:\.|\)))(?:[ ]{2}(?![ ]))|([0-9]{3})((?:\.|\)))(?:[ ]{3}(?![ ]))|([0-9]{2})((?:\.|\)))(?:[ ]{4}(?![ ])))(\[[\t Xx]\](?=[\t\n\r ]+(?:$|[^\t\n\r ])))? + beginCaptures + + 1 + + name + string.other.number.mdx + + 2 + + name + variable.ordered.list.mdx + + 3 + + name + string.other.number.mdx + + 4 + + name + variable.ordered.list.mdx + + 5 + + name + string.other.number.mdx + + 6 + + name + variable.ordered.list.mdx + + 7 + + name + string.other.number.mdx + + 8 + + name + variable.ordered.list.mdx + + 9 + + name + keyword.other.tasklist.mdx + + + patterns + + + include + #markdown-sections + + + while + ^(?=[\t ]*$)|(?:^|\G)(?:[ ]{4}|\t)[ ]{3} + + + begin + (?:^|\G)[\t ]*(?:([0-9]{4})((?:\.|\)))(?:[ ]{1}|(?=[ \t]*\n))|([0-9]{3})((?:\.|\)))(?:[ ]{2}(?![ ]))|([0-9]{2})((?:\.|\)))(?:[ ]{3}(?![ ]))|([0-9]{1})((?:\.|\)))(?:[ ]{4}(?![ ])))(\[[\t Xx]\](?=[\t\n\r ]+(?:$|[^\t\n\r ])))? + beginCaptures + + 1 + + name + string.other.number.mdx + + 2 + + name + variable.ordered.list.mdx + + 3 + + name + string.other.number.mdx + + 4 + + name + variable.ordered.list.mdx + + 5 + + name + string.other.number.mdx + + 6 + + name + variable.ordered.list.mdx + + 7 + + name + string.other.number.mdx + + 8 + + name + variable.ordered.list.mdx + + 9 + + name + keyword.other.tasklist.mdx + + + patterns + + + include + #markdown-sections + + + while + ^(?=[\t ]*$)|(?:^|\G)(?:[ ]{4}|\t)[ ]{2} + + + begin + (?:^|\G)[\t ]*(?:([0-9]{3})((?:\.|\)))(?:[ ]{1}|(?=[ \t]*\n))|([0-9]{2})((?:\.|\)))(?:[ ]{2}(?![ ]))|([0-9]{1})((?:\.|\)))(?:[ ]{3}(?![ ])))(\[[\t Xx]\](?=[\t\n\r ]+(?:$|[^\t\n\r ])))? + beginCaptures + + 1 + + name + string.other.number.mdx + + 2 + + name + variable.ordered.list.mdx + + 3 + + name + string.other.number.mdx + + 4 + + name + variable.ordered.list.mdx + + 5 + + name + string.other.number.mdx + + 6 + + name + variable.ordered.list.mdx + + 7 + + name + keyword.other.tasklist.mdx + + + patterns + + + include + #markdown-sections + + + while + ^(?=[\t ]*$)|(?:^|\G)(?:[ ]{4}|\t)[ ]{1} + + + begin + (?:^|\G)[\t ]*(?:([0-9]{2})((?:\.|\)))(?:[ ]{1}|(?=[ \t]*\n))|([0-9])((?:\.|\)))(?:[ ]{2}(?![ ])))(\[[\t Xx]\](?=[\t\n\r ]+(?:$|[^\t\n\r ])))? + beginCaptures + + 1 + + name + string.other.number.mdx + + 2 + + name + variable.ordered.list.mdx + + 3 + + name + string.other.number.mdx + + 4 + + name + variable.ordered.list.mdx + + 5 + + name + keyword.other.tasklist.mdx + + + patterns + + + include + #markdown-sections + + + while + ^(?=[\t ]*$)|(?:^|\G)(?:[ ]{4}|\t) + + + begin + (?:^|\G)[\t ]*([0-9])((?:\.|\)))(?:[ ]{1}|(?=[ \t]*\n))(\[[\t Xx]\](?=[\t\n\r ]+(?:$|[^\t\n\r ])))? + beginCaptures + + 1 + + name + string.other.number.mdx + + 2 + + name + variable.ordered.list.mdx + + 3 + + name + keyword.other.tasklist.mdx + + + patterns + + + include + #markdown-sections + + + while + ^(?=[\t ]*$)|(?:^|\G)[ ]{3} + + + + commonmark-paragraph + + begin + (?![\t ]*$) + name + meta.paragraph.mdx + patterns + + + include + #markdown-text + + + while + (?:^|\G)(?:[ ]{4}|\t) + + commonmark-thematic-break + + match + (?:^|\G)[\t ]*([-*_])[ \t]*(?:\1[ \t]*){2,}$ + name + meta.separator.mdx + + extension-gfm-autolink-literal + + patterns + + + match + (?<=^|[\t\n\r \(\*\_\[\]~])(?=(?i:www)\.[^\n\r])(?:(?:[\p{L}\p{N}]|-|[\._](?!(?:[!"'\)\*,\.:;<\?_~]*(?:[\s<]|\][\t\n \(\[]))))+\g<path>?)?(?<path>(?:(?:[^\t\n\r !"&'\(\)\*,\.:;<\?\]_~]|&(?![A-Za-z]*;(?:[!"'\)\*,\.:;<\?_~]*(?:[\s<]|\][\t\n \(\[])))|[!"'\)\*,\.:;\?_~](?!(?:[!"'\)\*,\.:;<\?_~]*(?:[\s<]|\][\t\n \(\[]))))|\(\g<path>*\))+){0} + name + string.other.link.autolink.literal.www.mdx + + + match + (?<=^|[^A-Za-z])(?i:https?://)(?=[\p{L}\p{N}])(?:(?:[\p{L}\p{N}]|-|[\._](?!(?:[!"'\)\*,\.:;<\?_~]*(?:[\s<]|\][\t\n \(\[]))))+\g<path>?)?(?<path>(?:(?:[^\t\n\r !"&'\(\)\*,\.:;<\?\]_~]|&(?![A-Za-z]*;(?:[!"'\)\*,\.:;<\?_~]*(?:[\s<]|\][\t\n \(\[])))|[!"'\)\*,\.:;\?_~](?!(?:[!"'\)\*,\.:;<\?_~]*(?:[\s<]|\][\t\n \(\[]))))|\(\g<path>*\))+){0} + name + string.other.link.autolink.literal.http.mdx + + + match + (?<=^|[^A-Za-z/])(?i:mailto:|xmpp:)?(?:[0-9A-Za-z+\-\._])+@(?:(?:[0-9A-Za-z]|[-_](?!(?:[!"'\)\*,\.:;<\?_~]*(?:[\s<]|\][\t\n \(\[]))))+(?:\.(?!(?:[!"'\)\*,\.:;<\?_~]*(?:[\s<]|\][\t\n \(\[])))))+(?:[A-Za-z]|[-_](?!(?:[!"'\)\*,\.:;<\?_~]*(?:[\s<]|\][\t\n \(\[]))))+ + name + string.other.link.autolink.literal.email.mdx + + + + extension-gfm-footnote-call + + match + (\[)(\^)((?:[^\t\n\r \[\\\]]|\\[\[\\\]]?)+)(\]) + captures + + 1 + + name + string.other.begin.link.mdx + + 2 + + name + string.other.begin.footnote.mdx + + 3 + + name + entity.name.identifier.mdx + patterns + + + include + #markdown-string + + + + 4 + + name + string.other.end.footnote.mdx + + + + extension-gfm-footnote-definition + + begin + (?:^|\G)[\t ]*(\[)(\^)((?:[^\t\n\r \[\\\]]|\\[\[\\\]]?)+)(\])(:)[\t ]* + beginCaptures + + 1 + + name + string.other.begin.link.mdx + + 2 + + name + string.other.begin.footnote.mdx + + 3 + + name + entity.name.identifier.mdx + patterns + + + include + #markdown-string + + + + 4 + + name + string.other.end.footnote.mdx + + + patterns + + + include + #markdown-sections + + + while + ^(?=[\t ]*$)|(?:^|\G)(?:[ ]{4}|\t) + + extension-gfm-strikethrough + + match + (?<=\S)(?<!~)~{1,2}(?!~)|(?<!~)~{1,2}(?=\S)(?!~) + name + string.other.strikethrough.mdx + + extension-gfm-table + + begin + (?:^|\G)[\t ]*(?=\|[^\n\r]+\|[ \t]*$) + patterns + + + match + (?<=\||(?:^|\G))[\t ]*((?:[^\n\r\\\|]|\\[\\\|]?)+?)[\t ]*(?=\||$) + captures + + 1 + + patterns + + + include + #markdown-text + + + + + + + match + (?:\|) + name + markup.list.table-delimiter.mdx + + + end + ^(?=[\t ]*$)|$ + + extension-github-gemoji + + match + (:)((?:(?:(?:hand_with_index_finger_and_thumb_cros|mailbox_clo|fist_rai|confu)s|r(?:aised_hand_with_fingers_splay|e(?:gister|l(?:iev|ax)))|disappointed_reliev|confound|(?:a(?:ston|ngu)i|flu)sh|unamus|hush)e|(?:chart_with_(?:down|up)wards_tre|large_orange_diamo|small_(?:orang|blu)e_diamo|large_blue_diamo|parasol_on_grou|loud_sou|rewi)n|(?:rightwards_pushing_h|hourglass_flowing_s|leftwards_(?:pushing_)?h|(?:raised_back_of|palm_(?:down|up)|call_me)_h|(?:(?:(?:clippert|ascensi)on|norfolk)_is|christmas_is|desert_is|bouvet_is|new_zea|thai|eng|fin|ire)l|rightwards_h|pinching_h|writing_h|s(?:w(?:itzer|azi)|cot)l|magic_w|ok_h|icel)an|s(?:un_behind_(?:large|small|rain)_clou|hallow_pan_of_foo|tar_of_davi|leeping_be|kateboar|a(?:tisfie|uropo)|hiel|oun|qui)|(?:ear_with_hearing_a|pouring_liqu)i|(?:identification_c|(?:arrow_(?:back|for)|fast_for)w|credit_c|woman_be|biohaz|man_be|l(?:eop|iz))ar|m(?:usical_key|ortar_)boar|(?:drop_of_bl|canned_f)oo|c(?:apital_abc|upi)|person_bal|(?:black_bi|(?:cust|plac)a)r|(?:clip|key)boar|mermai|pea_po|worrie|po(?:la|u)n|threa|dv)d|(?:(?:(?:face_with_open_eyes_and_hand_over|face_with_diagonal|open|no)_mou|h(?:and_over_mou|yacin)|mammo)t|running_shirt_with_sas|(?:(?:fishing_pole_and_|blow)fi|(?:tropical_f|petri_d)i|(?:paint|tooth)bru|banglade|jellyfi)s|(?:camera_fl|wavy_d)as|triump|menora|pouc|blus|watc|das|has)h|(?:s(?:o(?:(?:uth_georgia_south_sandwich|lomon)_island|ck)|miling_face_with_three_heart|t_kitts_nevi|weat_drop|agittariu|c(?:orpiu|issor)|ymbol|hort)|twisted_rightwards_arrow|(?:northern_mariana|heard_mcdonald|(?:british_virgi|us_virgi|pitcair|cayma)n|turks_caicos|us_outlying|(?:falk|a)land|marshall|c(?:anary|ocos)|faroe)_island|(?:face_holding_back_tea|(?:c(?:ard_index_divid|rossed_fing)|pinched_fing)e|night_with_sta)r|(?:two_(?:wo)?men_holding|people_holding|heart|open)_hand|(?:sunrise_over_mountai|(?:congratul|united_n)atio|jea)n|(?:caribbean_)?netherland|(?:f(?:lower_playing_car|ace_in_clou)|crossed_swor|prayer_bea)d|(?:money_with_win|nest_with_eg|crossed_fla|hotsprin)g|revolving_heart|(?:high_brightne|(?:expression|wire)le|(?:tumbler|wine)_gla|milk_gla|compa|dre)s|performing_art|earth_america|orthodox_cros|l(?:ow_brightnes|a(?:tin_cros|o)|ung)|no_pedestrian|c(?:ontrol_kno|lu)b|b(?:ookmark_tab|rick|ean)|nesting_doll|cook_island|(?:fleur_de_l|tenn)i|(?:o(?:ncoming_b|phiuch|ctop)|hi(?:ppopotam|bisc)|trolleyb|m(?:(?:rs|x)_cla|auriti|inib)|belar|cact|abac|(?:cyp|tau)r)u|medal_sport|(?:chopstic|firewor)k|rhinocero|(?:p(?:aw_prin|eanu)|footprin)t|two_heart|princes|(?:hondur|baham)a|barbado|aquariu|c(?:ustom|hain)|maraca|comoro|flag|wale|hug|vh)s|(?:(?:diamond_shape_with_a_dot_ins|playground_sl)id|(?:(?:first_quarter|last_quarter|full|new)_moon_with|(?:zipper|money)_mouth|dotted_line|upside_down|c(?:rying_c|owboy_h)at|(?:disguis|nauseat)ed|neutral|monocle|panda|tired|woozy|clown|nerd|zany|fox)_fac|s(?:t(?:uck_out_tongue_winking_ey|eam_locomotiv)|(?:lightly_(?:frown|smil)|neez|h(?:ush|ak))ing_fac|(?:tudio_micropho|(?:hinto_shr|lot_mach)i|ierra_leo|axopho)n|mall_airplan|un_with_fac|a(?:luting_fac|tellit|k)|haved_ic|y(?:nagogu|ring)|n(?:owfl)?ak|urinam|pong)|(?:black_(?:medium_)?small|white_(?:(?:medium_)?small|large)|(?:black|white)_medium|black_large|orange|purple|yellow|b(?:rown|lue)|red)_squar|(?:(?:perso|woma)n_with_|man_with_)?probing_can|(?:p(?:ut_litter_in_its_pl|outing_f)|frowning_f|cold_f|wind_f|hot_f)ac|(?:arrows_c(?:ounterc)?lockwi|computer_mou|derelict_hou|carousel_hor|c(?:ity_sunri|hee)|heartpul|briefca|racehor|pig_no|lacros)s|(?:(?:face_with_head_band|ideograph_advant|adhesive_band|under|pack)a|currency_exchan|l(?:eft_l)?ugga|woman_jud|name_bad|man_jud|jud)g|face_with_peeking_ey|(?:(?:e(?:uropean_post_off|ar_of_r)|post_off)i|information_sour|ambulan)c|artificial_satellit|(?:busts?_in_silhouet|(?:vulcan_sal|parach)u|m(?:usical_no|ayot)|ro(?:ller_ska|set)|timor_les|ice_ska)t|(?:(?:incoming|red)_envelo|s(?:ao_tome_princi|tethosco)|(?:micro|tele)sco|citysca)p|(?:(?:(?:convenience|department)_st|musical_sc)o|f(?:light_depar|ramed_pic)tu|love_you_gestu|heart_on_fi|japanese_og|cote_divoi|perseve|singapo)r|b(?:ullettrain_sid|eliz|on)|(?:(?:female_|male_)?dete|radioa)ctiv|(?:christmas|deciduous|evergreen|tanabata|palm)_tre|(?:vibration_mo|cape_ver)d|(?:fortune_cook|neckt|self)i|(?:fork_and_)?knif|athletic_sho|(?:p(?:lead|arty)|drool|curs|melt|yawn|ly)ing_fac|vomiting_fac|(?:(?:c(?:urling_st|ycl)|meat_on_b|repeat_|headst)o|(?:fire_eng|tanger|ukra)i|rice_sce|(?:micro|i)pho|champag|pho)n|(?:cricket|video)_gam|(?:boxing_glo|oli)v|(?:d(?:ragon|izzy)|monkey)_fac|(?:m(?:artin|ozamb)iq|fond)u|wind_chim|test_tub|flat_sho|m(?:a(?:ns_sho|t)|icrob|oos|ut)|(?:handsh|fish_c|moon_c|cupc)ak|nail_car|zimbabw|ho(?:neybe|l)|ice_cub|airplan|pensiv|c(?:a(?:n(?:dl|o)|k)|o(?:ffe|oki))|tongu|purs|f(?:lut|iv)|d(?:at|ov)|n(?:iu|os)|kit|rag|ax)e|(?:(?:british_indian_ocean_territo|(?:plate_with_cutl|batt)e|medal_milita|low_batte|hunga|wea)r|family_(?:woman_(?:woman_(?:girl|boy)|girl|boy)|man_(?:woman_(?:girl|boy)|man_(?:girl|boy)|girl|boy))_bo|person_feeding_bab|woman_feeding_bab|s(?:u(?:spension_railwa|nn)|t(?:atue_of_libert|_barthelem|rawberr))|(?:m(?:ountain_cable|ilky_)|aerial_tram)wa|articulated_lorr|man_feeding_bab|mountain_railwa|partly_sunn|(?:vatican_c|infin)it|(?:outbox_tr|inbox_tr|birthd|motorw|paragu|urugu|norw|x_r)a|butterfl|ring_buo|t(?:urke|roph)|angr|fogg)y|(?:(?:perso|woma)n_in_motorized_wheelchai|(?:(?:notebook_with_decorative_c|four_leaf_cl)ov|(?:index_pointing_at_the_vie|white_flo)w|(?:face_with_thermome|non\-potable_wa|woman_firefigh|desktop_compu|m(?:an_firefigh|otor_scoo)|(?:ro(?:ller_coa|o)|oy)s|potable_wa|kick_scoo|thermome|firefigh|helicop|ot)t|(?:woman_factory_wor|(?:woman_office|woman_health|health)_wor|man_(?:factory|office|health)_wor|(?:factory|office)_wor|rice_crac|black_jo|firecrac)k|telephone_receiv|(?:palms_up_toget|f(?:ire_extinguis|eat)|teac)h|(?:(?:open_)?file_fol|level_sli)d|police_offic|f(?:lying_sauc|arm)|woman_teach|roll_of_pap|(?:m(?:iddle_f|an_s)in|woman_sin|hambur|plun|dag)g|do_not_litt|wilted_flow|woman_farm|man_(?:teach|farm)|(?:bell_pe|hot_pe|fli)pp|l(?:o(?:udspeak|ve_lett|bst)|edg|add)|tokyo_tow|c(?:ucumb|lapp|anc)|b(?:e(?:ginn|av)|adg)|print|hamst)e|(?:perso|woma)n_in_manual_wheelchai|m(?:an(?:_in_motorized|(?:_in_man)?ual)|otorized)_wheelchai|(?:person_(?:white|curly|red)_|wheelc)hai|triangular_rule|(?:film_project|e(?:l_salv|cu)ad|elevat|tract|anch)o|s(?:traight_rul|pace_invad|crewdriv|nowboard|unflow|peak|wimm|ing|occ|how|urf|ki)e|r(?:ed_ca|unne|azo)|d(?:o(?:lla|o)|ee)|barbe)r|(?:(?:cloud_with_(?:lightning_and_)?ra|japanese_gobl|round_pushp|liechtenste|mandar|pengu|dolph|bahra|pushp|viol)i|(?:couple(?:_with_heart_wo|kiss_)man|construction_worker|(?:mountain_bik|bow|row)ing|lotus_position|(?:w(?:eight_lift|alk)|climb)ing|white_haired|curly_haired|raising_hand|super(?:villain|hero)|red_haired|basketball|s(?:(?:wimm|urf)ing|assy)|haircut|no_good|(?:vampir|massag)e|b(?:iking|ald)|zombie|fairy|mage|elf|ng)_(?:wo)?ma|(?:(?:couple_with_heart_man|isle_of)_m|(?:couplekiss_woman_|(?:b(?:ouncing_ball|lond_haired)|tipping_hand|pregnant|kneeling|deaf)_|frowning_|s(?:tanding|auna)_|po(?:uting_|lice)|running_|blonde_|o(?:lder|k)_)wom|(?:perso|woma)n_with_turb|(?:b(?:ouncing_ball|lond_haired)|tipping_hand|pregnant|kneeling|deaf)_m|f(?:olding_hand_f|rowning_m)|man_with_turb|(?:turkmen|afghan|pak)ist|s(?:tanding_m|(?:outh_s)?ud|auna_m)|po(?:uting_|lice)m|running_m|azerbaij|k(?:yrgyz|azakh)st|tajikist|uzbekist|o(?:lder_m|k_m|ce)|(?:orang|bh)ut|taiw|jord)a|s(?:mall_red_triangle_dow|(?:valbard_jan_may|int_maart|ev)e|afety_pi|top_sig|t_marti|(?:corpi|po|o)o|wede)|(?:heavy_(?:d(?:ivision|ollar)|equals|minus|plus)|no_entry|female|male)_sig|(?:arrow_(?:heading|double)_d|p(?:erson_with_cr|oint_d)|arrow_up_d|thumbsd)ow|(?:house_with_gard|l(?:ock_with_ink_p|eafy_gre)|dancing_(?:wo)?m|fountain_p|keycap_t|chick|ali|yem|od)e|(?:izakaya|jack_o)_lanter|(?:funeral_u|(?:po(?:stal_h|pc)|capric)o|unico)r|chess_paw|b(?:a(?:llo|c)o|eni|rai)|l(?:anter|io)|c(?:o(?:ff)?i|row)|melo|rame|oma|yar)n|(?:s(?:t(?:uck_out_tongue_closed_ey|_vincent_grenadin)|kull_and_crossbon|unglass|pad)|(?:french_souther|palestinia)n_territori|(?:face_with_spiral|kissing_smiling)_ey|united_arab_emirat|kissing_closed_ey|(?:clinking_|dark_sun|eye)glass|(?:no_mobile_|head)phon|womans_cloth|b(?:allet_sho|lueberri)|philippin|(?:no_bicyc|seychel)l|roll_ey|(?:cher|a)ri|p(?:ancak|isc)|maldiv|leav)es|(?:f(?:amily_(?:woman_(?:woman_)?|man_(?:woman_|man_)?)girl_gir|earfu)|(?:woman_playing_hand|m(?:an_playing_hand|irror_)|c(?:onfetti|rystal)_|volley|track|base|8)bal|(?:(?:m(?:ailbox_with_(?:no_)?m|onor)|cockt|e\-m)a|(?:person|bride|woman)_with_ve|man_with_ve|light_ra|braz|ema)i|(?:transgender|baby)_symbo|passport_contro|(?:arrow_(?:down|up)_sm|rice_b|footb)al|(?:dromedary_cam|ferris_whe|love_hot|high_he|pretz|falaf|isra)e|page_with_cur|me(?:dical_symbo|ta)|(?:n(?:ewspaper_ro|o_be)|bellhop_be)l|rugby_footbal|s(?:chool_satche|(?:peak|ee)_no_evi|oftbal|crol|anda|nai|hel)|(?:peace|atom)_symbo|hear_no_evi|cora|hote|bage|labe|rof|ow)l|(?:(?:negative_squared_cross|heavy_exclamation|part_alternation)_mar|(?:eight_spoked_)?asteris|(?:ballot_box_with_che|(?:(?:mantelpiece|alarm|timer)_c|un)lo|(?:ha(?:(?:mmer_and|ir)_p|tch(?:ing|ed)_ch)|baby_ch|joyst)i|railway_tra|lipsti|peaco)c|heavy_check_mar|white_check_mar|tr(?:opical_drin|uc)|national_par|pickup_truc|diving_mas|floppy_dis|s(?:tar_struc|hamroc|kun|har)|chipmun|denmar|duc|hoo|lin)k|(?:leftwards_arrow_with_h|arrow_right_h|(?:o(?:range|pen)|closed|blue)_b)ook|(?:woman_playing_water_pol|m(?:an(?:_(?:playing_water_pol|with_gua_pi_ma|in_tuxed)|g)|ontenegr|o(?:roc|na)c|e(?:xic|tr|m))|(?:perso|woma)n_in_tuxed|(?:trinidad_toba|vir)g|water_buffal|b(?:urkina_fas|a(?:mbo|nj)|ent)|puerto_ric|water_pol|flaming|kangaro|(?:mosqu|burr)it|(?:avoc|torn)ad|curaca|lesoth|potat|ko(?:sov|k)|tomat|d(?:ang|od)|yo_y|hoch|t(?:ac|og)|zer)o|(?:c(?:entral_african|zech)|dominican)_republic|(?:eight_pointed_black_s|six_pointed_s|qa)tar|(?:business_suit_levitat|(?:classical_buil|breast_fee)d|(?:woman_cartwhee|m(?:an_(?:cartwhee|jugg)|en_wrest)|women_wrest|woman_jugg|face_exha|cartwhee|wrest|dump)l|c(?:hildren_cross|amp)|woman_facepalm|woman_shrugg|man_(?:facepalm|shrugg)|people_hugg|(?:person_fe|woman_da|man_da)nc|fist_oncom|horse_rac|(?:no_smo|thin)k|laugh|s(?:eedl|mok)|park|w(?:arn|edd))ing|f(?:a(?:mily(?:_(?:woman_(?:woman_(?:girl|boy)|girl|boy)|man_(?:woman_(?:girl|boy)|man_(?:girl|boy)|girl|boy)))?|ctory)|o(?:u(?:ntain|r)|ot|g)|r(?:owning)?|i(?:re|s[ht])|ly|u)|(?:(?:(?:information_desk|handball|bearded)_|(?:frowning|ok)_|juggling_|mer)pers|(?:previous_track|p(?:lay_or_p)?ause|black_square|white_square|next_track|r(?:ecord|adio)|eject)_butt|(?:wa[nx]ing_(?:crescent|gibbous)_m|bowl_with_sp|crescent_m|racc)o|(?:b(?:ouncing_ball|lond_haired)|tipping_hand|pregnant|kneeling|deaf)_pers|s(?:t(?:_pierre_miquel|op_butt|ati)|tanding_pers|peech_ballo|auna_pers)|r(?:eminder_r)?ibb|thought_ballo|watermel|badmint|c(?:amero|ray)|le(?:ban|m)|oni|bis)on|(?:heavy_heart_exclama|building_construc|heart_decora|exclama)tion|(?:(?:triangular_flag_on_po|(?:(?:woman_)?technolog|m(?:ountain_bicycl|an_technolog)|bicycl)i|(?:wo)?man_scienti|(?:wo)?man_arti|s(?:afety_ve|cienti)|empty_ne)s|(?:vertical_)?traffic_ligh|(?:rescue_worker_helm|military_helm|nazar_amul|city_suns|wastebask|dropl|t(?:rump|oil)|bouqu|buck|magn|secr)e|one_piece_swimsui|(?:(?:arrow_(?:low|upp)er|point)_r|bridge_at_n|copyr|mag_r)igh|(?:bullettrain_fro|(?:potted_pl|croiss|e(?:ggpl|leph))a)n|s(?:t(?:ar_and_cresc|ud)en|cream_ca|mi(?:ley?|rk)_ca|(?:peed|ail)boa|hir)|(?:arrow_(?:low|upp)er|point)_lef|woman_astronau|r(?:o(?:tating_ligh|cke)|eceip)|heart_eyes_ca|man_astronau|(?:woman_stud|circus_t|man_stud|trid)en|(?:ringed_pla|file_cabi)ne|nut_and_bol|(?:older_)?adul|k(?:i(?:ssing_ca|wi_frui)|uwai|no)|(?:pouting_c|c(?:ut_of_m|old_sw)e|womans_h|montserr|(?:(?:motor_|row)b|lab_c)o|heartbe|toph)a|(?:woman_pil|honey_p|man_pil|[cp]arr|teap|rob)o|hiking_boo|arrow_lef|fist_righ|flashligh|f(?:ist_lef|ee)|black_ca|astronau|(?:c(?:hest|oco)|dough)nu|innocen|joy_ca|artis|(?:acce|egy)p|co(?:me|a)|pilo)t|(?:heavy_multiplication_|t\-re)x|(?:s(?:miling_face_with_te|piral_calend)|oncoming_police_c|chocolate_b|ra(?:ilway|cing)_c|police_c|polar_be|teddy_be|madagasc|blue_c|calend|myanm)ar|c(?:l(?:o(?:ud(?:_with_lightning)?|ck(?:1[0-2]?|[2-9]))|ap)?|o(?:uple(?:_with_heart|kiss)?|nstruction|mputer|ok|p|w)|a(?:r(?:d_index)?|mera)|r(?:icket|y)|h(?:art|ild))|(?:m(?:artial_arts_unifo|echanical_a)r|(?:cherry_)?blosso|b(?:aggage_clai|roo)|ice_?crea|facepal|mushroo|restroo|vietna|dru|yu)m|(?:woman_with_headscar|m(?:obile_phone_of|aple_lea)|fallen_lea|wol)f|(?:(?:closed_lock_with|old)_|field_hoc|ice_hoc|han|don)key|g(?:lobe_with_meridians|r(?:e(?:y_(?:exclama|ques)tion|e(?:n(?:_(?:square|circle|salad|apple|heart|book)|land)|ce)|y_heart|nada)|i(?:mac|nn)ing|apes)|u(?:inea_bissau|ernsey|am|n)|(?:(?:olfing|enie)_(?:wo)?|uards(?:wo)?)man|(?:inger_roo|oal_ne|hos)t|(?:uadeloup|ame_di|iraff|oos)e|ift_heart|i(?:braltar|rl)|(?:uatemal|(?:eorg|amb)i|orill|uyan|han)a|uide_dog|(?:oggl|lov)es|arlic|emini|uitar|abon|oat|ear|b)|construction_worker|(?:(?:envelope_with|bow_and)_ar|left_right_ar|raised_eyeb)row|(?:(?:oncoming_automob|crocod)i|right_anger_bubb|l(?:eft_speech_bubb|otion_bott|ady_beet)|congo_brazzavil|eye_speech_bubb|(?:large_blue|orange|purple|yellow|brown)_circ|(?:(?:european|japanese)_cas|baby_bot)t|b(?:alance_sca|eet)|s(?:ewing_need|weat_smi)|(?:black|white|red)_circ|(?:motor|re)cyc|pood|turt|tama|waff|musc|eag)le|first_quarter_moon|s(?:m(?:all_red_triangle|i(?:ley?|rk))|t(?:uck_out_tongue|ar)|hopping|leeping|p(?:arkle|ider)|unrise|nowman|chool|cream|k(?:ull|i)|weat|ix|a)|(?:(?:b(?:osnia_herzegovi|ana)|wallis_futu|(?:french_gui|botsw)a|argenti|st_hele)n|(?:(?:equatorial|papua_new)_guin|north_kor|eritr)e|t(?:ristan_da_cunh|ad)|(?:(?:(?:french_poly|indo)ne|tuni)s|(?:new_caledo|ma(?:urita|cedo)|lithua|(?:tanz|alb|rom)a|arme|esto)n|diego_garc|s(?:audi_arab|t_luc|lov(?:ak|en)|omal|erb)|e(?:arth_as|thiop)|m(?:icrone|alay)s|(?:austra|mongo)l|c(?:ambod|roat)|(?:bulga|alge)r|(?:colom|nami|zam)b|boliv|l(?:iber|atv))i|(?:wheel_of_dhar|cine|pana)m|(?:(?:(?:closed|beach|open)_)?umbrel|ceuta_melil|venezue|ang(?:uil|o)|koa)l|c(?:ongo_kinshas|anad|ub)|(?:western_saha|a(?:mpho|ndor)|zeb)r|american_samo|video_camer|m(?:o(?:vie_camer|ldov)|alt|eg)|(?:earth_af|costa_)ric|s(?:outh_afric|ri_lank|a(?:mo|nt))|bubble_te|(?:antarct|jama)ic|ni(?:caragu|geri|nj)|austri|pi(?:nat|zz)|arub|k(?:eny|aab)|indi|u7a7|l(?:lam|ib[ry])|dn)a|l(?:ast_quarter_moon|o(?:tus|ck)|ips|eo)|(?:hammer_and_wren|c(?:ockroa|hur)|facepun|wren|crut|pun)ch|s(?:nowman_with_snow|ignal_strength|weet_potato|miling_imp|p(?:ider_web|arkle[rs])|w(?:im_brief|an)|a(?:n(?:_marino|dwich)|lt)|topwatch|t(?:a(?:dium|r[2s])|ew)|l(?:e(?:epy|d)|oth)|hrimp|yria|carf|(?:hee|oa)p|ea[lt]|h(?:oe|i[pt])|o[bs])|(?:s(?:tuffed_flatbre|p(?:iral_notep|eaking_he))|(?:exploding_h|baguette_br|flatbr)e)ad|(?:arrow_(?:heading|double)_u|(?:p(?:lace_of_wor|assenger_)sh|film_str|tul)i|page_facing_u|biting_li|(?:billed_c|world_m)a|mouse_tra|(?:curly_lo|busst)o|thumbsu|lo(?:llip)?o|clam|im)p|(?:anatomical|light_blue|sparkling|kissing|mending|orange|purple|yellow|broken|b(?:rown|l(?:ack|ue))|pink)_heart|(?:(?:transgender|black)_fla|mechanical_le|(?:checkered|pirate)_fla|electric_plu|rainbow_fla|poultry_le|service_do|white_fla|luxembour|fried_eg|moneyba|h(?:edgeh|otd)o|shru)g|(?:cloud_with|mountain)_snow|(?:(?:antigua_barb|berm)u|(?:kh|ug)an|rwan)da|(?:3r|2n)d_place_medal|1(?:st_place_medal|234|00)|lotus_position|(?:w(?:eight_lift|alk)|climb)ing|(?:(?:cup_with_str|auto_ricksh)a|carpentry_sa|windo|jigsa)w|(?:(?:couch_and|diya)_la|f(?:ried_shri|uelpu))mp|(?:woman_mechan|man_mechan|alemb)ic|(?:european_un|accord|collis|reun)ion|(?:flight_arriv|hospit|portug|seneg|nep)al|card_file_box|(?:(?:oncoming_)?tax|m(?:o(?:unt_fuj|ya)|alaw)|s(?:paghett|ush|ar)|b(?:r(?:occol|une)|urund)|(?:djibou|kiriba)t|hait|fij)i|(?:shopping_c|white_he|bar_ch)art|d(?:isappointed|ominica|e(?:sert)?)|raising_hand|super(?:villain|hero)|b(?:e(?:verage_box|ers|d)|u(?:bbles|lb|g)|i(?:k(?:ini|e)|rd)|o(?:o(?:ks|t)|a[rt]|y)|read|a[cn]k)|ra(?:ised_hands|bbit2|t)|(?:hindu_tem|ap)ple|thong_sandal|a(?:r(?:row_(?:right|down|up)|t)|bc?|nt)?|r(?:a(?:i(?:sed_hand|nbow)|bbit|dio|m)|u(?:nning)?|epeat|i(?:ng|ce)|o(?:ck|se))|takeout_box|(?:flying_|mini)disc|(?:(?:interrob|yin_y)a|b(?:o(?:omera|wli)|angba)|(?:ping_p|hong_k)o|calli|mahjo)ng|b(?:a(?:llot_box|sket|th?|by)|o(?:o(?:k(?:mark)?|m)|w)|u(?:tter|s)|e(?:ll|er?|ar))?|heart_eyes|basketball|(?:paperclip|dancer|ticket)s|point_up_2|(?:wo)?man_cook|n(?:ew(?:spaper)?|o(?:tebook|_entry)|iger)|t(?:e(?:lephone|a)|o(?:oth|p)|r(?:oll)?|wo)|h(?:o(?:u(?:rglass|se)|rse)|a(?:mmer|nd)|eart)|paperclip|full_moon|(?:b(?:lack_ni|athtu|om)|her)b|(?:long|oil)_drum|pineapple|(?:clock(?:1[0-2]?|[2-9])3|u6e8)0|p(?:o(?:int_up|ut)|r(?:ince|ay)|i(?:ck|g)|en)|e(?:nvelope|ight|u(?:ro)?|gg|ar|ye|s)|m(?:o(?:u(?:ntain|se)|nkey|on)|echanic|a(?:ilbox|g|n)|irror)?|new_moon|d(?:iamonds|olls|art)|question|k(?:iss(?:ing)?|ey)|haircut|no_good|(?:vampir|massag)e|g(?:olf(?:ing)?|u(?:inea|ard)|e(?:nie|m)|ift|rin)|h(?:a(?:ndbag|msa)|ouses|earts|ut)|postbox|toolbox|(?:pencil|t(?:rain|iger)|whale|cat|dog)2|belgium|(?:volca|kimo)no|(?:vanuat|tuval|pala|naur|maca)u|tokelau|o(?:range|ne?|m|k)?|office|dancer|ticket|dragon|pencil|zombie|w(?:o(?:mens|rm|od)|ave|in[gk]|c)|m(?:o(?:sque|use2)|e(?:rman|ns)|a(?:li|sk))|jersey|tshirt|w(?:heel|oman)|dizzy|j(?:apan|oy)|t(?:rain|iger)|whale|fairy|a(?:nge[lr]|bcd|tm)|c(?:h(?:a(?:ir|d)|ile)|a(?:ndy|mel)|urry|rab|o(?:rn|ol|w2)|[dn])|p(?:ager|e(?:a(?:ch|r)|ru)|i(?:g2|ll|e)|oop)|n(?:otes|ine)|t(?:onga|hree|ent|ram|[mv])|f(?:erry|r(?:ies|ee|og)|ax)|u(?:7(?:533|981|121)|5(?:5b6|408|272)|6(?:307|70[89]))|mage|e(?:yes|nd)|i(?:ra[nq]|t)|cat|dog|elf|z(?:zz|ap)|yen|j(?:ar|p)|leg|id|u[kps]|ng|o[2x]|vs|kr|[\+\x2D]1|x|v)(:) + name + string.emoji.mdx + captures + + 1 + + name + punctuation.definition.gemoji.begin.mdx + + 2 + + name + keyword.control.gemoji.mdx + + 3 + + name + punctuation.definition.gemoji.end.mdx + + + + extension-github-mention + + match + (?<![0-9A-Za-z_`])(@)((?:[0-9A-Za-z][0-9A-Za-z-]{0,38})(?:\/(?:[0-9A-Za-z][0-9A-Za-z-]{0,38}))?)(?![0-9A-Za-z_`]) + name + string.mention.mdx + captures + + 1 + + name + punctuation.definition.mention.begin.mdx + + 2 + + name + string.other.link.mention.mdx + + + + extension-github-reference + + patterns + + + match + (?<![0-9A-Za-z_])(?:((?i:ghsa-|cve-))([A-Za-z0-9]+)|((?i:gh-|#))([0-9]+))(?![0-9A-Za-z_]) + name + string.reference.mdx + captures + + 1 + + name + punctuation.definition.reference.begin.mdx + + 2 + + name + string.other.link.reference.security-advisory.mdx + + 3 + + name + punctuation.definition.reference.begin.mdx + + 4 + + name + string.other.link.reference.issue-or-pr.mdx + + + + + match + (?<![^\t\n\r \(@\[\{])((?:[0-9A-Za-z][0-9A-Za-z-]{0,38})(?:\/(?:(?:\.git[0-9A-Za-z_-]|\.(?!git)|[0-9A-Za-z_-])+))?)(#)([0-9]+)(?![0-9A-Za-z_]) + name + string.reference.mdx + captures + + 1 + + name + string.other.link.reference.user.mdx + + 2 + + name + punctuation.definition.reference.begin.mdx + + 3 + + name + string.other.link.reference.issue-or-pr.mdx + + + + + + extension-math-flow + + begin + (?:^|\G)[\t ]*(\${2,})([^\n\r\$]*)$ + beginCaptures + + 1 + + name + string.other.begin.math.flow.mdx + + 2 + + patterns + + + include + #markdown-string + + + + + contentName + markup.raw.math.flow.mdx + end + (\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.math.flow.mdx + + + name + markup.code.other.mdx + + extension-math-text + + match + (?<!\$)(\${2,})(?!\$)(.+?)(?<!\$)(\1)(?!\$) + captures + + 1 + + name + string.other.begin.math.mdx + + 2 + + name + markup.raw.math.mdx markup.inline.raw.math.mdx + + 3 + + name + string.other.end.math.mdx + + + + extension-mdx-esm + + name + meta.embedded.tsx + begin + (?:^|\G)(?=(?i:export|import)[ ]) + end + ^(?=[\t ]*$)|$ + patterns + + + include + source.tsx#statements + + + + extension-mdx-expression-flow + + begin + (?:^|\G)[\t ]*(\{)(?!.*\}[\t ]*.) + beginCaptures + + 1 + + name + string.other.begin.expression.mdx.js + + + contentName + meta.embedded.tsx + end + (\})(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.begin.expression.mdx.js + + + patterns + + + include + source.tsx#expression + + + + extension-mdx-expression-text + + begin + \{ + beginCaptures + + 0 + + name + string.other.begin.expression.mdx.js + + + contentName + meta.embedded.tsx + end + \} + endCaptures + + 0 + + name + string.other.begin.expression.mdx.js + + + patterns + + + include + source.tsx#expression + + + + extension-mdx-jsx-flow + + begin + (?<=^|\G|\>)[\t ]*(<)(?=(?![\t\n\r ]))(?:\s*(/))?(?:\s*(?:(?:((?:[_$[:alpha:]][-_$[:alnum:]]*))\s*(:)\s*((?:[_$[:alpha:]][-_$[:alnum:]]*)))|((?:(?:[_$[:alpha:]][_$[:alnum:]]*)(?:\s*\.\s*(?:[_$[:alpha:]][-_$[:alnum:]]*))+))|((?:[_$[:upper:]][_$[:alnum:]]*))|((?:[_$[:alpha:]][-_$[:alnum:]]*)))(?=[\s\/\>\{]))? + beginCaptures + + 1 + + name + punctuation.definition.tag.end.jsx + + 2 + + name + punctuation.definition.tag.closing.jsx + + 3 + + name + entity.name.tag.namespace.jsx + + 4 + + name + punctuation.separator.namespace.jsx + + 5 + + name + entity.name.tag.local.jsx + + 6 + + name + support.class.component.jsx + + 7 + + name + support.class.component.jsx + + 8 + + name + entity.name.tag.jsx + + + patterns + + + include + source.tsx#jsx-tag-attribute-name + + + include + source.tsx#jsx-tag-attribute-assignment + + + include + source.tsx#jsx-string-double-quoted + + + include + source.tsx#jsx-string-single-quoted + + + include + source.tsx#jsx-evaluated-code + + + include + source.tsx#jsx-tag-attributes-illegal + + + end + (?:(\/)\s*)?(>) + endCaptures + + 1 + + name + punctuation.definition.tag.self-closing.jsx + + 2 + + name + punctuation.definition.tag.end.jsx + + + + extension-mdx-jsx-text + + begin + (<)(?=(?![\t\n\r ]))(?:\s*(/))?(?:\s*(?:(?:((?:[_$[:alpha:]][-_$[:alnum:]]*))\s*(:)\s*((?:[_$[:alpha:]][-_$[:alnum:]]*)))|((?:(?:[_$[:alpha:]][_$[:alnum:]]*)(?:\s*\.\s*(?:[_$[:alpha:]][-_$[:alnum:]]*))+))|((?:[_$[:upper:]][_$[:alnum:]]*))|((?:[_$[:alpha:]][-_$[:alnum:]]*)))(?=[\s\/\>\{]))? + beginCaptures + + 1 + + name + punctuation.definition.tag.end.jsx + + 2 + + name + punctuation.definition.tag.closing.jsx + + 3 + + name + entity.name.tag.namespace.jsx + + 4 + + name + punctuation.separator.namespace.jsx + + 5 + + name + entity.name.tag.local.jsx + + 6 + + name + support.class.component.jsx + + 7 + + name + support.class.component.jsx + + 8 + + name + entity.name.tag.jsx + + + patterns + + + include + source.tsx#jsx-tag-attribute-name + + + include + source.tsx#jsx-tag-attribute-assignment + + + include + source.tsx#jsx-string-double-quoted + + + include + source.tsx#jsx-string-single-quoted + + + include + source.tsx#jsx-evaluated-code + + + include + source.tsx#jsx-tag-attributes-illegal + + + end + (?:(\/)\s*)?(>) + endCaptures + + 1 + + name + punctuation.definition.tag.self-closing.jsx + + 2 + + name + punctuation.definition.tag.end.jsx + + + + extension-toml + + begin + \A\+{3}$ + end + ^\+{3}$ + beginCaptures + + 0 + + name + string.other.begin.toml + + + endCaptures + + 0 + + name + string.other.end.toml + + + contentName + meta.embedded.toml + patterns + + + include + source.toml + + + + extension-yaml + + begin + \A-{3}$ + end + ^-{3}$ + beginCaptures + + 0 + + name + string.other.begin.yaml + + + endCaptures + + 0 + + name + string.other.end.yaml + + + contentName + meta.embedded.yaml + patterns + + + include + source.yaml + + + + whatwg-html-data-character-reference-named-terminated + + match + (&)((?:C(?:(?:o(?:unterClockwiseCo)?|lockwiseCo)ntourIntegra|cedi)|(?:(?:Not(?:S(?:quareSu(?:per|b)set|u(?:cceeds|(?:per|b)set))|Precedes|Greater|Tilde|Less)|Not(?:Righ|Lef)tTriangle|(?:Not(?:(?:Succeed|Precede|Les)s|Greater)|(?:Precede|Succeed)s|Less)Slant|SquareSu(?:per|b)set|(?:Not(?:Greater|Tilde)|Tilde|Less)Full|RightTriangle|LeftTriangle|Greater(?:Slant|Full)|Precedes|Succeeds|Superset|NotHump|Subset|Tilde|Hump)Equ|int(?:er)?c|DotEqu)a|DoubleContourIntegra|(?:n(?:short)?parall|shortparall|p(?:arall|rur))e|(?:rightarrowta|l(?:eftarrowta|ced|ata|Ata)|sced|rata|perm|rced|rAta|ced)i|Proportiona|smepars|e(?:qvpars|pars|xc|um)|Integra|suphso|rarr[pt]|n(?:pars|tg)|l(?:arr[pt]|cei)|Rarrt|(?:hybu|fora)l|ForAl|[GKLNR-Tcknt]cedi|rcei|iexc|gime|fras|[uy]um|oso|dso|ium|Ium)l|D(?:o(?:uble(?:(?:L(?:ong(?:Left)?R|eftR)ight|L(?:ongL)?eft|UpDown|Right|Up)Arrow|Do(?:wnArrow|t))|wn(?:ArrowUpA|TeeA|a)rrow)|iacriticalDot|strok|ashv|cy)|(?:(?:(?:N(?:(?:otN)?estedGreater|ot(?:Greater|Less))|Less(?:Equal)?)Great|GreaterGreat|l[lr]corn|mark|east)e|Not(?:Double)?VerticalBa|(?:Not(?:Righ|Lef)tTriangleB|(?:(?:Righ|Lef)tDown|Right(?:Up)?|Left(?:Up)?)VectorB|RightTriangleB|Left(?:Triangle|Arrow)B|RightArrowB|V(?:er(?:ticalB|b)|b)|UpArrowB|l(?:ur(?:ds|u)h|dr(?:us|d)h|trP|owb|H)|profal|r(?:ulu|dld)h|b(?:igst|rvb)|(?:wed|ve[er])b|s(?:wn|es)w|n(?:wne|ese|sp|hp)|gtlP|d(?:oll|uh|H)|(?:hor|ov)b|u(?:dh|H)|r(?:lh|H)|ohb|hb|St)a|D(?:o(?:wn(?:(?:Left(?:Right|Tee)|RightTee)Vecto|(?:(?:Righ|Lef)tVector|Arrow)Ba)|ubleVerticalBa)|a(?:gge|r)|sc|f)|(?:(?:(?:Righ|Lef)tDown|(?:Righ|Lef)tUp)Tee|(?:Righ|Lef)tUpDown)Vecto|VerticalSeparato|(?:Left(?:Right|Tee)|RightTee)Vecto|less(?:eqq?)?gt|e(?:qslantgt|sc)|(?:RightF|LeftF|[lr]f)loo|u(?:[lr]corne|ar)|timesba|(?:plusa|cirs|apa)ci|U(?:arroci|f)|(?:dzigr|s(?:u(?:pl|br)|imr|[lr])|zigr|angz|nvH|l(?:tl|B)|r[Br])ar|UnderBa|(?:plus|harr|top|mid|of)ci|O(?:verBa|sc|f)|dd?agge|s(?:olba|sc)|g(?:t(?:rar|ci)|sc|f)|c(?:opys|u(?:po|ep)|sc|f)|(?:n(?:(?:v[lr]|w|r)A|l[Aa]|h[Aa]|eA)|x[hlr][Aa]|u(?:ua|da|A)|s[ew]A|rla|o[lr]a|rba|rAa|l[Ablr]a|h(?:oa|A)|era|d(?:ua|A)|cra|vA)r|o(?:lci|sc|ro|pa)|ropa|roar|l(?:o(?:pa|ar)|sc|Ar)|i(?:ma|s)c|ltci|dd?ar|a(?:ma|s)c|R(?:Bar|sc|f)|I(?:mac|f)|(?:u(?:ma|s)|oma|ema|Oma|Ema|[wyz]s|qs|ks|fs|Zs|Ys|Xs|Ws|Vs|Us|Ss|Qs|Ns|Ms|Ks|Is|Gs|Fs|Cs|Bs)c|Umac|x(?:sc|f)|v(?:sc|f)|rsc|n(?:ld|f)|m(?:sc|ld|ac|f)|rAr|h(?:sc|f)|b(?:sc|f)|psc|P(?:sc|f)|L(?:sc|ar|f)|jsc|J(?:sc|f)|E(?:sc|f)|[HT]sc|[yz]f|wf|tf|qf|pf|kf|jf|Zf|Yf|Xf|Wf|Vf|Tf|Sf|Qf|Nf|Mf|Kf|Hf|Gf|Ff|Cf|Bf)r|(?:Diacritical(?:Double)?A|[EINOSYZaisz]a)cute|(?:(?:N(?:egative(?:VeryThin|Thi(?:ck|n))|onBreaking)|NegativeMedium|ZeroWidth|VeryThin|Medium|Thi(?:ck|n))Spac|Filled(?:Very)?SmallSquar|Empty(?:Very)?SmallSquar|(?:N(?:ot(?:Succeeds|Greater|Tilde|Less)T|t)|DiacriticalT|VerticalT|PrecedesT|SucceedsT|NotEqualT|GreaterT|TildeT|EqualT|LessT|at|Ut|It)ild|(?:(?:DiacriticalG|[EIOUaiu]g)ra|(?:u|U)?bre|(?:o|e)?gra)v|(?:doublebar|curly|big|x)wedg|H(?:orizontalLin|ilbertSpac)|Double(?:Righ|Lef)tTe|(?:(?:measured|uw)ang|exponentia|dwang|ssmi|fema)l|(?:Poincarepla|reali|pho|oli)n|(?:black)?lozeng|(?:VerticalL|(?:prof|imag)l)in|SmallCircl|(?:black|dot)squar|rmoustach|l(?:moustach|angl)|(?:b(?:ack)?pr|(?:tri|xo)t|[qt]pr)im|[Tt]herefor|(?:DownB|[Gag]b)rev|(?:infint|nv[lr]tr)i|b(?:arwedg|owti)|an(?:dslop|gl)|(?:cu(?:rly)?v|rthr|lthr|b(?:ig|ar)v|xv)e|n(?:s(?:qsu[bp]|ccu)|prcu)|orslop|NewLin|maltes|Becaus|rangl|incar|(?:otil|Otil|t(?:ra|il))d|[inu]tild|s(?:mil|imn)|(?:sc|pr)cu|Wedg|Prim|Brev)e|(?:CloseCurly(?:Double)?Quo|OpenCurly(?:Double)?Quo|[ry]?acu)te|(?:Reverse(?:Up)?|Up)Equilibrium|C(?:apitalDifferentialD|(?:oproduc|(?:ircleD|enterD|d)o)t|on(?:grue|i)nt|conint|upCap|o(?:lone|pf)|OPY|hi)|(?:(?:(?:left)?rightsquig|(?:longleftr|twoheadr|nleftr|nLeftr|longr|hookr|nR|Rr)ight|(?:twohead|hook)left|longleft|updown|Updown|nright|Right|nleft|nLeft|down|up|Up)a|L(?:(?:ong(?:left)?righ|(?:ong)?lef)ta|eft(?:(?:right)?a|RightA|TeeA))|RightTeeA|LongLeftA|UpTeeA)rrow|(?:(?:RightArrow|Short|Upper|Lower)Left|(?:L(?:eftArrow|o(?:wer|ng))|LongLeft|Short|Upper)Right|ShortUp)Arrow|(?:b(?:lacktriangle(?:righ|lef)|ulle|no)|RightDoubleBracke|RightAngleBracke|Left(?:Doub|Ang)leBracke|(?:vartriangle|downharpoon|c(?:ircl|urv)earrow|upharpoon|looparrow)righ|(?:vartriangle|downharpoon|c(?:ircl|urv)earrow|upharpoon|looparrow|mapsto)lef|(?:UnderBrack|OverBrack|emptys|targ|Sups)e|diamondsui|c(?:ircledas|lubsui|are)|(?:spade|heart)sui|(?:(?:c(?:enter|t)|lmi|ino)d|(?:Triple|mD)D|n(?:otin|e)d|(?:ncong|doteq|su[bp]e|e[gl]s)d|l(?:ess|t)d|isind|c(?:ong|up|ap)?d|b(?:igod|N)|t(?:(?:ri)?d|opb)|s(?:ub|im)d|midd|g(?:tr?)?d|Lmid|DotD|(?:xo|ut|z)d|e(?:s?d|rD|fD|DD)|dtd|Zd|Id|Gd|Ed)o|realpar|i(?:magpar|iin)|S(?:uchTha|qr)|su[bp]mul|(?:(?:lt|i)que|gtque|(?:mid|low)a|e(?:que|xi))s|Produc|s(?:updo|e[cx])|r(?:parg|ec)|lparl|vangr|hamil|(?:homt|[lr]fis|ufis|dfis)h|phmma|t(?:wix|in)|quo|o(?:do|as)|fla|eDo)t|(?:(?:Square)?Intersecti|(?:straight|back|var)epsil|SquareUni|expectati|upsil|epsil|Upsil|eq?col|Epsil|(?:omic|Omic|rca|lca|eca|Sca|[NRTt]ca|Lca|Eca|[Zdz]ca|Dca)r|scar|ncar|herc|ccar|Ccar|iog|Iog)on|Not(?:S(?:quareSu(?:per|b)set|u(?:cceeds|(?:per|b)set))|Precedes|Greater|Tilde|Less)?|(?:(?:(?:Not(?:Reverse)?|Reverse)E|comp|E)leme|NotCongrue|(?:n[gl]|l)eqsla|geqsla|q(?:uat)?i|perc|iiii|coni|cwi|awi|oi)nt|(?:(?:rightleftharpo|leftrightharpo|quaterni)on|(?:(?:N(?:ot(?:NestedLess|Greater|Less)|estedLess)L|(?:eqslant|gtr(?:eqq?)?)l|LessL)e|Greater(?:Equal)?Le|cro)s|(?:rightright|leftleft|upup)arrow|rightleftarrow|(?:(?:(?:righ|lef)tthree|divideon|b(?:igo|ox)|[lr]o)t|InvisibleT)ime|downdownarrow|(?:(?:smallset|tri|dot|box)m|PlusM)inu|(?:RoundImpli|complex|Impli|Otim)e|C(?:ircle(?:Time|Minu|Plu)|ayley|ros)|(?:rationa|mode)l|NotExist|(?:(?:UnionP|MinusP|(?:b(?:ig[ou]|ox)|tri|s(?:u[bp]|im)|dot|xu|mn)p)l|(?:xo|u)pl|o(?:min|pl)|ropl|lopl|epl)u|otimesa|integer|e(?:linter|qual)|setminu|rarrbf|larrb?f|olcros|rarrf|mstpo|lesge|gesle|Exist|[lr]time|strn|napo|fltn|ccap|apo)s|(?:b(?:(?:lack|ig)triangledow|etwee)|(?:righ|lef)tharpoondow|(?:triangle|mapsto)dow|(?:nv|i)infi|ssetm|plusm|lagra|d(?:[lr]cor|isi)|c(?:ompf|aro)|s?frow|(?:hyph|curr)e|kgree|thor|ogo|ye)n|Not(?:Righ|Lef)tTriangle|(?:Up(?:Arrow)?|Short)DownArrow|(?:(?:n(?:triangle(?:righ|lef)t|succ|prec)|(?:trianglerigh|trianglelef|sqsu[bp]se|ques)t|backsim)e|lvertneq|gvertneq|(?:suc|pre)cneq|a(?:pprox|symp)e|(?:succ|prec|vee)e|circe)q|(?:UnderParenthes|OverParenthes|xn)is|(?:(?:Righ|Lef)tDown|Right(?:Up)?|Left(?:Up)?)Vector|D(?:o(?:wn(?:RightVector|LeftVector|Arrow|Tee)|t)|el|D)|l(?:eftrightarrows|br(?:k(?:sl[du]|e)|ac[ek])|tri[ef]|s(?:im[eg]|qb|h)|hard|a(?:tes|ngd|p)|o[pz]f|rm|gE|fr|eg|cy)|(?:NotHumpDownHum|(?:righ|lef)tharpoonu|big(?:(?:triangle|sqc)u|c[au])|HumpDownHum|m(?:apstou|lc)|(?:capbr|xsq)cu|smash|rarr[al]|(?:weie|sha)r|larrl|velli|(?:thin|punc)s|h(?:elli|airs)|(?:u[lr]c|vp)ro|d[lr]cro|c(?:upc[au]|apc[au])|thka|scna|prn?a|oper|n(?:ums|va|cu|bs)|ens|xc[au]|Ma)p|l(?:eftrightarrow|e(?:ftarrow|s(?:dot)?)?|moust|a(?:rrb?|te?|ng)|t(?:ri)?|sim|par|oz|l|g)|n(?:triangle(?:righ|lef)t|succ|prec)|SquareSu(?:per|b)set|(?:I(?:nvisibleComm|ot)|(?:varthe|iio)t|varkapp|(?:vars|S)igm|(?:diga|mco)mm|Cedill|lambd|Lambd|delt|Thet|omeg|Omeg|Kapp|Delt|nabl|zet|to[es]|rdc|ldc|iot|Zet|Bet|Et)a|b(?:lacktriangle|arwed|u(?:mpe?|ll)|sol|o(?:x[HVhv]|t)|brk|ne)|(?:trianglerigh|trianglelef|sqsu[bp]se|ques)t|RightT(?:riangl|e)e|(?:(?:varsu[bp]setn|su(?:psetn?|bsetn?))eq|nsu[bp]seteq|colone|(?:wedg|sim)e|nsime|lneq|gneq)q|DifferentialD|(?:(?:fall|ris)ingdots|(?:suc|pre)ccurly|ddots)eq|A(?:pplyFunction|ssign|(?:tild|grav|brev)e|acute|o(?:gon|pf)|lpha|(?:mac|sc|f)r|c(?:irc|y)|ring|Elig|uml|nd|MP)|(?:varsu[bp]setn|su(?:psetn?|bsetn?))eq|L(?:eft(?:T(?:riangl|e)e|Arrow)|l)|G(?:reaterEqual|amma)|E(?:xponentialE|quilibrium|sim|cy|TH|NG)|(?:(?:RightCeil|LeftCeil|varnoth|ar|Ur)in|(?:b(?:ack)?co|uri)n|vzigza|roan|loan|ffli|amal|sun|rin|n(?:tl|an)|Ran|Lan)g|(?:thick|succn?|precn?|less|g(?:tr|n)|ln|n)approx|(?:s(?:traightph|em)|(?:rtril|xu|u[lr]|xd|v[lr])tr|varph|l[lr]tr|b(?:sem|eps)|Ph)i|(?:circledd|osl|n(?:v[Dd]|V[Dd]|d)|hsl|V(?:vd|D)|Osl|v[Dd]|md)ash|(?:(?:RuleDelay|imp|cuw)e|(?:n(?:s(?:hort)?)?|short|rn)mi|D(?:Dotrah|iamon)|(?:i(?:nt)?pr|peri)o|odsol|llhar|c(?:opro|irmi)|(?:capa|anda|pou)n|Barwe|napi|api)d|(?:cu(?:rlyeq(?:suc|pre)|es)|telre|[ou]dbla|Udbla|Odbla|radi|lesc|gesc|dbla)c|(?:circled|big|eq|[is]|c|x|a|S|[hw]|W|H|G|E|C)circ|rightarrow|R(?:ightArrow|arr|e)|Pr(?:oportion)?|(?:longmapst|varpropt|p(?:lustw|ropt)|varrh|numer|(?:rsa|lsa|sb)qu|m(?:icr|h)|[lr]aqu|bdqu|eur)o|UnderBrace|ImaginaryI|B(?:ernoullis|a(?:ckslash|rv)|umpeq|cy)|(?:(?:Laplace|Mellin|zee)tr|Fo(?:uriertr|p)|(?:profsu|ssta)r|ordero|origo|[ps]op|nop|mop|i(?:op|mo)|h(?:op|al)|f(?:op|no)|dop|bop|Rop|Pop|Nop|Lop|Iop|Hop|Dop|[GJKMOQSTV-Zgjkoqvwyz]op|Bop)f|nsu[bp]seteq|t(?:ri(?:angleq|e)|imesd|he(?:tav|re4)|au)|O(?:verBrace|r)|(?:(?:pitchfo|checkma|t(?:opfo|b)|rob|rbb|l[bo]b)r|intlarh|b(?:brktbr|l(?:oc|an))|perten|NoBrea|rarrh|s[ew]arh|n[ew]arh|l(?:arrh|hbl)|uhbl|Hace)k|(?:NotCupC|(?:mu(?:lti)?|x)m|cupbrc)ap|t(?:riangle|imes|heta|opf?)|Precedes|Succeeds|Superset|NotEqual|(?:n(?:atural|exist|les)|s(?:qc[au]p|mte)|prime)s|c(?:ir(?:cled[RS]|[Ee])|u(?:rarrm|larrp|darr[lr]|ps)|o(?:mmat|pf)|aps|hi)|b(?:sol(?:hsu)?b|ump(?:eq|E)|ox(?:box|[Vv][HLRhlr]|[Hh][DUdu]|[DUdu][LRlr])|e(?:rnou|t[ah])|lk(?:34|1[24])|cy)|(?:l(?:esdot|squ|dqu)o|rsquo|rdquo|ngt)r|a(?:n(?:g(?:msda[a-h]|st|e)|d[dv])|st|p[Ee]|mp|fr|c[Edy])|(?:g(?:esdoto|E)|[lr]haru)l|(?:angrtvb|lrhar|nis)d|(?:(?:th(?:ic)?k|succn?|p(?:r(?:ecn?|n)?|lus)|rarr|l(?:ess|arr)|su[bp]|par|scn|g(?:tr|n)|ne|sc|n[glv]|ln|eq?)si|thetasy|ccupss|alefsy|botto)m|trpezium|(?:hks[ew]|dr?bk|bk)arow|(?:(?:[lr]a|d|c)empty|b(?:nequi|empty)|plank|nequi|odi)v|(?:(?:sc|rp|n)pol|point|fpart)int|(?:c(?:irf|wco)|awco)nint|PartialD|n(?:s(?:u[bp](?:set)?|c)|rarr|ot(?:ni|in)?|warr|e(?:arr)?|a(?:tur|p)|vlt|p(?:re?|ar)|um?|l[et]|ge|i)|n(?:atural|exist|les)|d(?:i(?:am(?:ond)?|v(?:ide)?)|tri|ash|ot|d)|backsim|l(?:esdot|squ|dqu)o|g(?:esdoto|E)|U(?:p(?:Arrow|si)|nion|arr)|angrtvb|p(?:l(?:anckh|us(?:d[ou]|[be]))|ar(?:sl|t)|r(?:od|nE|E)|erp|iv|m)|n(?:ot(?:niv[a-c]|in(?:v[a-c]|E))|rarr[cw]|s(?:u[bp][Ee]|c[er])|part|v(?:le|g[et])|g(?:es|E)|c(?:ap|y)|apE|lE|iv|Ll|Gg)|m(?:inus(?:du|b)|ale|cy|p)|rbr(?:k(?:sl[du]|e)|ac[ek])|(?:suphsu|tris|rcu|lcu)b|supdsub|(?:s[ew]a|n[ew]a)rrow|(?:b(?:ecaus|sim)|n(?:[lr]tri|bump)|csu[bp])e|equivDD|u(?:rcorn|lcorn|psi)|timesb|s(?:u(?:p(?:set)?|b(?:set)?)|q(?:su[bp]|u)|i(?:gma|m)|olb?|dot|mt|fr|ce?)|p(?:l(?:anck|us)|r(?:op|ec?)?|ara?|i)|o(?:times|r(?:d(?:er)?)?)|m(?:i(?:nusd?|d)|a(?:p(?:sto)?|lt)|u)|rmoust|g(?:e(?:s(?:dot|l)?|q)?|sim|n(?:ap|e)|t|l|g)|(?:spade|heart)s|c(?:u(?:rarr|larr|p)|o(?:m(?:ma|p)|lon|py|ng)|lubs|heck|cups|irc?|ent|ap)|colone|a(?:p(?:prox)?|n(?:g(?:msd|rt)?|d)|symp|f|c)|S(?:quare|u[bp]|c)|Subset|b(?:ecaus|sim)|vsu[bp]n[Ee]|s(?:u(?:psu[bp]|b(?:su[bp]|n[Ee]|E)|pn[Ee]|p[1-3E]|m)|q(?:u(?:ar[ef]|f)|su[bp]e)|igma[fv]|etmn|dot[be]|par|mid|hc?y|c[Ey])|f(?:rac(?:78|5[68]|45|3[458]|2[35]|1[2-68])|fr)|e(?:m(?:sp1[34]|ptyv)|psiv|c(?:irc|y)|t[ah]|ng|ll|fr|e)|(?:kappa|isins|vBar|fork|rho|phi|n[GL]t)v|divonx|V(?:dashl|ee)|gammad|G(?:ammad|cy|[Tgt])|[Ldhlt]strok|[HT]strok|(?:c(?:ylct|hc)|(?:s(?:oft|hch)|hard|S(?:OFT|HCH)|jser|J(?:ser|uk)|HARD|tsh|TSH|juk|iuk|I(?:uk|[EO])|zh|yi|nj|lj|k[hj]|gj|dj|ZH|Y[AIU]|NJ|LJ|K[HJ]|GJ|D[JSZ])c|ubrc|Ubrc|(?:yu|i[eo]|dz|v|p|f)c|TSc|SHc|CHc|Vc|Pc|Mc|Fc)y|(?:(?:wre|jm)at|dalet|a(?:ngs|le)p|imat|[lr]ds)h|[CLRUceglnou]acute|ff?llig|(?:f(?:fi|[ij])|sz|oe|ij|ae|OE|IJ)lig|r(?:a(?:tio|rr|ng)|tri|par|eal)|s[ew]arr|s(?:qc[au]p|mte)|prime|rarrb|i(?:n(?:fin|t)?|sin|t|i|c)|e(?:quiv|m(?:pty|sp)|p(?:si|ar)|cir|l|g)|kappa|isins|ncong|doteq|(?:wedg|sim)e|nsime|rsquo|rdquo|[lr]haru|V(?:dash|ert)|Tilde|lrhar|gamma|Equal|UpTee|n(?:[lr]tri|bump)|C(?:olon|up|ap)|v(?:arpi|ert)|u(?:psih|ml)|vnsu[bp]|r(?:tri[ef]|e(?:als|g)|a(?:rr[cw]|ng[de]|ce)|sh|lm|x)|rhard|sim[gl]E|i(?:sin[Ev]|mage|f[fr]|cy)|harrw|(?:n[gl]|l)eqq|g(?:sim[el]|tcc|e(?:qq|l)|nE|l[Eaj]|gg|ap)|ocirc|starf|utrif|d(?:trif|i(?:ams|e)|ashv|sc[ry]|fr|eg)|[du]har[lr]|T(?:HORN|a[bu])|(?:TRAD|[gl]vn)E|odash|[EUaeu]o(?:gon|pf)|alpha|[IJOUYgjuy]c(?:irc|y)|v(?:arr|ee)|succ|sim[gl]|harr|ln(?:ap|e)|lesg|(?:n[gl]|l)eq|ocir|star|utri|vBar|fork|su[bp]e|nsim|lneq|gneq|csu[bp]|zwn?j|yacy|x(?:opf|i)|scnE|o(?:r(?:d[fm]|v)|mid|lt|hm|gt|fr|cy|S)|scap|rsqb|ropf|ltcc|tsc[ry]|QUOT|[EOUYao]uml|rho|phi|n[GL]t|e[gl]s|ngt|I(?:nt|m)|nis|rfr|rcy|lnE|lEg|ufr|S(?:um|cy)|R(?:sh|ho)|psi|Ps?i|[NRTt]cy|L(?:sh|cy|[Tt])|kcy|Kcy|Hat|REG|[Zdz]cy|wr|lE|wp|Xi|Nu|Mu)(;) + name + constant.language.character-reference.named.html + captures + + 1 + + name + punctuation.definition.character-reference.begin.html + + 2 + + name + keyword.control.character-reference.html + + 3 + + name + punctuation.definition.character-reference.end.html + + + + commonmark-code-fenced-apib + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:api\x2dblueprint|(?:.*\.)?apib))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.apib.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.apib + patterns + + + include + text.html.markdown.source.gfm.apib + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:api\x2dblueprint|(?:.*\.)?apib))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.apib.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.apib + patterns + + + include + text.html.markdown.source.gfm.apib + + + + + + + + commonmark-code-fenced-asciidoc + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:(?:.*\.)?(?:adoc|asciidoc)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.asciidoc.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.asciidoc + patterns + + + include + text.html.asciidoc + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:(?:.*\.)?(?:adoc|asciidoc)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.asciidoc.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.asciidoc + patterns + + + include + text.html.asciidoc + + + + + + + + commonmark-code-fenced-c + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:dtrace|dtrace\x2dscript|oncrpc|rpc|rpcgen|unified\x2dparallel\x2dc|x\x2dbitmap|x\x2dpixmap|xdr|(?:.*\.)?(?:c|cats|h|idc|opencl|upc|xbm|xpm|xs)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.c.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.c + patterns + + + include + source.c + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:dtrace|dtrace\x2dscript|oncrpc|rpc|rpcgen|unified\x2dparallel\x2dc|x\x2dbitmap|x\x2dpixmap|xdr|(?:.*\.)?(?:c|cats|h|idc|opencl|upc|xbm|xpm|xs)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.c.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.c + patterns + + + include + source.c + + + + + + + + commonmark-code-fenced-clojure + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:clojure|rouge|(?:.*\.)?(?:boot|cl2|clj|cljc|cljs|cljs\.hl|cljscm|cljx|edn|hic|rg|wisp)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.clojure.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.clojure + patterns + + + include + source.clojure + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:clojure|rouge|(?:.*\.)?(?:boot|cl2|clj|cljc|cljs|cljs\.hl|cljscm|cljx|edn|hic|rg|wisp)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.clojure.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.clojure + patterns + + + include + source.clojure + + + + + + + + commonmark-code-fenced-coffee + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:coffee\x2dscript|coffeescript|(?:.*\.)?(?:_coffee|cjsx|coffee|cson|em|emberscript|iced)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.coffee.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.coffee + patterns + + + include + source.coffee + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:coffee\x2dscript|coffeescript|(?:.*\.)?(?:_coffee|cjsx|coffee|cson|em|emberscript|iced)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.coffee.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.coffee + patterns + + + include + source.coffee + + + + + + + + commonmark-code-fenced-console + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:pycon|python\x2dconsole))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.console.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.console + patterns + + + include + text.python.console + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:pycon|python\x2dconsole))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.console.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.console + patterns + + + include + text.python.console + + + + + + + + commonmark-code-fenced-cpp + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:ags|ags\x2dscript|asymptote|c\+\+|edje\x2ddata\x2dcollection|game\x2dmaker\x2dlanguage|swig|(?:.*\.)?(?:asc|ash|asy|c\+\+|cc|cp|cpp|cppm|cxx|edc|gml|h\+\+|hh|hpp|hxx|inl|ino|ipp|ixx|metal|re|tcc|tpp|txx)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.cpp.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.cpp + patterns + + + include + source.c++ + + + include + source.cpp + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:ags|ags\x2dscript|asymptote|c\+\+|edje\x2ddata\x2dcollection|game\x2dmaker\x2dlanguage|swig|(?:.*\.)?(?:asc|ash|asy|c\+\+|cc|cp|cpp|cppm|cxx|edc|gml|h\+\+|hh|hpp|hxx|inl|ino|ipp|ixx|metal|re|tcc|tpp|txx)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.cpp.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.cpp + patterns + + + include + source.c++ + + + include + source.cpp + + + + + + + + commonmark-code-fenced-cs + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:beef|c#|cakescript|csharp|(?:.*\.)?(?:bf|cake|cs|cs\.pp|csx|eq|linq|uno)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.cs.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.cs + patterns + + + include + source.cs + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:beef|c#|cakescript|csharp|(?:.*\.)?(?:bf|cake|cs|cs\.pp|csx|eq|linq|uno)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.cs.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.cs + patterns + + + include + source.cs + + + + + + + + commonmark-code-fenced-css + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:(?:.*\.)?css))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.css.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.css + patterns + + + include + source.css + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:(?:.*\.)?css))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.css.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.css + patterns + + + include + source.css + + + + + + + + commonmark-code-fenced-diff + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:udiff|(?:.*\.)?(?:diff|patch)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.diff.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.diff + patterns + + + include + source.diff + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:udiff|(?:.*\.)?(?:diff|patch)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.diff.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.diff + patterns + + + include + source.diff + + + + + + + + commonmark-code-fenced-dockerfile + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:containerfile|(?:.*\.)?dockerfile))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.dockerfile.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.dockerfile + patterns + + + include + source.dockerfile + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:containerfile|(?:.*\.)?dockerfile))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.dockerfile.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.dockerfile + patterns + + + include + source.dockerfile + + + + + + + + commonmark-code-fenced-elixir + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:elixir|(?:.*\.)?(?:ex|exs)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.elixir.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.elixir + patterns + + + include + source.elixir + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:elixir|(?:.*\.)?(?:ex|exs)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.elixir.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.elixir + patterns + + + include + source.elixir + + + + + + + + commonmark-code-fenced-elm + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:(?:.*\.)?elm))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.elm.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.elm + patterns + + + include + source.elm + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:(?:.*\.)?elm))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.elm.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.elm + patterns + + + include + source.elm + + + + + + + + commonmark-code-fenced-erlang + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:erlang|(?:.*\.)?(?:app|app\.src|erl|es|escript|hrl|xrl|yrl)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.erlang.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.erlang + patterns + + + include + source.erlang + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:erlang|(?:.*\.)?(?:app|app\.src|erl|es|escript|hrl|xrl|yrl)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.erlang.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.erlang + patterns + + + include + source.erlang + + + + + + + + commonmark-code-fenced-gitconfig + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:git\x2dconfig|gitmodules|(?:.*\.)?gitconfig))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.gitconfig.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.gitconfig + patterns + + + include + source.gitconfig + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:git\x2dconfig|gitmodules|(?:.*\.)?gitconfig))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.gitconfig.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.gitconfig + patterns + + + include + source.gitconfig + + + + + + + + commonmark-code-fenced-go + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:golang|(?:.*\.)?go))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.go.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.go + patterns + + + include + source.go + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:golang|(?:.*\.)?go))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.go.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.go + patterns + + + include + source.go + + + + + + + + commonmark-code-fenced-graphql + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:(?:.*\.)?(?:gql|graphql|graphqls)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.graphql.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.graphql + patterns + + + include + source.graphql + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:(?:.*\.)?(?:gql|graphql|graphqls)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.graphql.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.graphql + patterns + + + include + source.graphql + + + + + + + + commonmark-code-fenced-haskell + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:c2hs|c2hs\x2dhaskell|frege|haskell|(?:.*\.)?(?:chs|dhall|hs|hs\x2dboot|hsc)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.haskell.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.haskell + patterns + + + include + source.haskell + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:c2hs|c2hs\x2dhaskell|frege|haskell|(?:.*\.)?(?:chs|dhall|hs|hs\x2dboot|hsc)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.haskell.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.haskell + patterns + + + include + source.haskell + + + + + + + + commonmark-code-fenced-html + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:html|(?:.*\.)?(?:hta|htm|html\.hl|kit|mtml|xht|xhtml)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.html.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.html + patterns + + + include + text.html.basic + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:html|(?:.*\.)?(?:hta|htm|html\.hl|kit|mtml|xht|xhtml)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.html.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.html + patterns + + + include + text.html.basic + + + + + + + + commonmark-code-fenced-ini + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:altium|altium\x2ddesigner|dosini|(?:.*\.)?(?:cnf|dof|ini|lektorproject|outjob|pcbdoc|prefs|prjpcb|properties|schdoc|url)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.ini.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.ini + patterns + + + include + source.ini + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:altium|altium\x2ddesigner|dosini|(?:.*\.)?(?:cnf|dof|ini|lektorproject|outjob|pcbdoc|prefs|prjpcb|properties|schdoc|url)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.ini.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.ini + patterns + + + include + source.ini + + + + + + + + commonmark-code-fenced-java + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:chuck|unrealscript|(?:.*\.)?(?:ck|jav|java|jsh|uc)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.java.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.java + patterns + + + include + source.java + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:chuck|unrealscript|(?:.*\.)?(?:ck|jav|java|jsh|uc)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.java.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.java + patterns + + + include + source.java + + + + + + + + commonmark-code-fenced-js + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:cycript|javascript\+erb|json\x2dwith\x2dcomments|node|qt\x2dscript|(?:.*\.)?(?:_js|bones|cjs|code\x2dsnippets|code\x2dworkspace|cy|es6|jake|javascript|js|js\.erb|jsb|jscad|jsfl|jslib|jsm|json5|jsonc|jsonld|jspre|jss|jsx|mjs|njs|pac|sjs|ssjs|sublime\x2dbuild|sublime\x2dcolor\x2dscheme|sublime\x2dcommands|sublime\x2dcompletions|sublime\x2dkeymap|sublime\x2dmacro|sublime\x2dmenu|sublime\x2dmousemap|sublime\x2dproject|sublime\x2dsettings|sublime\x2dtheme|sublime\x2dworkspace|sublime_metrics|sublime_session|xsjs|xsjslib)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.js.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.js + patterns + + + include + source.js + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:cycript|javascript\+erb|json\x2dwith\x2dcomments|node|qt\x2dscript|(?:.*\.)?(?:_js|bones|cjs|code\x2dsnippets|code\x2dworkspace|cy|es6|jake|javascript|js|js\.erb|jsb|jscad|jsfl|jslib|jsm|json5|jsonc|jsonld|jspre|jss|jsx|mjs|njs|pac|sjs|ssjs|sublime\x2dbuild|sublime\x2dcolor\x2dscheme|sublime\x2dcommands|sublime\x2dcompletions|sublime\x2dkeymap|sublime\x2dmacro|sublime\x2dmenu|sublime\x2dmousemap|sublime\x2dproject|sublime\x2dsettings|sublime\x2dtheme|sublime\x2dworkspace|sublime_metrics|sublime_session|xsjs|xsjslib)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.js.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.js + patterns + + + include + source.js + + + + + + + + commonmark-code-fenced-json + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:ecere\x2dprojects|ipython\x2dnotebook|jupyter\x2dnotebook|max|max/msp|maxmsp|oasv2\x2djson|oasv3\x2djson|(?:.*\.)?(?:4dform|4dproject|avsc|epj|geojson|gltf|har|ice|ipynb|json|json|json|json\x2dtmlanguage|jsonl|maxhelp|maxpat|maxproj|mcmeta|mxt|pat|sarif|tfstate|tfstate\.backup|topojson|webapp|webmanifest|yy|yyp)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.json.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.json + patterns + + + include + source.json + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:ecere\x2dprojects|ipython\x2dnotebook|jupyter\x2dnotebook|max|max/msp|maxmsp|oasv2\x2djson|oasv3\x2djson|(?:.*\.)?(?:4dform|4dproject|avsc|epj|geojson|gltf|har|ice|ipynb|json|json|json|json\x2dtmlanguage|jsonl|maxhelp|maxpat|maxproj|mcmeta|mxt|pat|sarif|tfstate|tfstate\.backup|topojson|webapp|webmanifest|yy|yyp)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.json.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.json + patterns + + + include + source.json + + + + + + + + commonmark-code-fenced-julia + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:julia|(?:.*\.)?jl))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.julia.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.julia + patterns + + + include + source.julia + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:julia|(?:.*\.)?jl))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.julia.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.julia + patterns + + + include + source.julia + + + + + + + + commonmark-code-fenced-kotlin + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:gradle\x2dkotlin\x2ddsl|kotlin|(?:.*\.)?(?:gradle\.kts|kt|ktm|kts)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.kotlin.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.kotlin + patterns + + + include + source.kotlin + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:gradle\x2dkotlin\x2ddsl|kotlin|(?:.*\.)?(?:gradle\.kts|kt|ktm|kts)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.kotlin.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.kotlin + patterns + + + include + source.kotlin + + + + + + + + commonmark-code-fenced-less + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:less\x2dcss|(?:.*\.)?less))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.less.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.less + patterns + + + include + source.css.less + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:less\x2dcss|(?:.*\.)?less))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.less.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.less + patterns + + + include + source.css.less + + + + + + + + commonmark-code-fenced-lua + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:(?:.*\.)?(?:fcgi|lua|nse|p8|pd_lua|rbxs|rockspec|wlua)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.lua.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.lua + patterns + + + include + source.lua + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:(?:.*\.)?(?:fcgi|lua|nse|p8|pd_lua|rbxs|rockspec|wlua)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.lua.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.lua + patterns + + + include + source.lua + + + + + + + + commonmark-code-fenced-makefile + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:bsdmake|mf|(?:.*\.)?(?:mak|make|makefile|mk|mkfile)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.makefile.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.makefile + patterns + + + include + source.makefile + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:bsdmake|mf|(?:.*\.)?(?:mak|make|makefile|mk|mkfile)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.makefile.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.makefile + patterns + + + include + source.makefile + + + + + + + + commonmark-code-fenced-md + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:md|pandoc|rmarkdown|(?:.*\.)?(?:livemd|markdown|mdown|mdwn|mkd|mkdn|mkdown|qmd|rmd|ronn|scd|workbook)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.md.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.md + patterns + + + include + text.md + + + include + source.gfm + + + include + text.html.markdown + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:md|pandoc|rmarkdown|(?:.*\.)?(?:livemd|markdown|mdown|mdwn|mkd|mkdn|mkdown|qmd|rmd|ronn|scd|workbook)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.md.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.md + patterns + + + include + text.md + + + include + source.gfm + + + include + text.html.markdown + + + + + + + + commonmark-code-fenced-mdx + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:(?:.*\.)?mdx))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.mdx.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.mdx + patterns + + + include + source.mdx + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:(?:.*\.)?mdx))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.mdx.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.mdx + patterns + + + include + source.mdx + + + + + + + + commonmark-code-fenced-objc + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:obj\x2dc|objc|objective\x2dc|objectivec))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.objc.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.objc + patterns + + + include + source.objc + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:obj\x2dc|objc|objective\x2dc|objectivec))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.objc.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.objc + patterns + + + include + source.objc + + + + + + + + commonmark-code-fenced-perl + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:cperl|(?:.*\.)?(?:cgi|perl|ph|pl|plx|pm|psgi|t)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.perl.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.perl + patterns + + + include + source.perl + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:cperl|(?:.*\.)?(?:cgi|perl|ph|pl|plx|pm|psgi|t)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.perl.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.perl + patterns + + + include + source.perl + + + + + + + + commonmark-code-fenced-php + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:html\+php|inc|php|(?:.*\.)?(?:aw|ctp|php3|php4|php5|phps|phpt|phtml)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.php.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.php + patterns + + + include + text.html.php + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:html\+php|inc|php|(?:.*\.)?(?:aw|ctp|php3|php4|php5|phps|phpt|phtml)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.php.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.php + patterns + + + include + text.html.php + + + + + + + + commonmark-code-fenced-python + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:bazel|easybuild|python|python3|rusthon|snakemake|starlark|xonsh|(?:.*\.)?(?:bzl|eb|gyp|gypi|lmi|py|py3|pyde|pyi|pyp|pyt|pyw|rpy|sage|sagews|smk|snakefile|spec|tac|wsgi|xpy|xsh)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.python.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.python + patterns + + + include + source.python + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:bazel|easybuild|python|python3|rusthon|snakemake|starlark|xonsh|(?:.*\.)?(?:bzl|eb|gyp|gypi|lmi|py|py3|pyde|pyi|pyp|pyt|pyw|rpy|sage|sagews|smk|snakefile|spec|tac|wsgi|xpy|xsh)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.python.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.python + patterns + + + include + source.python + + + + + + + + commonmark-code-fenced-r + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:rscript|splus|(?:.*\.)?(?:r|rd|rsx)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.r.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.r + patterns + + + include + source.r + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:rscript|splus|(?:.*\.)?(?:r|rd|rsx)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.r.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.r + patterns + + + include + source.r + + + + + + + + commonmark-code-fenced-raku + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:perl\x2d6|perl6|pod\x2d6|(?:.*\.)?(?:6pl|6pm|nqp|p6|p6l|p6m|pl6|pm6|pod|pod6|raku|rakumod)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.raku.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.raku + patterns + + + include + source.raku + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:perl\x2d6|perl6|pod\x2d6|(?:.*\.)?(?:6pl|6pm|nqp|p6|p6l|p6m|pl6|pm6|pod|pod6|raku|rakumod)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.raku.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.raku + patterns + + + include + source.raku + + + + + + + + commonmark-code-fenced-ruby + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:jruby|macruby|(?:.*\.)?(?:builder|druby|duby|eye|gemspec|god|jbuilder|mirah|mspec|pluginspec|podspec|prawn|rabl|rake|rb|rbi|rbuild|rbw|rbx|ru|ruby|thor|watchr)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.ruby.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.ruby + patterns + + + include + source.ruby + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:jruby|macruby|(?:.*\.)?(?:builder|druby|duby|eye|gemspec|god|jbuilder|mirah|mspec|pluginspec|podspec|prawn|rabl|rake|rb|rbi|rbuild|rbw|rbx|ru|ruby|thor|watchr)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.ruby.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.ruby + patterns + + + include + source.ruby + + + + + + + + commonmark-code-fenced-rust + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:rust|(?:.*\.)?(?:rs|rs\.in)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.rust.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.rust + patterns + + + include + source.rust + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:rust|(?:.*\.)?(?:rs|rs\.in)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.rust.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.rust + patterns + + + include + source.rust + + + + + + + + commonmark-code-fenced-scala + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:(?:.*\.)?(?:kojo|sbt|sc|scala)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.scala.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.scala + patterns + + + include + source.scala + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:(?:.*\.)?(?:kojo|sbt|sc|scala)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.scala.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.scala + patterns + + + include + source.scala + + + + + + + + commonmark-code-fenced-scss + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:(?:.*\.)?scss))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.scss.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.scss + patterns + + + include + source.css.scss + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:(?:.*\.)?scss))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.scss.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.scss + patterns + + + include + source.css.scss + + + + + + + + commonmark-code-fenced-shell + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:abuild|alpine\x2dabuild|apkbuild|envrc|gentoo\x2debuild|gentoo\x2declass|openrc|openrc\x2drunscript|shell|shell\x2dscript|(?:.*\.)?(?:bash|bats|command|csh|ebuild|eclass|ksh|sh|sh\.in|tcsh|tmux|tool|zsh|zsh\x2dtheme)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.shell.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.shell + patterns + + + include + source.shell + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:abuild|alpine\x2dabuild|apkbuild|envrc|gentoo\x2debuild|gentoo\x2declass|openrc|openrc\x2drunscript|shell|shell\x2dscript|(?:.*\.)?(?:bash|bats|command|csh|ebuild|eclass|ksh|sh|sh\.in|tcsh|tmux|tool|zsh|zsh\x2dtheme)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.shell.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.shell + patterns + + + include + source.shell + + + + + + + + commonmark-code-fenced-shell-session + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:bash\x2dsession|console|shellsession|(?:.*\.)?sh\x2dsession))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.shell-session.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.shell-session + patterns + + + include + text.shell-session + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:bash\x2dsession|console|shellsession|(?:.*\.)?sh\x2dsession))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.shell-session.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.shell-session + patterns + + + include + text.shell-session + + + + + + + + commonmark-code-fenced-sql + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:plpgsql|sqlpl|(?:.*\.)?(?:cql|db2|ddl|mysql|pgsql|prc|sql|sql|sql|tab|udf|viw)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.sql.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.sql + patterns + + + include + source.sql + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:plpgsql|sqlpl|(?:.*\.)?(?:cql|db2|ddl|mysql|pgsql|prc|sql|sql|sql|tab|udf|viw)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.sql.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.sql + patterns + + + include + source.sql + + + + + + + + commonmark-code-fenced-svg + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:(?:.*\.)?svg))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.svg.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.svg + patterns + + + include + text.xml.svg + + + include + text.xml + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:(?:.*\.)?svg))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.svg.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.svg + patterns + + + include + text.xml.svg + + + include + text.xml + + + + + + + + commonmark-code-fenced-swift + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:(?:.*\.)?swift))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.swift.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.swift + patterns + + + include + source.swift + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:(?:.*\.)?swift))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.swift.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.swift + patterns + + + include + source.swift + + + + + + + + commonmark-code-fenced-toml + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:(?:.*\.)?toml))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.toml.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.toml + patterns + + + include + source.toml + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:(?:.*\.)?toml))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.toml.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.toml + patterns + + + include + source.toml + + + + + + + + commonmark-code-fenced-ts + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:typescript|(?:.*\.)?(?:cts|mts|ts)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.ts.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.ts + patterns + + + include + source.ts + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:typescript|(?:.*\.)?(?:cts|mts|ts)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.ts.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.ts + patterns + + + include + source.ts + + + + + + + + commonmark-code-fenced-tsx + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:(?:.*\.)?tsx))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.tsx.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.tsx + patterns + + + include + source.tsx + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:(?:.*\.)?tsx))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.tsx.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.tsx + patterns + + + include + source.tsx + + + + + + + + commonmark-code-fenced-vbnet + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:fb|freebasic|realbasic|vb\x2d\.net|vb\.net|vbnet|vbscript|visual\x2dbasic|visual\x2dbasic\x2d\.net|(?:.*\.)?(?:bi|rbbas|rbfrm|rbmnu|rbres|rbtbar|rbuistate|vb|vbhtml|vbs)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.vbnet.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.vbnet + patterns + + + include + source.vbnet + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:fb|freebasic|realbasic|vb\x2d\.net|vb\.net|vbnet|vbscript|visual\x2dbasic|visual\x2dbasic\x2d\.net|(?:.*\.)?(?:bi|rbbas|rbfrm|rbmnu|rbres|rbtbar|rbuistate|vb|vbhtml|vbs)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.vbnet.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.vbnet + patterns + + + include + source.vbnet + + + + + + + + commonmark-code-fenced-xml + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:collada|eagle|labview|web\x2dontology\x2dlanguage|xpages|(?:.*\.)?(?:adml|admx|ant|axaml|axml|brd|builds|ccproj|ccxml|clixml|cproject|cscfg|csdef|csproj|ct|dae|depproj|dita|ditamap|ditaval|dll\.config|dotsettings|filters|fsproj|fxml|glade|gmx|grxml|hzp|iml|ivy|jelly|jsproj|kml|launch|lvclass|lvlib|lvproj|mdpolicy|mjml|mxml|natvis|ndproj|nproj|nuspec|odd|osm|owl|pkgproj|proj|props|ps1xml|psc1|pt|qhelp|rdf|resx|rss|sch|sch|scxml|sfproj|shproj|srdf|storyboard|sublime\x2dsnippet|targets|tml|ui|urdf|ux|vbproj|vcxproj|vsixmanifest|vssettings|vstemplate|vxml|wixproj|wsdl|wsf|wxi|wxl|wxs|x3d|xacro|xaml|xib|xlf|xliff|xmi|xml|xml\.dist|xmp|xpl|xproc|xproj|xsd|xsp\x2dconfig|xsp\.metadata|xspec|xul|zcml)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.xml.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.xml + patterns + + + include + text.xml + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:collada|eagle|labview|web\x2dontology\x2dlanguage|xpages|(?:.*\.)?(?:adml|admx|ant|axaml|axml|brd|builds|ccproj|ccxml|clixml|cproject|cscfg|csdef|csproj|ct|dae|depproj|dita|ditamap|ditaval|dll\.config|dotsettings|filters|fsproj|fxml|glade|gmx|grxml|hzp|iml|ivy|jelly|jsproj|kml|launch|lvclass|lvlib|lvproj|mdpolicy|mjml|mxml|natvis|ndproj|nproj|nuspec|odd|osm|owl|pkgproj|proj|props|ps1xml|psc1|pt|qhelp|rdf|resx|rss|sch|sch|scxml|sfproj|shproj|srdf|storyboard|sublime\x2dsnippet|targets|tml|ui|urdf|ux|vbproj|vcxproj|vsixmanifest|vssettings|vstemplate|vxml|wixproj|wsdl|wsf|wxi|wxl|wxs|x3d|xacro|xaml|xib|xlf|xliff|xmi|xml|xml\.dist|xmp|xpl|xproc|xproj|xsd|xsp\x2dconfig|xsp\.metadata|xspec|xul|zcml)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.xml.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.xml + patterns + + + include + text.xml + + + + + + + + commonmark-code-fenced-yaml + + patterns + + + begin + (?:^|\G)[\t ]*(`{3,})(?:[\t ]*((?i:jar\x2dmanifest|kaitai\x2dstruct|oasv2\x2dyaml|oasv3\x2dyaml|unity3d\x2dasset|yaml|yml|(?:.*\.)?(?:anim|asset|ksy|lkml|lookml|mat|meta|mir|prefab|raml|reek|rviz|sublime\x2dsyntax|syntax|unity|yaml\x2dtmlanguage|yaml\.sed|yml\.mysql)))(?:[\t ]+((?:[^\n\r`])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.yaml.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.yaml + patterns + + + include + source.yaml + + + + + + + begin + (?:^|\G)[\t ]*(~{3,})(?:[\t ]*((?i:jar\x2dmanifest|kaitai\x2dstruct|oasv2\x2dyaml|oasv3\x2dyaml|unity3d\x2dasset|yaml|yml|(?:.*\.)?(?:anim|asset|ksy|lkml|lookml|mat|meta|mir|prefab|raml|reek|rviz|sublime\x2dsyntax|syntax|unity|yaml\x2dtmlanguage|yaml\.sed|yml\.mysql)))(?:[\t ]+((?:[^\n\r])+))?)(?:[\t ]*$) + beginCaptures + + 1 + + name + string.other.begin.code.fenced.mdx + + 2 + + name + entity.name.function.mdx + patterns + + + include + #markdown-string + + + + 3 + + patterns + + + include + #markdown-string + + + + + end + (?:^|\G)[\t ]*(\1)(?:[\t ]*$) + endCaptures + + 1 + + name + string.other.end.code.fenced.mdx + + + name + markup.code.yaml.mdx + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?![\t ]*([`~]{3,})[\t ]*$) + contentName + meta.embedded.yaml + patterns + + + include + source.yaml + + + + + + + + + scopeName + source.mdx + uuid + fe65e2cd-7c73-4a27-8b5e-5902893626aa + + \ No newline at end of file diff --git a/src/file-viewer/highlight-grammar/php.plist b/src/file-viewer/highlight-grammar/php.plist new file mode 100644 index 0000000..9882644 --- /dev/null +++ b/src/file-viewer/highlight-grammar/php.plist @@ -0,0 +1,4019 @@ + + + + + comment + TODO: +• Try to improve parameters list syntax – scope numbers, ‘=’, ‘,’ and possibly be intelligent about entity ordering +• Is meta.function-call the correct scope? I've added it to my theme but by default it's not highlighted + fileTypes + + php + php3 + php4 + php5 + phpt + phtml + aw + ctp + + firstLineMatch + ^#!.*(?<!-)php[0-9]{0,1}\b|<\?php + foldingStartMarker + (/\*|\{\s*$|<<<HTML) + foldingStopMarker + (\*/|^\s*\}|^HTML;) + injections + + ^text.html - (meta.embedded | meta.tag), L:^text.html meta.tag, L:text.html.php source.js + + patterns + + + begin + (^\s*)(?=<\?(?![^?]*\?>)) + beginCaptures + + 0 + + name + punctuation.whitespace.embedded.leading.php + + + end + (?!\G)(\s*$\n)? + endCaptures + + 0 + + name + punctuation.whitespace.embedded.trailing.php + + + patterns + + + begin + <\?(?i:php|=)? + beginCaptures + + 0 + + name + punctuation.section.embedded.begin.php + + + contentName + source.php + end + (\?)> + endCaptures + + 0 + + name + punctuation.section.embedded.end.php + + 1 + + name + source.php + + + name + meta.embedded.block.php + patterns + + + include + #language + + + + + + + begin + <\?(?i:php|=)?(?![^?]*\?>) + beginCaptures + + 0 + + name + punctuation.section.embedded.begin.php + + + contentName + source.php + end + (\?)> + endCaptures + + 0 + + name + punctuation.section.embedded.end.php + + 1 + + name + source.php + + + name + meta.embedded.block.php + patterns + + + include + #language + + + + + begin + <\?(?i:php|=)? + beginCaptures + + 0 + + name + punctuation.section.embedded.begin.php + + + end + > + endCaptures + + 0 + + name + punctuation.section.embedded.end.php + + + name + meta.embedded.line.php + patterns + + + captures + + 1 + + name + source.php + + 2 + + name + punctuation.section.embedded.end.php + + 3 + + name + source.php + + + match + \G(\s*)((\?))(?=>) + name + meta.special.empty-tag.php + + + begin + \G + contentName + source.php + end + (\?)(?=>) + endCaptures + + 0 + + name + punctuation.section.embedded.end.php + + 1 + + name + source.php + + + patterns + + + include + #language + + + + + + + + + keyEquivalent + ^~P + name + PHP + patterns + + + include + text.html.basic + + + repository + + class-builtin + + patterns + + + captures + + 1 + + name + punctuation.separator.inheritance.php + + + match + (?ix) + (\\)?\b + (st(dClass|reamWrapper)|R(RD(Graph|Creator|Updater)|untimeException|e(sourceBundle|cursive(RegexIterator|Ca(chingIterator|llbackFilterIterator)|TreeIterator|Iterator(Iterator)?|DirectoryIterator|FilterIterator|ArrayIterator)|flect(ion(Generator|Method|Class|Type|ZendExtension|Object|P(arameter|roperty)|Extension|Function(Abstract)?)?|or)|gexIterator)|angeException)|G(ender\\Gender|lobIterator|magick(Draw|Pixel)?)|X(sltProcessor|ML(Reader|Diff\\(Memory|Base|DOM|File)|Writer)|SLTProcessor)|M(ysqlndUh(Connection|PreparedStatement)|ongo(Re(sultException|gex)|Grid(fsFile|FS(Cursor|File)?)|BinData|C(o(de|llection|mmandCursor)|ursor(Interface|Exception)?|lient)|Timestamp|I(n(sertBatch|t(32|64))|d)|D(B(Ref|\\(BSON\\(Regex|M(inKey|axKey)|Binary|Serializable|Timestamp|ObjectID|Decimal128|U(nserializable|TCDateTime)|Javascript)|Driver\\(Read(Concern|Preference)|Manager|BulkWrite|Server|C(ommand|ursor(Id)?)|Exception\\WriteException|Query|Write(Result|Concern(Error)?|Error))))?|eleteBatch|ate)|UpdateBatch|Pool|Write(Batch|ConcernException)|Log)?|u(tex|ltipleIterator)|e(ssageFormatter|mcache(d)?))|Bad(MethodCallException|FunctionCallException)|tidy(Node)?|S(ync(ReaderWriter|Mutex|S(haredMemory|emaphore)|Event)|impleXML(Iterator|Element)|oap(Server|Header|Client|Param|Var|Fault)|NMP|CA(_(SoapProxy|LocalProxy))?|p(hinxClient|oofchecker|l(M(inHeap|axHeap)|S(tack|ubject)|Heap|T(ype|empFileObject)|Ob(server|jectStorage)|DoublyLinkedList|PriorityQueue|Enum|Queue|Fi(le(Info|Object)|xedArray)))|e(ssionHandler(Interface)?|ekableIterator|rializable)|DO_(Model_(ReflectionDataObject|Type|Property)|Sequence|D(ata(Object|Factory)|AS_(Relational|XML(_Document)?|Setting|ChangeSummary|Data(Object|Factory)))|Exception|List)|wish(Result(s)?|Search)?|VM(Model)?|QLite(Result|3(Result|Stmt)?|Database|Unbuffered)|AM(Message|Connection))|H(RTime\\(StopWatch|PerformanceCounter)|aru(Image|Outline|D(oc|estination)|Page|Encoder|Font|Annotation)) + |Ya(f_(R(oute(_(Re(write|gex)|Map|S(tatic|imple|upervar)|Interface)|r)|e(sponse_Abstract|quest_(Simple|Http|Abstract)|gistry))|Session|Con(troller_Abstract|fig_(Simple|Ini|Abstract))|Dispatcher|Plugin_Abstract|Exception|View_(Simple|Interface)|Loader|A(ction_Abstract|pplication))|r_(Server(_Exception)?|C(oncurrent_Client|lient(_Exception)?)))|N(o(RewindIterator|rmalizer)|umberFormatter)|C(o(nd|untable|ll(ectable|ator))|URLFile|a(chingIterator|llbackFilterIterator))|T(hread(ed)?|okyoTyrant(Table|Iterator|Query)?|ra(nsliterator|versable))|I(n(tl(RuleBasedBreakIterator|BreakIterator|C(har|odePointBreakIterator|alendar)|TimeZone|Iterator|DateFormatter|PartsIterator)|validArgumentException|finiteIterator)|terator(Iterator|Aggregate)?|magick(Draw|Pixel(Iterator)?|Kernel)?)|php_user_filter|Z(MQ(Socket|Context|Device|Poll)?|ipArchive|ookeeper)|O(CI\-(Collection|Lob)|ut(erIterator|Of(RangeException|BoundsException))|verflowException)|D(s\\(Map|S(tack|e(t|quence))|Hashable|Collection|Deque|P(air|riorityQueue)|Vector|Queue)|irectory(Iterator)?|omainException|OM(XPath|N(ode(list)?|amedNodeMap)|C(haracterData|omment|dataSection)|Text|Implementation|Document(Fragment)?|ProcessingInstruction|E(ntityReference|lement)|Attr)|ate(Time(I(nterface|mmutable)|Zone)?|Interval|Period))|U(n(derflowException|expectedValueException)|Converter|I\\(Menu(Item)?|Size|Control(s\\(Radio|Gr(id|oup)|MultilineEntry|B(ox|utton)|S(pin|eparator|lider)|C(heck|o(lorButton|mbo))|Tab|P(icker|rogress)|E(ntry|ditableCombo)|Form|Label))?|Draw\\(Matrix|Brush(\\(RadialGradient|Gradient|LinearGradient))?|Stroke|Color|Text\\(Font(\\Descriptor)?|Layout)|P(en|ath))|Point|Executor|Window|Area))|JsonSerializable|finfo|P(har(Data|FileInfo)?|ool|DO(Statement)?|arentIterator)|E(v(S(tat|ignal)|Ch(ild|eck)|Timer|I(o|dle)|ent(B(uffer(Event)?|ase)|SslContext|Http(Request|Connection)?|Config|DnsBase|Util|Listener)?|P(eriodic|repare)|Embed|Fork|Watcher|Loop)?|rrorException|xception|mptyIterator)|V(8Js(Exception)?|arnish(Stat|Log|Admin))|KTaglib_(MPEG_(File|AudioProperties)|Tag|ID3v2_(Tag|Frame|AttachedPictureFrame))|QuickHash(StringIntHash|Int(S(tringHash|et)|Hash))|F(il(terIterator|esystemIterator)|ANNConnection)|mysqli(_(stmt|driver|warning|result))?|W(orker|eak(Map|ref))|L(imitIterator|o(cale|gicException)|ua(Closure)?|engthException|apack)|A(ppendIterator|PC(Iterator|UIterator)|rray(Iterator|Object|Access))) + \b + + name + support.class.builtin.php + + + + class-name + + patterns + + + begin + (?i)(?=\\?[a-z_0-9]+\\) + end + (?i)([a-z_][a-z_0-9]*)?(?=[^a-z0-9_\\]|\z) + endCaptures + + 1 + + name + support.class.php + + + patterns + + + include + #namespace + + + + + include + #class-builtin + + + begin + (?=[\\a-zA-Z_]) + end + (?i)([a-z_][a-z_0-9]*)?(?=[^a-z0-9_\\]|\z) + endCaptures + + 1 + + name + support.class.php + + + patterns + + + include + #namespace + + + + + + comments + + patterns + + + begin + /\*\*(?:#@\+)?\s*$ + captures + + 0 + + name + punctuation.definition.comment.php + + + comment + This now only highlights a docblock if the first line contains only /** + - this is to stop highlighting everything as invalid when people do comment banners with /******** ... + - Now matches /**#@+ too - used for docblock templates: http://manual.phpdoc.org/HTMLframesConverter/default/phpDocumentor/tutorial_phpDocumentor.howto.pkg.html#basics.docblocktemplate + end + \*/ + name + comment.block.documentation.phpdoc.php + patterns + + + include + #php_doc + + + + + begin + /\* + captures + + 0 + + name + punctuation.definition.comment.php + + + end + \*/ + name + comment.block.php + + + begin + (^[ \t]+)?(?=//) + beginCaptures + + 1 + + name + punctuation.whitespace.comment.leading.php + + + end + (?!\G) + patterns + + + begin + // + beginCaptures + + 0 + + name + punctuation.definition.comment.php + + + end + \n|(?=\?>) + name + comment.line.double-slash.php + + + + + begin + (^[ \t]+)?(?=#) + beginCaptures + + 1 + + name + punctuation.whitespace.comment.leading.php + + + end + (?!\G) + patterns + + + begin + # + beginCaptures + + 0 + + name + punctuation.definition.comment.php + + + end + \n|(?=\?>) + name + comment.line.number-sign.php + + + + + + constants + + patterns + + + begin + (?xi)(?= + ( + (\\[a-z_][a-z_0-9]*\\[a-z_][a-z_0-9\\]*)| + ([a-z_][a-z_0-9]*\\[a-z_][a-z_0-9\\]*) + ) + [^a-z_0-9\\]) + end + (?i)([a-z_][a-z_0-9]*)?(?=[^a-z0-9_\\]) + endCaptures + + 1 + + name + constant.other.php + + + patterns + + + include + #namespace + + + + + begin + (?=\\?[a-zA-Z_\x{7f}-\x{ff}]) + end + (?=[^\\a-zA-Z_\x{7f}-\x{ff}]) + patterns + + + match + (?i)\b(TRUE|FALSE|NULL|__(FILE|DIR|FUNCTION|CLASS|METHOD|LINE|NAMESPACE)__|ON|OFF|YES|NO|NL|BR|TAB)\b + name + constant.language.php + + + captures + + 1 + + name + punctuation.separator.inheritance.php + + + match + (\\)?\b(STD(IN|OUT|ERR)|ZEND_(THREAD_SAFE|DEBUG_BUILD)|DEFAULT_INCLUDE_PATH|P(HP_(R(OUND_HALF_(ODD|DOWN|UP|EVEN)|ELEASE_VERSION)|M(INOR_VERSION|A(XPATHLEN|JOR_VERSION))|BINDIR|S(HLIB_SUFFIX|YSCONFDIR|API)|CONFIG_FILE_(SCAN_DIR|PATH)|INT_(MAX|SIZE)|ZTS|O(S|UTPUT_HANDLER_(START|CONT|END))|D(EBUG|ATADIR)|URL_(SCHEME|HOST|USER|P(ORT|A(SS|TH))|QUERY|FRAGMENT)|PREFIX|E(XT(RA_VERSION|ENSION_DIR)|OL)|VERSION(_ID)?|WINDOWS_(NT_(SERVER|DOMAIN_CONTROLLER|WORKSTATION)|VERSION_(M(INOR|AJOR)|BUILD|S(UITEMASK|P_M(INOR|AJOR))|P(RODUCTTYPE|LATFORM)))|L(IBDIR|OCALSTATEDIR))|EAR_(INSTALL_DIR|EXTENSION_DIR))|E_(RECOVERABLE_ERROR|STRICT|NOTICE|CO(RE_(ERROR|WARNING)|MPILE_(ERROR|WARNING))|DEPRECATED|USER_(NOTICE|DEPRECATED|ERROR|WARNING)|PARSE|ERROR|WARNING|ALL))\b + name + support.constant.core.php + + + captures + + 1 + + name + punctuation.separator.inheritance.php + + + match + (\\)?\b(RADIXCHAR|GROUPING|M(_(1_PI|SQRT(1_2|2|3|PI)|2_(SQRTPI|PI)|PI(_(2|4))?|E(ULER)?|L(N(10|2|PI)|OG(10E|2E)))|ON_(GROUPING|1(1|2|0)?|7|2|8|THOUSANDS_SEP|3|DECIMAL_POINT|9|4|5|6))|S(TR_PAD_(RIGHT|BOTH|LEFT)|ORT_(REGULAR|STRING|NUMERIC|DESC|LOCALE_STRING|ASC)|EEK_(SET|CUR|END))|H(TML_(SPECIALCHARS|ENTITIES)|ASH_HMAC)|YES(STR|EXPR)|N(_(S(IGN_POSN|EP_BY_SPACE)|CS_PRECEDES)|O(STR|EXPR)|EGATIVE_SIGN|AN)|C(R(YPT_(MD5|BLOWFISH|S(HA(256|512)|TD_DES|ALT_LENGTH)|EXT_DES)|NCYSTR|EDITS_(G(ROUP|ENERAL)|MODULES|SAPI|DOCS|QA|FULLPAGE|ALL))|HAR_MAX|O(NNECTION_(NORMAL|TIMEOUT|ABORTED)|DESET|UNT_(RECURSIVE|NORMAL))|URRENCY_SYMBOL|ASE_(UPPER|LOWER))|__COMPILER_HALT_OFFSET__|T(HOUS(EP|ANDS_SEP)|_FMT(_AMPM)?)|IN(T_(CURR_SYMBOL|FRAC_DIGITS)|I_(S(YSTEM|CANNER_(RAW|NORMAL))|USER|PERDIR|ALL)|F(O_(GENERAL|MODULES|C(REDITS|ONFIGURATION)|ENVIRONMENT|VARIABLES|LICENSE|ALL))?)|D(_(T_FMT|FMT)|IRECTORY_SEPARATOR|ECIMAL_POINT|A(Y_(1|7|2|3|4|5|6)|TE_(R(SS|FC(1(123|036)|2822|8(22|50)|3339))|COOKIE|ISO8601|W3C|ATOM)))|UPLOAD_ERR_(NO_(TMP_DIR|FILE)|CANT_WRITE|INI_SIZE|OK|PARTIAL|EXTENSION|FORM_SIZE)|P(M_STR|_(S(IGN_POSN|EP_BY_SPACE)|CS_PRECEDES)|OSITIVE_SIGN|ATH(_SEPARATOR|INFO_(BASENAME|DIRNAME|EXTENSION|FILENAME)))|E(RA(_(YEAR|T_FMT|D_(T_FMT|FMT)))?|XTR_(REFS|SKIP|IF_EXISTS|OVERWRITE|PREFIX_(SAME|I(NVALID|F_EXISTS)|ALL))|NT_(NOQUOTES|COMPAT|IGNORE|QUOTES))|FRAC_DIGITS|L(C_(M(ONETARY|ESSAGES)|NUMERIC|C(TYPE|OLLATE)|TIME|ALL)|O(G_(MAIL|SYSLOG|N(O(TICE|WAIT)|DELAY|EWS)|C(R(IT|ON)|ONS)|INFO|ODELAY|D(EBUG|AEMON)|U(SER|UCP)|P(ID|ERROR)|E(RR|MERG)|KERN|WARNING|L(OCAL(1|7|2|3|4|5|0|6)|PR)|A(UTH(PRIV)?|LERT))|CK_(SH|NB|UN|EX)))|A(M_STR|B(MON_(1(1|2|0)?|7|2|8|3|9|4|5|6)|DAY_(1|7|2|3|4|5|6))|SSERT_(BAIL|CALLBACK|QUIET_EVAL|WARNING|ACTIVE)|LT_DIGITS))\b + name + support.constant.std.php + + + captures + + 1 + + name + punctuation.separator.inheritance.php + + + match + (?x) + (\\)?\b + (GLOB_(MARK|BRACE|NO(SORT|CHECK|ESCAPE)|ONLYDIR|ERR|AVAILABLE_FLAGS)|XML_(SAX_IMPL|HTML_DOCUMENT_NODE|N(OTATION_NODE|AMESPACE_DECL_NODE)|C(OMMENT_NODE|DATA_SECTION_NODE)|TEXT_NODE|OPTION_(SKIP_(TAGSTART|WHITE)|CASE_FOLDING|TARGET_ENCODING)|D(TD_NODE|OCUMENT_(NODE|TYPE_NODE|FRAG_NODE))|PI_NODE|E(RROR_(RECURSIVE_ENTITY_REF|MISPLACED_XML_PI|B(INARY_ENTITY_REF|AD_CHAR_REF)|SYNTAX|NO(NE|_(MEMORY|ELEMENTS))|TAG_MISMATCH|IN(CORRECT_ENCODING|VALID_TOKEN)|DUPLICATE_ATTRIBUTE|UN(CLOSED_(CDATA_SECTION|TOKEN)|DEFINED_ENTITY|KNOWN_ENCODING)|JUNK_AFTER_DOC_ELEMENT|PAR(TIAL_CHAR|AM_ENTITY_REF)|EXTERNAL_ENTITY_HANDLING|A(SYNC_ENTITY|TTRIBUTE_EXTERNAL_ENTITY_REF))|NTITY_(REF_NODE|NODE|DECL_NODE)|LEMENT_(NODE|DECL_NODE))|LOCAL_NAMESPACE|ATTRIBUTE_(N(MTOKEN(S)?|O(TATION|DE))|CDATA|ID(REF(S)?)?|DECL_NODE|EN(TITY|UMERATION)))|M(HASH_(RIPEMD(1(28|60)|256|320)|GOST|MD(2|4|5)|S(HA(1|2(24|56)|384|512)|NEFRU256)|HAVAL(1(28|92|60)|2(24|56))|CRC32(B)?|TIGER(1(28|60))?|WHIRLPOOL|ADLER32)|YSQL(_(BOTH|NUM|CLIENT_(SSL|COMPRESS|I(GNORE_SPACE|NTERACTIVE))|ASSOC)|I_(RE(PORT_(STRICT|INDEX|OFF|ERROR|ALL)|FRESH_(GRANT|MASTER|BACKUP_LOG|S(TATUS|LAVE)|HOSTS|T(HREADS|ABLES)|LOG)|AD_DEFAULT_(GROUP|FILE))|GROUP_FLAG|MULTIPLE_KEY_FLAG|B(INARY_FLAG|OTH|LOB_FLAG)|S(T(MT_ATTR_(CURSOR_TYPE|UPDATE_MAX_LENGTH|PREFETCH_ROWS)|ORE_RESULT)|E(RVER_QUERY_(NO_(GOOD_INDEX_USED|INDEX_USED)|WAS_SLOW)|T_(CHARSET_NAME|FLAG)))|N(O(_D(EFAULT_VALUE_FLAG|ATA)|T_NULL_FLAG)|UM(_FLAG)?)|C(URSOR_TYPE_(READ_ONLY|SCROLLABLE|NO_CURSOR|FOR_UPDATE)|LIENT_(SSL|NO_SCHEMA|COMPRESS|I(GNORE_SPACE|NTERACTIVE)|FOUND_ROWS))|T(YPE_(GEOMETRY|MEDIUM_BLOB|B(IT|LOB)|S(HORT|TRING|ET)|YEAR|N(ULL|EWD(ECIMAL|ATE))|CHAR|TI(ME(STAMP)?|NY(_BLOB)?)|INT(24|ERVAL)|D(OUBLE|ECIMAL|ATE(TIME)?)|ENUM|VAR_STRING|FLOAT|LONG(_BLOB|LONG)?)|IMESTAMP_FLAG)|INIT_COMMAND|ZEROFILL_FLAG|O(N_UPDATE_NOW_FLAG|PT_(NET_(READ_BUFFER_SIZE|CMD_BUFFER_SIZE)|CONNECT_TIMEOUT|INT_AND_FLOAT_NATIVE|LOCAL_INFILE))|D(EBUG_TRACE_ENABLED|ATA_TRUNCATED)|U(SE_RESULT|N(SIGNED_FLAG|IQUE_KEY_FLAG))|P(RI_KEY_FLAG|ART_KEY_FLAG)|ENUM_FLAG|A(S(SOC|YNC)|UTO_INCREMENT_FLAG)))|CRYPT_(R(C(2|6)|IJNDAEL_(1(28|92)|256)|AND)|GOST|XTEA|M(ODE_(STREAM|NOFB|C(BC|FB)|OFB|ECB)|ARS)|BLOWFISH(_COMPAT)?|S(ERPENT|KIPJACK|AFER(128|PLUS|64))|C(RYPT|AST_(128|256))|T(RIPLEDES|HREEWAY|WOFISH)|IDEA|3DES| + DE(S|CRYPT|V_(RANDOM|URANDOM))|PANAMA|EN(CRYPT|IGNA)|WAKE|LOKI97|ARCFOUR(_IV)?))|S(TREAM_(REPORT_ERRORS|M(UST_SEEK|KDIR_RECURSIVE)|BUFFER_(NONE|FULL|LINE)|S(HUT_(RD(WR)?|WR)|OCK_(R(DM|AW)|S(TREAM|EQPACKET)|DGRAM)|ERVER_(BIND|LISTEN))|NOTIFY_(RE(SOLVE|DIRECTED)|MIME_TYPE_IS|SEVERITY_(INFO|ERR|WARN)|CO(MPLETED|NNECT)|PROGRESS|F(ILE_SIZE_IS|AILURE)|AUTH_RE(SULT|QUIRED))|C(RYPTO_METHOD_(SSLv(2(_(SERVER|CLIENT)|3_(SERVER|CLIENT))|3_(SERVER|CLIENT))|TLS_(SERVER|CLIENT))|LIENT_(CONNECT|PERSISTENT|ASYNC_CONNECT)|AST_(FOR_SELECT|AS_STREAM))|I(GNORE_URL|S_URL|PPROTO_(RAW|TCP|I(CMP|P)|UDP))|O(OB|PTION_(READ_(BUFFER|TIMEOUT)|BLOCKING|WRITE_BUFFER))|U(RL_STAT_(QUIET|LINK)|SE_PATH)|P(EEK|F_(INET(6)?|UNIX))|ENFORCE_SAFE_MODE|FILTER_(READ|WRITE|ALL))|UNFUNCS_RET_(STRING|TIMESTAMP|DOUBLE)|QLITE(_(R(OW|EADONLY)|MIS(MATCH|USE)|B(OTH|USY)|SCHEMA|N(O(MEM|T(FOUND|ADB)|LFS)|UM)|C(O(RRUPT|NSTRAINT)|ANTOPEN)|TOOBIG|I(NTER(RUPT|NAL)|OERR)|OK|DONE|P(ROTOCOL|ERM)|E(RROR|MPTY)|F(ORMAT|ULL)|LOCKED|A(BORT|SSOC|UTH))|3_(B(OTH|LOB)|NU(M|LL)|TEXT|INTEGER|OPEN_(READ(ONLY|WRITE)|CREATE)|FLOAT|ASSOC)))|CURL(M(SG_DONE|_(BAD_(HANDLE|EASY_HANDLE)|CALL_MULTI_PERFORM|INTERNAL_ERROR|O(UT_OF_MEMORY|K)))|SSH_AUTH_(HOST|NONE|DEFAULT|P(UBLICKEY|ASSWORD)|KEYBOARD)|CLOSEPOLICY_(SLOWEST|CALLBACK|OLDEST|LEAST_(RECENTLY_USED|TRAFFIC))|_(HTTP_VERSION_(1_(1|0)|NONE)|NETRC_(REQUIRED|IGNORED|OPTIONAL)|TIMECOND_(IF(MODSINCE|UNMODSINCE)|LASTMOD)|IPRESOLVE_(V(4|6)|WHATEVER)|VERSION_(SSL|IPV6|KERBEROS4|LIBZ))|INFO_(RE(DIRECT_(COUNT|TIME)|QUEST_SIZE)|S(SL_VERIFYRESULT|TARTTRANSFER_TIME|IZE_(DOWNLOAD|UPLOAD)|PEED_(DOWNLOAD|UPLOAD))|H(TTP_CODE|EADER_(SIZE|OUT))|NAMELOOKUP_TIME|C(ON(NECT_TIME|TENT_(TYPE|LENGTH_(DOWNLOAD|UPLOAD)))|ERTINFO)|TOTAL_TIME|PR(IVATE|ETRANSFER_TIME)|EFFECTIVE_URL|FILETIME)|OPT_(R(E(SUME_FROM|TURNTRANSFER|DIR_PROTOCOLS|FERER|AD(DATA|FUNCTION))|AN(GE|DOM_FILE))|MAX(REDIRS|CONNECTS)|B(INARYTRANSFER|UFFERSIZE)|S(S(H_(HOST_PUBLIC_KEY_MD5|P(RIVATE_KEYFILE|UBLIC_KEYFILE)|AUTH_TYPES)|L(CERT(TYPE|PASSWD)?|_(CIPHER_LIST|VERIFY(HOST|PEER))|ENGINE(_DEFAULT)?|VERSION|KEY(TYPE|PASSWD)?))|TDERR)|H(TTP(GET|HEADER|200ALIASES|_VERSION|PROXYTUNNEL|AUTH)|EADER(FUNCTION)?) + |N(O(BODY|SIGNAL|PROGRESS)|ETRC)|C(RLF|O(NNECTTIMEOUT(_MS)?|OKIE(SESSION|JAR|FILE)?)|USTOMREQUEST|ERTINFO|LOSEPOLICY|A(INFO|PATH))|T(RANSFERTEXT|CP_NODELAY|IME(CONDITION|OUT(_MS)?|VALUE))|I(N(TERFACE|FILE(SIZE)?)|PRESOLVE)|DNS_(CACHE_TIMEOUT|USE_GLOBAL_CACHE)|U(RL|SER(PWD|AGENT)|NRESTRICTED_AUTH|PLOAD)|P(R(IVATE|O(GRESSFUNCTION|XY(TYPE|USERPWD|PORT|AUTH)?|TOCOLS))|O(RT|ST(REDIR|QUOTE|FIELDS)?)|UT)|E(GDSOCKET|NCODING)|VERBOSE|K(RB4LEVEL|EYPASSWD)|QUOTE|F(RESH_CONNECT|TP(SSLAUTH|_(S(SL|KIP_PASV_IP)|CREATE_MISSING_DIRS|USE_EP(RT|SV)|FILEMETHOD)|PORT|LISTONLY|APPEND)|ILE(TIME)?|O(RBID_REUSE|LLOWLOCATION)|AILONERROR)|WRITE(HEADER|FUNCTION)|LOW_SPEED_(TIME|LIMIT)|AUTOREFERER)|PRO(XY_(SOCKS(4|5)|HTTP)|TO_(S(CP|FTP)|HTTP(S)?|T(ELNET|FTP)|DICT|F(TP(S)?|ILE)|LDAP(S)?|ALL))|E_(RE(CV_ERROR|AD_ERROR)|GOT_NOTHING|MALFORMAT_USER|BAD_(C(ONTENT_ENCODING|ALLING_ORDER)|PASSWORD_ENTERED|FUNCTION_ARGUMENT)|S(S(H|L_(C(IPHER|ONNECT_ERROR|ERTPROBLEM|ACERT)|PEER_CERTIFICATE|ENGINE_(SETFAILED|NOTFOUND)))|HARE_IN_USE|END_ERROR)|HTTP_(RANGE_ERROR|NOT_FOUND|PO(RT_FAILED|ST_ERROR))|COULDNT_(RESOLVE_(HOST|PROXY)|CONNECT)|T(OO_MANY_REDIRECTS|ELNET_OPTION_SYNTAX)|O(BSOLETE|UT_OF_MEMORY|PERATION_TIMEOUTED|K)|U(RL_MALFORMAT(_USER)?|N(SUPPORTED_PROTOCOL|KNOWN_TELNET_OPTION))|PARTIAL_FILE|F(TP_(BAD_DOWNLOAD_RESUME|SSL_FAILED|C(OULDNT_(RETR_FILE|GET_SIZE|S(TOR_FILE|ET_(BINARY|ASCII))|USE_REST)|ANT_(RECONNECT|GET_HOST))|USER_PASSWORD_INCORRECT|PORT_FAILED|QUOTE_ERROR|W(RITE_ERROR|EIRD_(SERVER_REPLY|227_FORMAT|USER_REPLY|PAS(S_REPLY|V_REPLY)))|ACCESS_DENIED)|ILE(SIZE_EXCEEDED|_COULDNT_READ_FILE)|UNCTION_NOT_FOUND|AILED_INIT)|WRITE_ERROR|L(IBRARY_NOT_FOUND|DAP_(SEARCH_FAILED|CANNOT_BIND|INVALID_URL))|ABORTED_BY_CALLBACK)|VERSION_NOW|FTP(METHOD_(MULTICWD|SINGLECWD|NOCWD)|SSL_(NONE|CONTROL|TRY|ALL)|AUTH_(SSL|TLS|DEFAULT))|AUTH_(GSSNEGOTIATE|BASIC|NTLM|DIGEST|ANY(SAFE)?))|I(MAGETYPE_(GIF|XBM|BMP|SWF|COUNT|TIFF_(MM|II)|I(CO|FF)|UNKNOWN|J(B2|P(X|2|C|EG(2000)?))|P(SD|NG)|WBMP)|NPUT_(REQUEST|GET|SE(RVER|SSION)|COOKIE|POST|ENV)|CONV_(MIME_DECODE_(STRICT|CONTINUE_ON_ERROR)|IMPL|VERSION))|D(NS_(MX|S(RV|OA)|HINFO|N(S|APTR)|CNAME|TXT|PTR|A(NY|LL|AAA|6)?)|OM(STRING_SIZE_ERR|_(SYNTAX_ERR|HIERARCHY_REQUEST_ERR|N(O(_(MODIFICATION_ALLOWED_ERR|DATA_ALLOWED_ERR)|T_(SUPPORTED_ERR|FOUND_ERR))|AMESPACE_ERR)|IN(DEX_SIZE_ERR|USE_ATTRIBUTE_ERR|VALID_(MODIFICATION_ERR|STATE_ERR|CHARACTER_ERR|ACCESS_ERR))|PHP_ERR|VALIDATION_ERR|WRONG_DOCUMENT_ERR)))|JSON_(HEX_(TAG|QUOT|A(MP|POS))|NUMERIC_CHECK|ERROR_(S(YNTAX|TATE_MISMATCH)|NONE|CTRL_CHAR|DEPTH|UTF8)|FORCE_OBJECT)|P(REG_(RECURSION_LIMIT_ERROR|GREP_INVERT|BA(CKTRACK_LIMIT_ERROR|D_UTF8_(OFFSET_ERROR|ERROR))|S(PLIT_(NO_EMPTY|OFFSET_CAPTURE|DELIM_CAPTURE)|ET_ORDER)|NO_ERROR|INTERNAL_ERROR|OFFSET_CAPTURE|PATTERN_ORDER)|SFS_(PASS_ON|ERR_FATAL|F(EED_ME|LAG_(NORMAL|FLUSH_(CLOSE|INC))))|CRE_VERSION|OSIX_(R_OK|X_OK|S_IF(REG|BLK|SOCK|CHR|IFO)|F_OK|W_OK))|F(NM_(NOESCAPE|CASEFOLD|P(ERIOD|ATHNAME))|IL(TER_(REQUIRE_(SCALAR|ARRAY)|SANITIZE_(MAGIC_QUOTES|S(TRI(NG|PPED)|PECIAL_CHARS)|NUMBER_(INT|FLOAT)|URL|E(MAIL|NCODED)|FULL_SPECIAL_CHARS)|NULL_ON_FAILURE|CALLBACK|DEFAULT|UNSAFE_RAW|VALIDATE_(REGEXP|BOOLEAN|I(NT|P)|URL|EMAIL|FLOAT)|F(ORCE_ARRAY|LAG_(S(CHEME_REQUIRED|TRIP_(BACKTICK|HIGH|LOW))|HOST_REQUIRED|NO(NE|_(RES_RANGE|PRIV_RANGE|ENCODE_QUOTES))|IPV(4|6)|PATH_REQUIRED|E(MPTY_STRING_NULL|NCODE_(HIGH|LOW|AMP))|QUERY_REQUIRED|ALLOW_(SCIENTIFIC|HEX|THOUSAND|OCTAL|FRACTION))))|E(_(BINARY|SKIP_EMPTY_LINES|NO_DEFAULT_CONTEXT|TEXT|IGNORE_NEW_LINES|USE_INCLUDE_PATH|APPEND)|INFO_(RAW|MIME(_(TYPE|ENCODING))?|SYMLINK|NONE|CONTINUE|DEVICES|PRESERVE_ATIME)))|ORCE_(GZIP|DEFLATE))|LIBXML_(XINCLUDE|N(SCLEAN|O(XMLDECL|BLANKS|NET|CDATA|E(RROR|MPTYTAG|NT)|WARNING))|COMPACT|D(TD(VALID|LOAD|ATTR)|OTTED_VERSION)|PARSEHUGE|ERR_(NONE|ERROR|FATAL|WARNING)|VERSION|LOADED_VERSION)) + \b + + name + support.constant.ext.php + + + captures + + 1 + + name + punctuation.separator.inheritance.php + + + match + (\\)?\bT_(RE(TURN|QUIRE(_ONCE)?)|G(OTO|LOBAL)|XOR_EQUAL|M(INUS_EQUAL|OD_EQUAL|UL_EQUAL|ETHOD_C|L_COMMENT)|B(REAK|OOL(_CAST|EAN_(OR|AND))|AD_CHARACTER)|S(R(_EQUAL)?|T(RING(_(CAST|VARNAME))?|A(RT_HEREDOC|TIC))|WITCH|L(_EQUAL)?)|HALT_COMPILER|N(S_(SEPARATOR|C)|UM_STRING|EW|AMESPACE)|C(HARACTER|O(MMENT|N(ST(ANT_ENCAPSED_STRING)?|CAT_EQUAL|TINUE))|URLY_OPEN|L(O(SE_TAG|NE)|ASS(_C)?)|A(SE|TCH))|T(RY|HROW)|I(MPLEMENTS|S(SET|_(GREATER_OR_EQUAL|SMALLER_OR_EQUAL|NOT_(IDENTICAL|EQUAL)|IDENTICAL|EQUAL))|N(STANCEOF|C(LUDE(_ONCE)?)?|T(_CAST|ERFACE)|LINE_HTML)|F)|O(R_EQUAL|BJECT_(CAST|OPERATOR)|PEN_TAG(_WITH_ECHO)?|LD_FUNCTION)|D(NUMBER|I(R|V_EQUAL)|O(C_COMMENT|UBLE_(C(OLON|AST)|ARROW)|LLAR_OPEN_CURLY_BRACES)?|E(C(LARE)?|FAULT))|U(SE|NSET(_CAST)?)|P(R(I(NT|VATE)|OTECTED)|UBLIC|LUS_EQUAL|AAMAYIM_NEKUDOTAYIM)|E(X(TENDS|IT)|MPTY|N(CAPSED_AND_WHITESPACE|D(SWITCH|_HEREDOC|IF|DECLARE|FOR(EACH)?|WHILE))|CHO|VAL|LSE(IF)?)|VAR(IABLE)?|F(I(NAL|LE)|OR(EACH)?|UNC(_C|TION))|WHI(TESPACE|LE)|L(NUMBER|I(ST|NE)|OGICAL_(XOR|OR|AND))|A(RRAY(_CAST)?|BSTRACT|S|ND_EQUAL))\b + name + support.constant.parser-token.php + + + comment + In PHP, any identifier which is not a variable is taken to be a constant. + However, if there is no constant defined with the given name then a notice + is generated and the constant is assumed to have the value of its name. + match + [a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]* + name + constant.other.php + + + + + + function-arguments + + patterns + + + include + #comments + + + begin + (?ix) + (?: # Optional + (\?)? + (?: + (array|bool|float|int|string) # scalar-type + | (callable|iterable) # base-type-declaration + | ([a-z_0-9\\]*[a-z_][a-z_0-9]*) + ) + \s+ + )? + (?:(&)\s*)? # Reference + ((\$+)[a-z_\x{7f}-\x{ff}][a-z0-9_\x{7f}-\x{ff}]*) # Variable name + + beginCaptures + + 1 + + name + storage.modifier.nullable.php + + 2 + + name + storage.type.$2.php + + 3 + + name + storage.modifier.$3.php + + 4 + + patterns + + + include + #class-name + + + + 5 + + name + storage.modifier.reference.php + + 6 + + name + variable.other.php + + 7 + + name + punctuation.definition.variable.php + + + end + (?=,|\)|/[/*]|\#) + name + meta.function.argment.php + patterns + + + begin + \s*(=) + beginCaptures + + 1 + + name + keyword.operator.assignment.php + + + end + (?=,|\)|/[/*]|\#) + patterns + + + include + #parameter-default-types + + + + + match + \S + name + invalid.illegal.character-not-allowed-here.php + + + + + + function-call + + patterns + + + begin + (?i)(?=\\?[a-z_0-9\\]+\\[a-z_][a-z0-9_]*\s*\() + comment + Functions in a user-defined namespace (overrides any built-ins) + end + (?=\s*\() + patterns + + + include + #user-function-call + + + + + match + (?i)\b(print|echo)\b + name + support.function.construct.php + + + begin + (?i)(\\)?(?=\b[a-z_][a-z_0-9]*\s*\() + beginCaptures + + 1 + + name + punctuation.separator.inheritance.php + + + comment + Root namespace function calls (built-in or user) + end + (?=\s*\() + patterns + + + match + (?i)\b(isset|unset|e(val|mpty)|list)(?=\s*\() + name + support.function.construct.php + + + include + #support + + + include + #user-function-call + + + + + + heredoc + + patterns + + + begin + (?=<<<\s*("?)([a-zA-Z_]+[a-zA-Z0-9_]*)(\1)\s*$) + end + (?!\G) + injections + + * + + patterns + + + include + #interpolation + + + + + name + string.unquoted.heredoc.php + patterns + + + include + #heredoc_interior + + + + + begin + (?=<<<\s*('?)([a-zA-Z_]+[a-zA-Z0-9_]*)(\1)\s*$) + end + (?!\G) + name + string.unquoted.heredoc.nowdoc.php + patterns + + + include + #heredoc_interior + + + + + repository + + heredoc_interior + + patterns + + + begin + (<<<)\s*(['"]?)(HTML)(\2)\s*$\n? + beginCaptures + + 0 + + name + punctuation.section.embedded.begin.php + + 1 + + name + punctuation.definition.string.php + + 3 + + name + keyword.operator.heredoc.php + + + contentName + text.html + end + ^(\3)\b + endCaptures + + 0 + + name + punctuation.section.embedded.end.php + + 1 + + name + keyword.operator.heredoc.php + + + name + meta.embedded.html + patterns + + + include + text.html.basic + + + + + begin + (<<<)\s*(['"]?)(XML)(\2)\s*$\n? + beginCaptures + + 0 + + name + punctuation.section.embedded.begin.php + + 1 + + name + punctuation.definition.string.php + + 3 + + name + keyword.operator.heredoc.php + + + contentName + text.xml + end + ^(\3)\b + endCaptures + + 0 + + name + punctuation.section.embedded.end.php + + 1 + + name + keyword.operator.heredoc.php + + + name + meta.embedded.xml + patterns + + + include + text.xml + + + + + begin + (<<<)\s*(['"]?)(SQL)(\2)\s*$\n? + beginCaptures + + 0 + + name + punctuation.section.embedded.begin.php + + 1 + + name + punctuation.definition.string.php + + 3 + + name + keyword.operator.heredoc.php + + + contentName + source.sql + end + ^(\3)\b + endCaptures + + 0 + + name + punctuation.section.embedded.end.php + + 1 + + name + keyword.operator.heredoc.php + + + name + meta.embedded.sql + patterns + + + include + source.sql + + + + + begin + (<<<)\s*(['"]?)(JAVASCRIPT)(\2)\s*$\n? + beginCaptures + + 0 + + name + punctuation.section.embedded.begin.php + + 1 + + name + punctuation.definition.string.php + + 3 + + name + keyword.operator.heredoc.php + + + contentName + source.js + end + ^(\3)\b + endCaptures + + 0 + + name + punctuation.section.embedded.end.php + + 1 + + name + keyword.operator.heredoc.php + + + name + meta.embedded.js + patterns + + + include + source.js + + + + + begin + (<<<)\s*(['"]?)(JSON)(\2)\s*$\n? + beginCaptures + + 0 + + name + punctuation.section.embedded.begin.php + + 1 + + name + punctuation.definition.string.php + + 3 + + name + keyword.operator.heredoc.php + + + contentName + source.json + end + ^(\3)\b + endCaptures + + 0 + + name + punctuation.section.embedded.end.php + + 1 + + name + keyword.operator.heredoc.php + + + name + meta.embedded.json + patterns + + + include + source.json + + + + + begin + (<<<)\s*(['"]?)(CSS)(\2)\s*$\n? + beginCaptures + + 0 + + name + punctuation.section.embedded.begin.php + + 1 + + name + punctuation.definition.string.php + + 3 + + name + keyword.operator.heredoc.php + + + contentName + source.css + end + ^(\3)\b + endCaptures + + 0 + + name + punctuation.section.embedded.end.php + + 1 + + name + keyword.operator.heredoc.php + + + name + meta.embedded.css + patterns + + + include + source.css + + + + + begin + (<<<)\s*(['"]?)(REGEX)(\2)\s*$\n? + beginCaptures + + 0 + + name + punctuation.section.embedded.begin.php + + 1 + + name + punctuation.definition.string.php + + 3 + + name + keyword.operator.heredoc.php + + + contentName + string.regexp.heredoc.php + end + ^(\3)\b + endCaptures + + 0 + + name + punctuation.section.embedded.end.php + + 1 + + name + keyword.operator.heredoc.php + + + patterns + + + comment + Escaped from the regexp – there can also be 2 backslashes (since 1 will escape the first) + match + (\\){1,2}[.$^\[\]{}] + name + constant.character.escape.regex.php + + + captures + + 1 + + name + punctuation.definition.arbitrary-repitition.php + + 3 + + name + punctuation.definition.arbitrary-repitition.php + + + match + (\{)\d+(,\d+)?(\}) + name + string.regexp.arbitrary-repitition.php + + + begin + \[(?:\^?\])? + captures + + 0 + + name + punctuation.definition.character-class.php + + + end + \] + name + string.regexp.character-class.php + patterns + + + match + \\[\\'\[\]] + name + constant.character.escape.php + + + + + match + [$^+*] + name + keyword.operator.regexp.php + + + begin + (?<=^|\s)(#)\s(?=[[a-zA-Z0-9,. \t?!-][^\x{00}-\x{7F}]]*$) + beginCaptures + + 1 + + name + punctuation.definition.comment.php + + + comment + We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags. + end + $\n? + endCaptures + + 0 + + name + punctuation.definition.comment.php + + + name + comment.line.number-sign.php + + + + + begin + (<<<)\s*(['"]?)([a-zA-Z_]+[a-zA-Z0-9_]*)(\2) + beginCaptures + + 1 + + name + punctuation.definition.string.php + + 3 + + name + keyword.operator.heredoc.php + + + end + ^(\3)\b + endCaptures + + 1 + + name + keyword.operator.heredoc.php + + + + + + + + instantiation + + begin + (?i)(new)\s+ + beginCaptures + + 1 + + name + keyword.other.new.php + + + end + (?i)(?=[^$a-z0-9_\\]) + patterns + + + match + (parent|static|self)(?=[^a-z0-9_]) + name + storage.type.php + + + include + #class-name + + + include + #variable-name + + + + interpolation + + comment + http://www.php.net/manual/en/language.types.string.php#language.types.string.parsing + patterns + + + match + \\[0-7]{1,3} + name + constant.numeric.octal.php + + + match + \\x[0-9A-Fa-f]{1,2} + name + constant.numeric.hex.php + + + match + \\[enrt\\\$\"] + name + constant.character.escape.php + + + begin + (\{)(?=\$.*?\}) + beginCaptures + + 1 + + name + punctuation.definition.variable.php + + + end + (\}) + endCaptures + + 1 + + name + punctuation.definition.variable.php + + + patterns + + + include + #language + + + + + include + #variable-name + + + + invoke-call + + captures + + 1 + + name + punctuation.definition.variable.php + + 2 + + name + variable.other.php + + + match + (?i)(\$+)([a-z_][a-z_0-9]*)(?=\s*\() + name + meta.function-call.invoke.php + + language + + patterns + + + include + #comments + + + match + \{ + name + punctuation.section.scope.begin.php + + + match + \} + name + punctuation.section.scope.end.php + + + begin + (?i)^\s*(interface)\s+([a-z0-9_]+)\s*(extends)?\s* + beginCaptures + + 1 + + name + storage.type.interface.php + + 2 + + name + entity.name.type.interface.php + + 3 + + name + storage.modifier.extends.php + + + end + ((?:[a-zA-Z0-9_]+\s*,\s*)*)([a-zA-Z0-9_]+)?\s*(?:(?=\{)|$) + endCaptures + + 1 + + patterns + + + match + [a-zA-Z0-9_]+ + name + entity.other.inherited-class.php + + + match + , + name + punctuation.separator.classes.php + + + + 2 + + name + entity.other.inherited-class.php + + + name + meta.interface.php + patterns + + + include + #namespace + + + + + begin + (?i)(?:^|(?<=<\?php))\s*(namespace)\b\s+(?=([a-z0-9_\\]+\s*($|[;{]|(\/[\/*])))|$) + beginCaptures + + 1 + + name + keyword.other.namespace.php + + + contentName + entity.name.type.namespace.php + end + (?i)(?=\s*$|[^a-z0-9_\\]) + name + meta.namespace.php + patterns + + + match + \\ + name + punctuation.separator.inheritance.php + + + + + begin + (?i)\s*\b(use)\s+(?:((const)|(function))\s+)? + beginCaptures + + 1 + + name + keyword.other.use.php + + 3 + + name + storage.type.const.php + + 4 + + name + storage.type.function.php + + + end + (?=;|(?:^\s*$)) + name + meta.use.php + patterns + + + include + #comments + + + begin + (?i)\s*(?=[a-z_0-9\\]) + end + (?xi)(?: + (?:\s*(as)\b\s*([a-z_0-9]*)\s*(?=,|;|$)) + |(?=,|;|$) + ) + endCaptures + + 1 + + name + keyword.other.use-as.php + + 2 + + name + support.other.namespace.use-as.php + + + patterns + + + include + #class-builtin + + + begin + (?i)\s*(?=[\\a-z_0-9]) + end + $|(?=[\s,;]) + name + support.other.namespace.use.php + patterns + + + match + \\ + name + punctuation.separator.inheritance.php + + + + + + + match + \s*,\s* + + + + + begin + (?i)^\s*(trait)\s+([a-zA-Z0-9_]+) + beginCaptures + + 1 + + name + storage.type.trait.php + + 2 + + name + entity.name.type.trait.php + + + end + (?=\{) + name + meta.trait.php + + + begin + (?i)^\s*(abstract|final)?\s*(class)\s+([a-z0-9_]+)\s* + beginCaptures + + 1 + + name + storage.modifier.abstract.php + + 2 + + name + storage.type.class.php + + 3 + + name + entity.name.type.class.php + + + end + (?=[;{]) + name + meta.class.php + patterns + + + include + #comments + + + begin + (?i)(extends)\s+ + beginCaptures + + 1 + + name + storage.modifier.extends.php + + + contentName + meta.other.inherited-class.php + end + (?i)(?=[^a-z_0-9\\]) + patterns + + + begin + (?i)(?=\\?[a-z_0-9]+\\) + end + (?i)([a-z_][a-z_0-9]*)?(?=[^a-z0-9_\\]) + endCaptures + + 1 + + name + entity.other.inherited-class.php + + + patterns + + + include + #namespace + + + + + include + #class-builtin + + + include + #namespace + + + match + (?i)[a-z_][a-z_0-9]* + name + entity.other.inherited-class.php + + + + + begin + (?i)(implements)\s+ + beginCaptures + + 1 + + name + storage.modifier.implements.php + + + end + (?i)(?=[;{]) + patterns + + + include + #comments + + + begin + (?i)(?=[a-z0-9_\\]+) + contentName + meta.other.inherited-class.php + end + (?i)(?:\s*(?:,|(?=[^a-z0-9_\\\s]))\s*) + patterns + + + begin + (?i)(?=\\?[a-z_0-9]+\\) + end + (?i)([a-z_][a-z_0-9]*)?(?=[^a-z0-9_\\]) + endCaptures + + 1 + + name + entity.other.inherited-class.php + + + patterns + + + include + #namespace + + + + + include + #class-builtin + + + include + #namespace + + + match + (?i)[a-z_][a-z_0-9]* + name + entity.other.inherited-class.php + + + + + + + + + captures + + 1 + + name + keyword.control.php + + + match + \s*\b((break|c(ase|ontinue)|d(e(clare|fault)|ie|o)|e(lse(if)?|nd(declare|for(each)?|if|switch|while)|xit)|for(each)?|if|return|switch|use|while|yield))\b + + + begin + (?i)\b((?:require|include)(?:_once)?)\b\s* + beginCaptures + + 1 + + name + keyword.control.import.include.php + + + end + (?=\s|;|$) + name + meta.include.php + patterns + + + include + #language + + + + + begin + \b(catch)\b\s*\(\s* + beginCaptures + + 1 + + name + keyword.control.exception.catch.php + + + end + ([A-Za-z_][A-Za-z_0-9]*)\s*((\$+)[a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)\s*\) + endCaptures + + 1 + + name + support.class.exception.php + + 2 + + name + variable.other.php + + 3 + + name + punctuation.definition.variable.php + + + name + meta.catch.php + patterns + + + include + #namespace + + + + + match + \b(catch|try|throw|exception|finally)\b + name + keyword.control.exception.php + + + begin + (?i)\b(function)\s*(&\s*)?(?=\() + beginCaptures + + 1 + + name + storage.type.function.php + + 2 + + name + storage.modifier.reference.php + + + end + \{ + name + meta.function.closure.php + patterns + + + begin + (\() + beginCaptures + + 1 + + name + punctuation.definition.parameters.begin.php + + + contentName + meta.function.arguments.php + end + (\)) + endCaptures + + 1 + + name + punctuation.definition.parameters.end.php + + + patterns + + + include + #function-arguments + + + + + begin + (?i)(use)\s*(\() + beginCaptures + + 1 + + name + keyword.other.function.use.php + + 2 + + name + punctuation.definition.parameters.begin.php + + + end + (\)) + endCaptures + + 1 + + name + punctuation.definition.parameters.end.php + + + patterns + + + captures + + 1 + + name + storage.modifier.reference.php + + 2 + + name + variable.other.php + + 3 + + name + punctuation.definition.variable.php + + + match + (?:\s*(&))?\s*((\$+)[a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)\s*(?=,|\)) + name + meta.function.closure.use.php + + + + + + + begin + (?x)\s* + ((?:(?:final|abstract|public|private|protected|static)\s+)*) + (function) + (?:\s+|(\s*&\s*)) + (?: + (__(?:call|construct|debugInfo|destruct|get|set|isset|unset|tostring|clone|set_state|sleep|wakeup|autoload|invoke|callStatic)) + |([a-zA-Z0-9_]+) + ) + \s* + (\() + beginCaptures + + 1 + + patterns + + + match + final|abstract|public|private|protected|static + name + storage.modifier.php + + + + 2 + + name + storage.type.function.php + + 3 + + name + storage.modifier.reference.php + + 4 + + name + support.function.magic.php + + 5 + + name + entity.name.function.php + + 6 + + name + punctuation.definition.parameters.begin.php + + + contentName + meta.function.arguments.php + end + (?ix) + (\)) # Close arguments + (?: # Optional return type + \s*(:)\s* + (\?)? + (?: + (array|bool|float|int|string) # scalar-type + | (callable|iterable) # base-type-declaration + | (void) + | ([a-z_0-9\\]*[a-z_][a-z_0-9]*) # qualified-name + ) + )? + + endCaptures + + 1 + + name + punctuation.definition.parameters.end.php + + 2 + + name + punctuation.separator.return-type.php + + 3 + + name + storage.modifier.nullable.php + + 4 + + name + storage.type.$4.php + + 5 + + name + storage.modifier.$5.php + + 6 + + name + storage.type.void.php + + 7 + + patterns + + + include + #class-name + + + + + name + meta.function.php + patterns + + + include + #function-arguments + + + + + include + #invoke-call + + + begin + (?xi)\s*(?= + [a-z_0-9$\\]+(::) + (?: + ([a-z_][a-z_0-9]*)\s*\( + | + ((\$+)[a-z_\x{7f}-\x{ff}][a-z0-9_\x{7f}-\x{ff}]*) + | + ([a-z_\x{7f}-\x{ff}][a-z0-9_\x{7f}-\x{ff}]*) + )? + ) + end + (?x)(::) + (?: + ([A-Za-z_][A-Za-z_0-9]*)\s*\( + | + ((\$+)[a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*) + | + ([a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*) + )? + endCaptures + + 1 + + name + keyword.operator.class.php + + 2 + + name + meta.function-call.static.php + + 3 + + name + variable.other.class.php + + 4 + + name + punctuation.definition.variable.php + + 5 + + name + constant.other.class.php + + + patterns + + + match + (self|static|parent)\b + name + storage.type.php + + + include + #class-name + + + include + #variable-name + + + + + include + #variables + + + include + #strings + + + captures + + 1 + + name + support.function.construct.php + + 2 + + name + punctuation.definition.array.begin.php + + 3 + + name + punctuation.definition.array.end.php + + + match + (array)(\()(\)) + name + meta.array.empty.php + + + begin + (array)(\() + beginCaptures + + 1 + + name + support.function.construct.php + + 2 + + name + punctuation.definition.array.begin.php + + + end + \) + endCaptures + + 0 + + name + punctuation.definition.array.end.php + + + name + meta.array.php + patterns + + + include + #language + + + + + captures + + 1 + + name + storage.type.php + + + match + (?i)\s*\(\s*(array|real|double|float|int(eger)?|bool(ean)?|string|object|binary|unset)\s*\) + + + match + (?i)\b(array|real|double|float|int(eger)?|bool(ean)?|string|class|clone|var|function|interface|parent|self|object)\b + name + storage.type.php + + + match + (?i)\b(global|abstract|const|extends|implements|final|p(r(ivate|otected)|ublic)|static)\b + name + storage.modifier.php + + + include + #object + + + match + ; + name + punctuation.terminator.expression.php + + + include + #heredoc + + + match + \.=? + name + keyword.operator.string.php + + + match + => + name + keyword.operator.key.php + + + captures + + 1 + + name + keyword.operator.assignment.php + + 2 + + name + storage.modifier.reference.php + + 3 + + name + storage.modifier.reference.php + + + match + (?:(\=)(&))|(&(?=[$A-Za-z_])) + + + match + (@) + name + keyword.operator.error-control.php + + + match + (\-\-|\+\+) + name + keyword.operator.increment-decrement.php + + + match + (\-|\+|\*|/|%) + name + keyword.operator.arithmetic.php + + + match + (?i)(!|&&|\|\|)|\b(and|or|xor|as)\b + name + keyword.operator.logical.php + + + include + #function-call + + + match + <<|>>|~|\^|&|\| + name + keyword.operator.bitwise.php + + + match + (===|==|!==|!=|<=|>=|<>|<|>) + name + keyword.operator.comparison.php + + + match + = + name + keyword.operator.assignment.php + + + begin + (?i)\b(instanceof)\b\s+(?=[\\$a-z_]) + beginCaptures + + 1 + + name + keyword.operator.type.php + + + end + (?=[^\\$A-Za-z_0-9]) + patterns + + + include + #class-name + + + include + #variable-name + + + + + include + #numbers + + + include + #instantiation + + + captures + + 1 + + name + keyword.control.goto.php + + 2 + + name + support.other.php + + + match + (?i)(goto)\s+([a-z_][a-z_0-9]*) + + + captures + + 1 + + name + entity.name.goto-label.php + + + match + (?i)^\s*([a-z_][a-z_0-9]*)\s*: + + + include + #string-backtick + + + begin + \[ + beginCaptures + + 0 + + name + punctuation.section.array.begin.php + + + end + \] + endCaptures + + 0 + + name + punctuation.section.array.end.php + + + patterns + + + include + #language + + + + + include + #constants + + + + namespace + + begin + (?i)(?:(namespace)|[a-z0-9_]+)?(\\)(?=.*?([^a-z0-9_\\]|\z)) + beginCaptures + + 1 + + name + variable.language.namespace.php + + 2 + + name + punctuation.separator.inheritance.php + + + end + (?i)(?=[a-z0-9_]*([^a-z0-9_\\]|\z)) + name + support.other.namespace.php + patterns + + + captures + + 1 + + name + punctuation.separator.inheritance.php + + + match + (?i)(\\) + + + + numbers + + match + \b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)\b + name + constant.numeric.php + + object + + patterns + + + begin + (->)(\$?\{) + beginCaptures + + 1 + + name + keyword.operator.class.php + + 2 + + name + punctuation.definition.variable.php + + + end + (\}) + endCaptures + + 1 + + name + punctuation.definition.variable.php + + + patterns + + + include + #language + + + + + captures + + 1 + + name + keyword.operator.class.php + + 2 + + name + meta.function-call.object.php + + 3 + + name + variable.other.property.php + + 4 + + name + punctuation.definition.variable.php + + + match + (?x)(->) + (?: + ([A-Za-z_][A-Za-z_0-9]*)\s*\( + | + ((\$+)?[a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*) + )? + + + + parameter-default-types + + patterns + + + include + #strings + + + include + #numbers + + + include + #string-backtick + + + include + #variables + + + match + => + name + keyword.operator.key.php + + + match + = + name + keyword.operator.assignment.php + + + match + &(?=\s*\$) + name + storage.modifier.reference.php + + + begin + (array)\s*(\() + beginCaptures + + 1 + + name + support.function.construct.php + + 2 + + name + punctuation.definition.array.begin.php + + + end + \) + endCaptures + + 0 + + name + punctuation.definition.array.end.php + + + name + meta.array.php + patterns + + + include + #parameter-default-types + + + + + include + #instantiation + + + begin + (?xi)\s*(?= + [a-z_0-9\\]+(::) + ([a-z_\x{7f}-\x{ff}][a-z0-9_\x{7f}-\x{ff}]*)? + ) + end + (?i)(::)([a-z_\x{7f}-\x{ff}][a-z0-9_\x{7f}-\x{ff}]*)? + endCaptures + + 1 + + name + keyword.operator.class.php + + 2 + + name + constant.other.class.php + + + patterns + + + include + #class-name + + + + + include + #constants + + + + php_doc + + patterns + + + comment + PHPDocumentor only recognises lines with an asterisk as the first non-whitespaces character + match + ^(?!\s*\*).*$\n? + name + invalid.illegal.missing-asterisk.phpdoc.php + + + captures + + 1 + + name + keyword.other.phpdoc.php + + 3 + + name + storage.modifier.php + + 4 + + name + invalid.illegal.wrong-access-type.phpdoc.php + + + match + ^\s*\*\s*(@access)\s+((public|private|protected)|(.+))\s*$ + + + captures + + 1 + + name + keyword.other.phpdoc.php + + 2 + + name + markup.underline.link.php + + + match + (@xlink)\s+(.+)\s*$ + + + match + \@(a(bstract|uthor)|c(ategory|opyright)|example|global|internal|li(cense|nk)|pa(ckage|ram)|return|s(ee|ince|tatic|ubpackage)|t(hrows|odo)|v(ar|ersion)|uses|deprecated|final|ignore)\b + name + keyword.other.phpdoc.php + + + captures + + 1 + + name + keyword.other.phpdoc.php + + + match + \{(@(link)).+?\} + name + meta.tag.inline.phpdoc.php + + + + regex-double-quoted + + begin + (?x)"/ (?= (\\.|[^"/])++/[imsxeADSUXu]*" ) + beginCaptures + + 0 + + name + punctuation.definition.string.begin.php + + + end + (/)([imsxeADSUXu]*)(") + endCaptures + + 0 + + name + punctuation.definition.string.end.php + + + name + string.regexp.double-quoted.php + patterns + + + comment + Escaped from the regexp – there can also be 2 backslashes (since 1 will escape the first) + match + (\\){1,2}[.$^\[\]{}] + name + constant.character.escape.regex.php + + + include + #interpolation + + + captures + + 1 + + name + punctuation.definition.arbitrary-repitition.php + + 3 + + name + punctuation.definition.arbitrary-repitition.php + + + match + (\{)\d+(,\d+)?(\}) + name + string.regexp.arbitrary-repitition.php + + + begin + \[(?:\^?\])? + captures + + 0 + + name + punctuation.definition.character-class.php + + + end + \] + name + string.regexp.character-class.php + patterns + + + include + #interpolation + + + + + match + [$^+*] + name + keyword.operator.regexp.php + + + + regex-single-quoted + + begin + (?x)'/ (?= ( \\ (?: \\ (?: \\ [\\']? | [^'] ) | . ) | [^'/] )++/[imsxeADSUXu]*' ) + beginCaptures + + 0 + + name + punctuation.definition.string.begin.php + + + end + (/)([imsxeADSUXu]*)(') + endCaptures + + 0 + + name + punctuation.definition.string.end.php + + + name + string.regexp.single-quoted.php + patterns + + + captures + + 1 + + name + punctuation.definition.arbitrary-repitition.php + + 3 + + name + punctuation.definition.arbitrary-repitition.php + + + match + (\{)\d+(,\d+)?(\}) + name + string.regexp.arbitrary-repitition.php + + + begin + \[(?:\^?\])? + captures + + 0 + + name + punctuation.definition.character-class.php + + + end + \] + name + string.regexp.character-class.php + patterns + + + include + #single_quote_regex_escape + + + + + match + [$^+*] + name + keyword.operator.regexp.php + + + include + #single_quote_regex_escape + + + repository + + single_quote_regex_escape + + comment + Support both PHP string and regex escaping + match + (?x) \\ (?: \\ (?: \\ [\\']? | [^'] ) | . ) + name + constant.character.escape.php + + + + sql-string-double-quoted + + begin + "\s*(?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER)\b) + beginCaptures + + 0 + + name + punctuation.definition.string.begin.php + + + contentName + source.sql.embedded.php + end + " + endCaptures + + 0 + + name + punctuation.definition.string.end.php + + + name + string.quoted.double.sql.php + patterns + + + match + #(\\"|[^"])*(?="|$\n?) + name + comment.line.number-sign.sql + + + match + --(\\"|[^"])*(?="|$\n?) + name + comment.line.double-dash.sql + + + match + \\[\\"`'] + name + constant.character.escape.php + + + comment + Unclosed strings must be captured to avoid them eating the remainder of the PHP script + Sample case: $sql = "SELECT * FROM bar WHERE foo = '" . $variable . "'" + match + '(?=((\\')|[^'"])*("|$)) + name + string.quoted.single.unclosed.sql + + + comment + Unclosed strings must be captured to avoid them eating the remainder of the PHP script + Sample case: $sql = "SELECT * FROM bar WHERE foo = '" . $variable . "'" + match + `(?=((\\`)|[^`"])*("|$)) + name + string.quoted.other.backtick.unclosed.sql + + + begin + ' + end + ' + name + string.quoted.single.sql + patterns + + + include + #interpolation + + + + + begin + ` + end + ` + name + string.quoted.other.backtick.sql + patterns + + + include + #interpolation + + + + + include + #interpolation + + + include + source.sql + + + + sql-string-single-quoted + + begin + '\s*(?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER)\b) + beginCaptures + + 0 + + name + punctuation.definition.string.begin.php + + + contentName + source.sql.embedded.php + end + ' + endCaptures + + 0 + + name + punctuation.definition.string.end.php + + + name + string.quoted.single.sql.php + patterns + + + match + #(\\'|[^'])*(?='|$\n?) + name + comment.line.number-sign.sql + + + match + --(\\'|[^'])*(?='|$\n?) + name + comment.line.double-dash.sql + + + match + \\[\\'`"] + name + constant.character.escape.php + + + comment + Unclosed strings must be captured to avoid them eating the remainder of the PHP script + Sample case: $sql = "SELECT * FROM bar WHERE foo = '" . $variable . "'" + match + `(?=((\\`)|[^`'])*('|$)) + name + string.quoted.other.backtick.unclosed.sql + + + comment + Unclosed strings must be captured to avoid them eating the remainder of the PHP script + Sample case: $sql = "SELECT * FROM bar WHERE foo = '" . $variable . "'" + match + "(?=((\\")|[^"'])*('|$)) + name + string.quoted.double.unclosed.sql + + + include + source.sql + + + + string-backtick + + begin + ` + beginCaptures + + 0 + + name + punctuation.definition.string.begin.php + + + end + ` + endCaptures + + 0 + + name + punctuation.definition.string.end.php + + + name + string.interpolated.php + patterns + + + match + \\. + name + constant.character.escape.php + + + include + #interpolation + + + + string-double-quoted + + begin + " + beginCaptures + + 0 + + name + punctuation.definition.string.begin.php + + + comment + This contentName is just to allow the usage of “select scope” to select the string contents first, then the string with quotes + contentName + meta.string-contents.quoted.double.php + end + " + endCaptures + + 0 + + name + punctuation.definition.string.end.php + + + name + string.quoted.double.php + patterns + + + include + #interpolation + + + + string-single-quoted + + begin + ' + beginCaptures + + 0 + + name + punctuation.definition.string.begin.php + + + contentName + meta.string-contents.quoted.single.php + end + ' + endCaptures + + 0 + + name + punctuation.definition.string.end.php + + + name + string.quoted.single.php + patterns + + + match + \\[\\'] + name + constant.character.escape.php + + + + strings + + patterns + + + include + #regex-double-quoted + + + include + #sql-string-double-quoted + + + include + #string-double-quoted + + + include + #regex-single-quoted + + + include + #sql-string-single-quoted + + + include + #string-single-quoted + + + + support + + patterns + + + match + (?i)\bapc_(s(tore|ma_info)|c(ompile_file|lear_cache|a(s|che_info))|inc|de(c|fine_constants|lete(_file)?)|exists|fetch|load_constants|add|bin_(dump(file)?|load(file)?))\b + name + support.function.apc.php + + + match + (?i)\bapcu_(s(tore|ma_info)|c(lear_cache|a(s|che_info))|inc|de(c|lete)|e(ntry|xists)|fetch|add)\b + name + support.function.apcu.php + + + match + (?i)\b(s(huffle|izeof|ort)|n(ext|at(sort|casesort))|c(o(unt|mpact)|urrent)|in_array|u(sort|ksort|asort)|p(os|rev)|e(nd|ach|xtract)|k(sort|ey(_exists)?|rsort)|list|a(sort|r(sort|ray(_(s(hift|um|plice|earch|lice)|c(h(unk|ange_key_case)|o(unt_values|lumn|mbine))|intersect(_(u(key|assoc)|key|assoc))?|diff(_(u(key|assoc)|key|assoc))?|u(n(shift|ique)|intersect(_(uassoc|assoc))?|diff(_(uassoc|assoc))?)|p(op|ush|ad|roduct)|values|key(s|_exists)|f(il(ter|l(_keys)?)|lip)|walk(_recursive)?|r(e(duce|place(_recursive)?|verse)|and)|m(ultisort|erge(_recursive)?|ap)))?))|r(sort|eset|ange))\b + name + support.function.array.php + + + match + (?i)\b(s(how_source|ys_getloadavg|leep)|highlight_(string|file)|con(stant|nection_(status|aborted))|time_(sleep_until|nanosleep)|ignore_user_abort|d(ie|efine(d)?)|u(sleep|n(iqid|pack))|__halt_compiler|p(hp_(strip_whitespace|check_syntax)|ack)|e(val|xit)|get_browser)\b + name + support.function.basic_functions.php + + + match + (?i)\bbc(s(cale|ub|qrt)|comp|div|pow(mod)?|add|m(od|ul))\b + name + support.function.bcmath.php + + + match + (?i)\bblenc_encrypt\b + name + support.function.blenc.php + + + match + (?i)\bMongoDB\\BSON\\(to(JSON|PHP)|from(JSON|PHP))\b + name + support.function.bson.php + + + match + (?i)\bbz(c(ompress|lose)|open|decompress|err(str|no|or)|flush|write|read)\b + name + support.function.bz2.php + + + match + (?i)\b(cal_(to_jd|info|days_in_month|from_jd)|unixtojd|j(d(to(unix|j(ulian|ewish)|french|gregorian)|dayofweek|monthname)|uliantojd|ewishtojd)|easter_da(ys|te)|frenchtojd|gregoriantojd)\b + name + support.function.calendar.php + + + match + (?i)\b(c(lass_(exists|alias)|all_user_method(_array)?)|trait_exists|i(s_(subclass_of|a)|nterface_exists)|__autoload|property_exists|get_(c(lass(_(vars|methods))?|alled_class)|object_vars|declared_(classes|traits|interfaces)|parent_class)|method_exists)\b + name + support.function.classobj.php + + + match + (?i)\b(com_(create_guid|print_typeinfo|event_sink|load_typelib|get_active_object|message_pump)|variant_(s(ub|et(_type)?)|n(ot|eg)|c(a(st|t)|mp)|i(nt|div|mp)|or|d(iv|ate_(to_timestamp|from_timestamp))|pow|eqv|fix|a(nd|dd|bs)|round|get_type|xor|m(od|ul)))\b + name + support.function.com.php + + + match + (?i)\brandom_(int|bytes)\b + name + support.function.csprng.php + + + match + (?i)\bctype_(space|cntrl|digit|upper|p(unct|rint)|lower|al(num|pha)|graph|xdigit)\b + name + support.function.ctype.php + + + match + (?i)\bcurl_(s(hare_(setopt|close|init)|trerror|etopt(_array)?)|c(opy_handle|lose)|init|unescape|pause|e(scape|rr(no|or)|xec)|version|file_create|reset|getinfo|multi_(s(trerror|e(topt|lect))|close|in(it|fo_read)|exec|add_handle|remove_handle|getcontent))\b + name + support.function.curl.php + + + match + (?i)\b(str(totime|ptime|ftime)|checkdate|time(zone_(name_(from_abbr|get)|transitions_get|identifiers_list|o(pen|ffset_get)|version_get|location_get|abbreviations_list))?|idate|date(_(su(n(set|_info|rise)|b)|create(_(immutable(_from_format)?|from_format))?|time(stamp_(set|get)|zone_(set|get)|_set)|i(sodate_set|nterval_(create_from_date_string|format))|offset_get|d(iff|efault_timezone_(set|get)|ate_set)|parse(_from_format)?|format|add|get_last_errors|modify))?|localtime|g(et(timeofday|date)|m(strftime|date|mktime))|m(icrotime|ktime))\b + name + support.function.datetime.php + + + match + (?i)\bdba_(sync|handlers|nextkey|close|insert|op(timize|en)|delete|popen|exists|key_split|f(irstkey|etch)|list|replace)\b + name + support.function.dba.php + + + match + (?i)\bdbx_(sort|c(o(nnect|mpare)|lose)|e(scape_string|rror)|query|fetch_row)\b + name + support.function.dbx.php + + + match + (?i)\b(scandir|c(h(dir|root)|losedir)|opendir|dir|re(winddir|addir)|getcwd)\b + name + support.function.dir.php + + + match + (?i)\beio_(s(y(nc(_file_range|fs)?|mlink)|tat(vfs)?|e(ndfile|t_m(in_parallel|ax_(idle|p(oll_(time|reqs)|arallel)))|ek))|n(threads|op|pending|re(qs|ady))|c(h(own|mod)|ustom|lose|ancel)|truncate|init|open|dup2|u(nlink|time)|poll|event_loop|f(s(ync|tat(vfs)?)|ch(own|mod)|truncate|datasync|utime|allocate)|write|l(stat|ink)|r(e(name|a(d(dir|link|ahead)?|lpath))|mdir)|g(et_(event_stream|last_error)|rp(_(cancel|limit|add))?)|mk(nod|dir)|busy)\b + name + support.function.eio.php + + + match + (?i)\benchant_(dict_(s(tore_replacement|uggest)|check|is_in_session|describe|quick_check|add_to_(session|personal)|get_error)|broker_(set_(ordering|dict_path)|init|d(ict_exists|escribe)|free(_dict)?|list_dicts|request_(dict|pwl_dict)|get_(dict_path|error)))\b + name + support.function.enchant.php + + + match + (?i)\b(s(plit(i)?|ql_regcase)|ereg(i(_replace)?|_replace)?)\b + name + support.function.ereg.php + + + match + (?i)\b(set_e(rror_handler|xception_handler)|trigger_error|debug_(print_backtrace|backtrace)|user_error|error_(clear_last|log|reporting|get_last)|restore_e(rror_handler|xception_handler))\b + name + support.function.errorfunc.php + + + match + (?i)\b(s(hell_exec|ystem)|p(assthru|roc_(nice|close|terminate|open|get_status))|e(scapeshell(cmd|arg)|xec))\b + name + support.function.exec.php + + + match + (?i)\b(exif_(t(humbnail|agname)|imagetype|read_data)|read_exif_data)\b + name + support.function.exif.php + + + match + (?i)\bfann_(s(huffle_train_data|cale_(train(_data)?|input(_train_data)?|output(_train_data)?)|ubset_train_data|et_(s(caling_params|arprop_(step_error_(shift|threshold_factor)|temperature|weight_decay_shift))|ca(scade_(num_candidate_groups|candidate_(stagnation_epochs|change_fraction|limit)|output_(stagnation_epochs|change_fraction)|weight_multiplier|activation_(steepnesses|functions)|m(in_(cand_epochs|out_epochs)|ax_(cand_epochs|out_epochs)))|llback)|train(ing_algorithm|_(stop_function|error_function))|input_scaling_params|output_scaling_params|error_log|quickprop_(decay|mu)|weight(_array)?|learning_(rate|momentum)|activation_(steepness(_(hidden|output|layer))?|function(_(hidden|output|layer))?)|rprop_(increase_factor|de(crease_factor|lta_(zero|m(in|ax))))|bit_fail_limit)|ave(_train)?)|num_(input_train_data|output_train_data)|c(opy|lear_scaling_params|ascadetrain_on_(data|file)|reate_(s(hortcut(_array)?|tandard(_array)?|parse(_array)?)|train(_from_callback)?|from_file))|t(est(_data)?|rain(_(on_(data|file)|epoch))?)|init_weights|d(uplicate_train_data|es(cale_(train|input|output)|troy(_train)?))|print_error|length_train_data|r(un|e(set_(MSE|err(str|no))|ad_train_from_file)|andomize_weights)|get_(sarprop_(step_error_(shift|threshold_factor)|temperature|weight_decay_shift)|n(um_(input|output|layers)|etwork_type)|MSE|c(onnection_(array|rate)|ascade_(num_candidate(s|_groups)|candidate_(stagnation_epochs|change_fraction|limit)|output_(stagnation_epochs|change_fraction)|weight_multiplier|activation_(steepnesses(_count)?|functions(_count)?)|m(in_(cand_epochs|out_epochs)|ax_(cand_epochs|out_epochs))))|t(otal_(neurons|connections)|rain(ing_algorithm|_(stop_function|error_function)))|err(str|no)|quickprop_(decay|mu)|l(earning_(rate|momentum)|ayer_array)|activation_(steepness|function)|rprop_(increase_factor|de(crease_factor|lta_(zero|m(in|ax))))|bi(t_fail(_limit)?|as_array))|merge_train_data)\b + name + support.function.fann.php + + + match + (?i)\b(s(ymlink|tat|et_file_buffer)|c(h(own|grp|mod)|opy|learstatcache)|t(ouch|empnam|mpfile)|is_(dir|uploaded_file|executable|file|writ(eable|able)|link|readable)|d(i(sk(_(total_space|free_space)|freespace)|rname)|elete)|u(nlink|mask)|p(close|open|a(thinfo|rse_ini_(string|file)))|f(s(canf|tat|eek)|nmatch|close|t(ell|runcate)|ile(size|ctime|type|inode|owner|_(put_contents|exists|get_contents)|perms|atime|group|mtime)?|open|p(ut(s|csv)|assthru)|eof|flush|write|lock|read|get(s(s)?|c(sv)?))|l(stat|ch(own|grp)|ink(info)?)|r(e(name|wind|a(d(file|link)|lpath(_cache_(size|get))?))|mdir)|glob|m(ove_uploaded_file|kdir)|basename)\b + name + support.function.file.php + + + match + (?i)\b(finfo_(set_flags|close|open|file|buffer)|mime_content_type)\b + name + support.function.fileinfo.php + + + match + (?i)\bfilter_(has_var|i(nput(_array)?|d)|var(_array)?|list)\b + name + support.function.filter.php + + + match + (?i)\bfastcgi_finish_request\b + name + support.function.fpm.php + + + match + (?i)\b(c(all_user_func(_array)?|reate_function)|unregister_tick_function|f(orward_static_call(_array)?|unc(tion_exists|_(num_args|get_arg(s)?)))|register_(shutdown_function|tick_function)|get_defined_functions)\b + name + support.function.funchand.php + + + match + (?i)\b(ngettext|textdomain|d(ngettext|c(ngettext|gettext)|gettext)|gettext|bind(textdomain|_textdomain_codeset))\b + name + support.function.gettext.php + + + match + (?i)\bgmp_(s(can(1|0)|trval|ign|ub|etbit|qrt(rem)?)|hamdist|ne(g|xtprime)|c(om|lrbit|mp)|testbit|i(n(tval|it|vert)|mport)|or|div(_(q(r)?|r)|exact)?|jacobi|p(o(pcount|w(m)?)|erfect_square|rob_prime)|export|fact|legendre|a(nd|dd|bs)|r(oot(rem)?|andom(_(seed|range|bits))?)|gcd(ext)?|xor|m(od|ul))\b + name + support.function.gmp.php + + + match + (?i)\bhash(_(h(kdf|mac(_file)?)|copy|init|update(_(stream|file))?|pbkdf2|equals|fi(nal|le)|algos))?\b + name + support.function.hash.php + + + match + (?i)\b(iconv(_(s(tr(pos|len|rpos)|ubstr|et_encoding)|get_encoding|mime_(decode(_headers)?|encode)))?|ob_iconv_handler)\b + name + support.function.iconv.php + + + match + (?i)\biis_(s(t(op_serv(ice|er)|art_serv(ice|er))|et_(s(cript_map|erver_rights)|dir_security|app_settings))|add_server|remove_server|get_(s(cript_map|erv(ice_state|er_(rights|by_(comment|path))))|dir_security))\b + name + support.function.iisfunc.php + + + match + (?i)\b(i(ptc(parse|embed)|mage(s(y|cale|tring(up)?|et(style|clip|t(hickness|ile)|interpolation|pixel|brush)|avealpha|x)|c(har(up)?|o(nvolution|py(res(ized|ampled)|merge(gray)?)?|lor(s(total|et|forindex)|closest(hwb|alpha)?|transparent|deallocate|exact(alpha)?|a(t|llocate(alpha)?)|resolve(alpha)?|match))|r(op(auto)?|eate(truecolor|from(string|jpeg|png|w(ebp|bmp)|g(if|d(2(part)?)?)|x(pm|bm)|bmp))?))|t(ypes|tf(text|bbox)|ruecolortopalette)|i(struecolor|nterlace)|2wbmp|openpolygon|d(estroy|ashedline)|jpeg|_type_to_(extension|mime_type)|p(s(slantfont|text|e(ncodefont|xtendfont)|freefont|loadfont|bbox)|ng|olygon|alette(copy|totruecolor))|ellipse|f(t(text|bbox)|il(ter|l(toborder|ed(polygon|ellipse|arc|rectangle))?)|ont(height|width)|lip)|w(ebp|bmp)|l(ine|oadfont|ayereffect)|a(ntialias|ffine(matrix(concat|get))?|lphablending|rc)|r(otate|e(solution|ctangle))|g(if|d(2)?|etclip|ammacorrect|rab(screen|window))|xbm|bmp))|jpeg2wbmp|png2wbmp|g(d_info|etimagesize(fromstring)?))\b + name + support.function.image.php + + + match + (?i)\b(s(ys_get_temp_dir|et_(time_limit|include_path|magic_quotes_runtime))|cli_(set_process_title|get_process_title)|ini_(set|alter|restore|get(_all)?)|zend_(thread_id|version|logo_guid)|dl|p(hp(credits|info|_(sapi_name|ini_(scanned_files|loaded_file)|uname|logo_guid)|version)|utenv)|extension_loaded|version_compare|assert(_options)?|restore_include_path|g(c_(collect_cycles|disable|enable(d)?|mem_caches)|et(opt|_(c(urrent_user|fg_var)|include(d_files|_path)|defined_constants|extension_funcs|loaded_extensions|re(sources|quired_files)|magic_quotes_(runtime|gpc))|env|lastmod|rusage|my(inode|uid|pid|gid)))|m(emory_get_(usage|peak_usage)|a(in|gic_quotes_runtime)))\b + name + support.function.info.php + + + match + (?i)\bibase_(se(t_event_handler|rv(ice_(detach|attach)|er_info))|n(um_(params|fields)|ame_result)|c(o(nnect|mmit(_ret)?)|lose)|trans|d(elete_user|rop_db|b_info)|p(connect|aram_info|repare)|e(rr(code|msg)|xecute)|query|f(ield_info|etch_(object|assoc|row)|ree_(event_handler|query|result))|wait_event|a(dd_user|ffected_rows)|r(ollback(_ret)?|estore)|gen_id|m(odify_user|aintain_db)|b(lob_(c(lose|ancel|reate)|i(nfo|mport)|open|echo|add|get)|ackup))\b + name + support.function.interbase.php + + + match + (?i)\b(n(ormalizer_(normalize|is_normalized)|umfmt_(set_(symbol|text_attribute|pattern|attribute)|create|parse(_currency)?|format(_currency)?|get_(symbol|text_attribute|pattern|error_(code|message)|locale|attribute)))|collator_(s(ort(_with_sort_keys)?|et_(strength|attribute))|c(ompare|reate)|asort|get_(s(trength|ort_key)|error_(code|message)|locale|attribute))|transliterator_(create(_(inverse|from_rules))?|transliterate|list_ids|get_error_(code|message))|i(ntl(cal_get_error_(code|message)|tz_get_error_(code|message)|_(is_failure|error_name|get_error_(code|message)))|dn_to_(utf8|ascii))|datefmt_(set_(calendar|timezone(_id)?|pattern|lenient)|create|is_lenient|parse|format(_object)?|localtime|get_(calendar(_object)?|time(type|zone(_id)?)|datetype|pattern|error_(code|message)|locale))|locale_(set_default|c(ompose|anonicalize)|parse|filter_matches|lookup|accept_from_http|get_(script|d(isplay_(script|name|variant|language|region)|efault)|primary_language|keywords|all_variants|region))|resourcebundle_(c(ount|reate)|locales|get(_error_(code|message))?)|grapheme_(s(tr(str|i(str|pos)|pos|len|r(ipos|pos))|ubstr)|extract)|msgfmt_(set_pattern|create|parse(_message)?|format(_message)?|get_(pattern|error_(code|message)|locale)))\b + name + support.function.intl.php + + + match + (?i)\bjson_(decode|encode|last_error(_msg)?)\b + name + support.function.json.php + + + match + (?i)\bldap_(s(tart_tls|ort|e(t_(option|rebind_proc)|arch)|asl_bind)|next_(entry|attribute|reference)|c(o(n(nect|trol_paged_result(_response)?)|unt_entries|mpare)|lose)|t61_to_8859|d(n2ufn|elete)|8859_to_t61|unbind|parse_re(sult|ference)|e(scape|rr(no|2str|or)|xplode_dn)|f(irst_(entry|attribute|reference)|ree_result)|list|add|re(name|ad)|get_(option|dn|entries|values(_len)?|attributes)|mod(ify(_batch)?|_(del|add|replace))|bind)\b + name + support.function.ldap.php + + + match + (?i)\blibxml_(set_(streams_context|external_entity_loader)|clear_errors|disable_entity_loader|use_internal_errors|get_(errors|last_error))\b + name + support.function.libxml.php + + + match + (?i)\b(ezmlm_hash|mail)\b + name + support.function.mail.php + + + match + (?i)\b(s(in(h)?|qrt|rand)|h(ypot|exdec)|c(os(h)?|eil)|tan(h)?|i(s_(nan|infinite|finite)|ntdiv)|octdec|de(c(hex|oct|bin)|g2rad)|p(i|ow)|exp(m1)?|f(loor|mod)|l(cg_value|og(1(p|0))?)|a(sin(h)?|cos(h)?|tan(h|2)?|bs)|r(ound|a(nd|d2deg))|getrandmax|m(t_(srand|rand|getrandmax)|in|ax)|b(indec|ase_convert))\b + name + support.function.math.php + + + match + (?i)\bmb_(s(tr(str|cut|to(upper|lower)|i(str|pos|mwidth)|pos|width|len|r(chr|i(chr|pos)|pos))|ubst(itute_character|r(_count)?)|plit|end_mail)|http_(input|output)|c(heck_encoding|onvert_(case|encoding|variables|kana))|internal_encoding|output_handler|de(code_(numericentity|mimeheader)|tect_(order|encoding))|p(arse_str|referred_mime_name)|e(ncod(ing_aliases|e_(numericentity|mimeheader))|reg(i(_replace)?|_(search(_(setpos|init|pos|regs|get(pos|regs)))?|replace(_callback)?|match))?)|l(ist_encodings|anguage)|regex_(set_options|encoding)|get_info)\b + name + support.function.mbstring.php + + + match + (?i)\bm(crypt_(c(fb|reate_iv|bc)|ofb|decrypt|e(nc(_(self_test|is_block_(algorithm(_mode)?|mode)|get_(supported_key_sizes|iv_size|key_size|algorithms_name|modes_name|block_size))|rypt)|cb)|list_(algorithms|modes)|ge(neric(_(init|deinit|end))?|t_(cipher_name|iv_size|key_size|block_size))|module_(self_test|close|is_block_(algorithm(_mode)?|mode)|open|get_(supported_key_sizes|algo_(key_size|block_size))))|decrypt_generic)\b + name + support.function.mcrypt.php + + + match + (?i)\bmemcache_debug\b + name + support.function.memcache.php + + + match + (?i)\bmhash(_(count|keygen_s2k|get_(hash_name|block_size)))?\b + name + support.function.mhash.php + + + match + (?i)\b(log_(cmd_(insert|delete|update)|killcursor|write_batch|reply|getmore)|bson_(decode|encode))\b + name + support.function.mongo.php + + + match + (?i)\bmysql_(s(tat|e(t_charset|lect_db))|num_(fields|rows)|c(onnect|l(ient_encoding|ose)|reate_db)|t(hread_id|ablename)|in(sert_id|fo)|d(ata_seek|rop_db|b_(name|query))|unbuffered_query|p(connect|ing)|e(scape_string|rr(no|or))|query|f(ield_(seek|name|t(ype|able)|flags|len)|etch_(object|field|lengths|a(ssoc|rray)|row)|ree_result)|list_(tables|dbs|processes|fields)|affected_rows|re(sult|al_escape_string)|get_(server_info|host_info|client_info|proto_info))\b + name + support.function.mysql.php + + + match + (?i)\bmysqli_(s(sl_set|t(ore_result|at|mt_(s(tore_result|end_long_data)|next_result|close|init|data_seek|prepare|execute|f(etch|ree_result)|attr_(set|get)|res(ult_metadata|et)|get_(warnings|result)|more_results|bind_(param|result)))|e(nd_(query|long_data)|t_(charset|opt|local_infile_(handler|default))|lect_db)|lave_query|avepoint)|next_result|c(ha(nge_user|racter_set_name)|o(nnect|mmit)|l(ient_encoding|ose))|thread_safe|init|options|d(isable_r(pl_parse|eads_from_master)|ump_debug_info|ebug|ata_seek)|use_result|p(ing|oll|aram_count|repare)|e(scape_string|nable_r(pl_parse|eads_from_master)|xecute|mbedded_server_(start|end))|kill|query|f(ield_seek|etch(_(object|field(s|_direct)?|a(ssoc|ll|rray)|row))?|ree_result)|autocommit|r(ollback|pl_(p(arse_enabled|robe)|query_type)|e(port|fresh|lease_savepoint|a(p_async_query|l_(connect|escape_string|query))))|get_(c(harset|onnection_stats|lient_(stats|info|version)|ache_stats)|warnings|links_stats|metadata)|m(ore_results|ulti_query|aster_query)|b(ind_(param|result)|egin_transaction))\b + name + support.function.mysqli.php + + + match + (?i)\bmysqlnd_memcache_(set|get_config)\b + name + support.function.mysqlnd-memcache.php + + + match + (?i)\bmysqlnd_ms_(set_(user_pick_server|qos)|dump_servers|query_is_select|fabric_select_(shard|global)|get_(stats|last_(used_connection|gtid))|xa_(commit|rollback|gc|begin)|match_wild)\b + name + support.function.mysqlnd-ms.php + + + match + (?i)\bmysqlnd_qc_(set_(storage_handler|cache_condition|is_select|user_handlers)|clear_cache|get_(normalized_query_trace_log|c(ore_stats|ache_info)|query_trace_log|available_handlers))\b + name + support.function.mysqlnd-qc.php + + + match + (?i)\bmysqlnd_uh_(set_(statement_proxy|connection_proxy)|convert_to_mysqlnd)\b + name + support.function.mysqlnd-uh.php + + + match + (?i)\b(s(yslog|ocket_(set_(timeout|blocking)|get_status)|et(cookie|rawcookie))|h(ttp_response_code|eader(s_(sent|list)|_re(gister_callback|move))?)|c(heckdnsrr|loselog)|i(net_(ntop|pton)|p2long)|openlog|d(ns_(check_record|get_(record|mx))|efine_syslog_variables)|pfsockopen|fsockopen|long2ip|get(servby(name|port)|host(name|by(name(l)?|addr))|protobyn(umber|ame)|mxrr))\b + name + support.function.network.php + + + match + (?i)\bnsapi_(virtual|re(sponse_headers|quest_headers))\b + name + support.function.nsapi.php + + + match + (?i)\boci(s(tatementtype|e(tprefetch|rverversion)|avelob(file)?)|n(umcols|ew(c(ollection|ursor)|descriptor)|logon)|c(o(l(umn(s(cale|ize)|name|type(raw)?|isnull|precision)|l(size|trim|a(ssign(elem)?|ppend)|getelem|max))|mmit)|loselob|ancel)|internaldebug|definebyname|_(s(tatement_type|e(t_(client_i(nfo|dentifier)|prefetch|edition|action|module_name)|rver_version))|n(um_(fields|rows)|ew_(c(o(nnect|llection)|ursor)|descriptor))|c(o(nnect|mmit)|l(ient_version|ose)|ancel)|internal_debug|d(isable_taf_callback|efine_by_name)|p(connect|a(ssword_change|rse))|e(rror|xecute)|f(ield_(s(cale|ize)|name|type(_raw)?|is_null|precision)|etch(_(object|a(ssoc|ll|rray)|row))?|ree_(statement|descriptor))|lob_(copy|is_equal)|r(ollback|e(sult|gister_taf_callback))|get_implicit_resultset|bind_(array_by_name|by_name))|p(logon|arse)|e(rror|xecute)|f(etch(statement|into)?|ree(statement|c(ollection|ursor)|desc))|write(temporarylob|lobtofile)|lo(adlob|go(n|ff))|r(o(wcount|llback)|esult)|bindbyname)\b + name + support.function.oci8.php + + + match + (?i)\bopcache_(compile_file|i(s_script_cached|nvalidate)|reset|get_(status|configuration))\b + name + support.function.opcache.php + + + match + (?i)\bopenssl_(s(ign|pki_(new|export(_challenge)?|verify)|eal)|c(sr_(sign|new|export(_to_file)?|get_(subject|public_key))|ipher_iv_length)|open|d(h_compute_key|igest|ecrypt)|p(ublic_(decrypt|encrypt)|k(cs(12_(export(_to_file)?|read)|7_(sign|decrypt|encrypt|verify))|ey_(new|export(_to_file)?|free|get_(details|p(ublic|rivate))))|rivate_(decrypt|encrypt)|bkdf2)|e(ncrypt|rror_string)|verify|free_key|random_pseudo_bytes|get_(c(ipher_methods|ert_locations)|p(ublickey|rivatekey)|md_methods)|x509_(check(_private_key|purpose)|parse|export(_to_file)?|f(ingerprint|ree)|read))\b + name + support.function.openssl.php + + + match + (?i)\b(o(utput_(add_rewrite_var|reset_rewrite_vars)|b_(start|clean|implicit_flush|end_(clean|flush)|flush|list_handlers|g(zhandler|et_(status|c(ontents|lean)|flush|le(ngth|vel)))))|flush)\b + name + support.function.output.php + + + match + (?i)\bpassword_(hash|needs_rehash|verify|get_info)\b + name + support.function.password.php + + + match + (?i)\bpcntl_(s(trerror|ig(nal(_(dispatch|get_handler))?|timedwait|procmask|waitinfo)|etpriority)|e(rrno|xec)|fork|w(stopsig|termsig|if(s(topped|ignaled)|exited)|exitstatus|ait(pid)?)|alarm|get(_last_error|priority))\b + name + support.function.pcntl.php + + + match + (?i)\bpg_(s(ocket|e(nd_(prepare|execute|query(_params)?)|t_(client_encoding|error_verbosity)|lect))|host|num_(fields|rows)|c(o(n(sume_input|nect(ion_(status|reset|busy)|_poll)?|vert)|py_(to|from))|l(ient_encoding|ose)|ancel_query)|t(ty|ra(nsaction_status|ce))|insert|options|d(elete|bname)|u(n(trace|escape_bytea)|pdate)|p(connect|ing|ort|ut_line|arameter_status|repare)|e(scape_(string|identifier|literal|bytea)|nd_copy|xecute)|version|query(_params)?|f(ield_(size|n(um|ame)|t(ype(_oid)?|able)|is_null|prtlen)|etch_(object|a(ssoc|ll(_columns)?|rray)|r(ow|esult))|lush|ree_result)|l(o_(seek|c(lose|reate)|t(ell|runcate)|import|open|unlink|export|write|read(_all)?)|ast_(notice|oid|error))|affected_rows|result_(s(tatus|eek)|error(_field)?)|get_(notify|pid|result)|meta_data)\b + name + support.function.pgsql.php + + + match + (?i)\b(virtual|apache_(setenv|note|child_terminate|lookup_uri|re(s(ponse_headers|et_timeout)|quest_headers)|get(_(version|modules)|env))|getallheaders)\b + name + support.function.php_apache.php + + + match + (?i)\bdom_import_simplexml\b + name + support.function.php_dom.php + + + match + (?i)\bftp_(s(sl_connect|ystype|i(te|ze)|et_option)|n(list|b_(continue|put|f(put|get)|get))|c(h(dir|mod)|onnect|dup|lose)|delete|p(ut|wd|asv)|exec|quit|f(put|get)|login|alloc|r(ename|aw(list)?|mdir)|get(_option)?|m(dtm|kdir))\b + name + support.function.php_ftp.php + + + match + (?i)\bimap_(s(can(mailbox)?|tatus|ort|ubscribe|e(t(_quota|flag_full|acl)|arch)|avebody)|header(s|info)?|num_(recent|msg)|c(heck|l(ose|earflag_full)|reate(mailbox)?)|t(hread|imeout)|open|delete(mailbox)?|8bit|u(n(subscribe|delete)|tf(7_(decode|encode)|8)|id)|ping|e(rrors|xpunge)|qprint|fetch(structure|header|text|_overview|mime|body)|l(sub|ist(s(can|ubscribed)|mailbox)?|ast_error)|a(ppend|lerts)|r(e(name(mailbox)?|open)|fc822_(parse_(headers|adrlist)|write_address))|g(c|et(subscribed|_quota(root)?|acl|mailboxes))|m(sgno|ime_header_decode|ail(_(co(py|mpose)|move)|boxmsginfo)?)|b(inary|ody(struct)?|ase64))\b + name + support.function.php_imap.php + + + match + (?i)\bmssql_(select_db|n(um_(fields|rows)|ext_result)|c(onnect|lose)|init|data_seek|pconnect|execute|query|f(ield_(seek|name|type|length)|etch_(object|field|a(ssoc|rray)|row|batch)|ree_(statement|result))|r(ows_affected|esult)|g(uid_string|et_last_message)|min_(error_severity|message_severity)|bind)\b + name + support.function.php_mssql.php + + + match + (?i)\bodbc_(s(tatistics|pecialcolumns|etoption)|n(um_(fields|rows)|ext_result)|c(o(nnect|lumn(s|privileges)|mmit)|ursor|lose(_all)?)|table(s|privileges)|d(o|ata_source)|p(connect|r(imarykeys|ocedure(s|columns)|epare))|e(rror(msg)?|xec(ute)?)|f(ield_(scale|n(um|ame)|type|precision|len)|oreignkeys|etch_(into|object|array|row)|ree_result)|longreadlen|autocommit|r(ollback|esult(_all)?)|gettypeinfo|binmode)\b + name + support.function.php_odbc.php + + + match + (?i)\bpreg_(split|quote|filter|last_error|replace(_callback(_array)?)?|grep|match(_all)?)\b + name + support.function.php_pcre.php + + + match + (?i)\b(spl_(classes|object_hash|autoload(_(call|unregister|extensions|functions|register))?)|class_(implements|uses|parents)|iterator_(count|to_array|apply))\b + name + support.function.php_spl.php + + + match + (?i)\bzip_(close|open|entry_(name|c(ompress(ionmethod|edsize)|lose)|open|filesize|read)|read)\b + name + support.function.php_zip.php + + + match + (?i)\bposix_(s(trerror|et(sid|uid|pgid|e(uid|gid)|rlimit|gid))|ctermid|t(tyname|imes)|i(satty|nitgroups)|uname|errno|kill|access|get(sid|cwd|uid|_last_error|p(id|pid|w(nam|uid)|g(id|rp))|e(uid|gid)|login|rlimit|g(id|r(nam|oups|gid)))|mk(nod|fifo))\b + name + support.function.posix.php + + + match + (?i)\bset(threadtitle|proctitle)\b + name + support.function.proctitle.php + + + match + (?i)\bpspell_(s(tore_replacement|uggest|ave_wordlist)|new(_(config|personal))?|c(heck|onfig_(save_repl|create|ignore|d(ict_dir|ata_dir)|personal|r(untogether|epl)|mode)|lear_session)|add_to_(session|personal))\b + name + support.function.pspell.php + + + match + (?i)\breadline(_(c(ompletion_function|lear_history|allback_(handler_(install|remove)|read_char))|info|on_new_line|write_history|list_history|add_history|re(display|ad_history)))?\b + name + support.function.readline.php + + + match + (?i)\brecode(_(string|file))?\b + name + support.function.recode.php + + + match + (?i)\brrd(c_disconnect|_(create|tune|info|update|error|version|f(irst|etch)|last(update)?|restore|graph|xport))\b + name + support.function.rrd.php + + + match + (?i)\b(s(hm_(has_var|detach|put_var|attach|remove(_var)?|get_var)|em_(acquire|re(lease|move)|get))|ftok|msg_(s(tat_queue|e(nd|t_queue))|queue_exists|re(ceive|move_queue)|get_queue))\b + name + support.function.sem.php + + + match + (?i)\bsession_(s(ta(tus|rt)|et_(save_handler|cookie_params)|ave_path)|name|c(ommit|ache_(expire|limiter)|reate_id)|i(s_registered|d)|de(stroy|code)|un(set|register)|encode|write_close|abort|re(set|g(ister(_shutdown)?|enerate_id))|g(c|et_cookie_params)|module_name)\b + name + support.function.session.php + + + match + (?i)\bshmop_(size|close|open|delete|write|read)\b + name + support.function.shmop.php + + + match + (?i)\bsimplexml_(import_dom|load_(string|file))\b + name + support.function.simplexml.php + + + match + (?i)\bsnmp(set|2_(set|walk|real_walk|get(next)?)|_(set_(oid_(numeric_print|output_format)|enum_print|valueretrieval|quick_print)|read_mib|get_(valueretrieval|quick_print))|3_(set|walk|real_walk|get(next)?)|walk(oid)?|realwalk|get(next)?)\b + name + support.function.snmp.php + + + match + (?i)\b(is_soap_fault|use_soap_error_handler)\b + name + support.function.soap.php + + + match + (?i)\bsocket_(s(hutdown|trerror|e(nd(to|msg)?|t(opt|_(nonblock|option|block))|lect))|c(onnect|l(ose|ear_error)|reate(_(pair|listen))?|msg_space)|import_stream|write|l(isten|ast_error)|accept|re(cv(from|msg)?|ad)|get(sockname|opt|_option|peername)|bind)\b + name + support.function.sockets.php + + + match + (?i)\bsqlite_(s(ingle_query|eek)|has_(prev|more)|n(um_(fields|rows)|ext)|c(hanges|olumn|urrent|lose|reate_(function|aggregate))|open|u(nbuffered_query|df_(decode_binary|encode_binary))|p(open|rev)|e(scape_string|rror_string|xec)|valid|key|query|f(ield_name|etch_(s(tring|ingle)|column_types|object|a(ll|rray))|actory)|l(ib(encoding|version)|ast_(insert_rowid|error))|array_query|rewind|busy_timeout)\b + name + support.function.sqlite.php + + + match + (?i)\bsqlsrv_(se(nd_stream_data|rver_info)|has_rows|n(um_(fields|rows)|ext_result)|c(o(n(nect|figure)|mmit)|l(ient_info|ose)|ancel)|prepare|e(rrors|xecute)|query|f(ield_metadata|etch(_(object|array))?|ree_stmt)|ro(ws_affected|llback)|get_(config|field)|begin_transaction)\b + name + support.function.sqlsrv.php + + + match + (?i)\bstats_(s(ta(ndard_deviation|t_(noncentral_t|correlation|in(nerproduct|dependent_t)|p(owersum|ercentile|aired_t)|gennch|binomial_coef))|kew)|harmonic_mean|c(ovariance|df_(n(oncentral_(chisquare|f)|egative_binomial)|c(hisquare|auchy)|t|uniform|poisson|exponential|f|weibull|l(ogistic|aplace)|gamma|b(inomial|eta)))|den(s_(n(ormal|egative_binomial)|c(hisquare|auchy)|t|pmf_(hypergeometric|poisson|binomial)|exponential|f|weibull|l(ogistic|aplace)|gamma|beta)|_uniform)|variance|kurtosis|absolute_deviation|rand_(setall|phrase_to_seeds|ranf|ge(n_(no(ncen(tral_(t|f)|ral_chisquare)|rmal)|chisquare|t|i(nt|uniform|poisson|binomial(_negative)?)|exponential|f(uniform)?|gamma|beta)|t_seeds)))\b + name + support.function.stats.php + + + match + (?i)\bs(tream_(s(ocket_(s(hutdown|e(ndto|rver))|client|pair|enable_crypto|accept|recvfrom|get_name)|upports_lock|e(t_(chunk_size|timeout|write_buffer|read_buffer|blocking)|lect))|notification_callback|co(ntext_(set_(option|default|params)|create|get_(options|default|params))|py_to_stream)|is_local|encoding|filter_(prepend|append|re(gister|move))|wrapper_(unregister|re(store|gister))|re(solve_include_path|gister_wrapper)|get_(contents|transports|filters|wrappers|line|meta_data)|bucket_(new|prepend|append|make_writeable))|et_socket_blocking)\b + name + support.function.streamsfuncs.php + + + match + (?i)\b(s(scanf|ha1(_file)?|tr(s(tr|pn)|n(c(asecmp|mp)|atc(asecmp|mp))|c(spn|hr|oll|asecmp|mp)|t(o(upper|k|lower)|r)|i(str|p(slashes|cslashes|os|_tags))|_(s(huffle|plit)|ireplace|pad|word_count|r(ot13|ep(eat|lace))|getcsv)|p(os|brk)|len|r(chr|ipos|pos|ev))|imilar_text|oundex|ubstr(_(co(unt|mpare)|replace))?|printf|etlocale)|h(tml(specialchars(_decode)?|_entity_decode|entities)|e(x2bin|brev(c)?))|n(umber_format|l(2br|_langinfo))|c(h(op|unk_split|r)|o(nvert_(cyr_string|uu(decode|encode))|unt_chars)|r(ypt|c32))|trim|implode|ord|uc(first|words)|join|p(arse_str|rint(f)?)|e(cho|xplode)|v(sprintf|printf|fprintf)|quote(d_printable_(decode|encode)|meta)|fprintf|wordwrap|l(cfirst|trim|ocaleconv|evenshtein)|add(slashes|cslashes)|rtrim|get_html_translation_table|m(oney_format|d5(_file)?|etaphone)|bin2hex)\b + name + support.function.string.php + + + match + (?i)\bsybase_(se(t_message_handler|lect_db)|num_(fields|rows)|c(onnect|lose)|d(eadlock_retry_count|ata_seek)|unbuffered_query|pconnect|query|f(ield_seek|etch_(object|field|a(ssoc|rray)|row)|ree_result)|affected_rows|result|get_last_message|min_(server_severity|client_severity|error_severity|message_severity))\b + name + support.function.sybase.php + + + match + (?i)\b(taint|is_tainted|untaint)\b + name + support.function.taint.php + + + match + (?i)\b(tidy_(s(et(opt|_encoding)|ave_config)|c(onfig_count|lean_repair)|is_x(html|ml)|diagnose|parse_(string|file)|error_count|warning_count|load_config|access_count|re(set_config|pair_(string|file))|get(opt|_(status|h(tml(_ver)?|ead)|config|o(utput|pt_doc)|r(oot|elease)|body)))|ob_tidyhandler)\b + name + support.function.tidy.php + + + match + (?i)\btoken_(name|get_all)\b + name + support.function.tokenizer.php + + + match + (?i)\btrader_(s(t(och(f|rsi)?|ddev)|in(h)?|u(m|b)|et_(compat|unstable_period)|qrt|ar(ext)?|ma)|ht_(sine|trend(line|mode)|dcp(hase|eriod)|phasor)|natr|c(ci|o(s(h)?|rrel)|dl(s(ho(otingstar|rtline)|t(icksandwich|alledpattern)|pinningtop|eparatinglines)|h(i(kkake(mod)?|ghwave)|omingpigeon|a(ngingman|rami(cross)?|mmer))|c(o(ncealbabyswall|unterattack)|losingmarubozu)|t(hrusting|a(sukigap|kuri)|ristar)|i(n(neck|vertedhammer)|dentical3crows)|2crows|onneck|d(oji(star)?|arkcloudcover|ragonflydoji)|u(nique3river|psidegap2crows)|3(starsinsouth|inside|outside|whitesoldiers|linestrike|blackcrows)|piercing|e(ngulfing|vening(star|dojistar))|kicking(bylength)?|l(ongl(ine|eggeddoji)|adderbottom)|a(dvanceblock|bandonedbaby)|ri(sefall3methods|ckshawman)|g(apsidesidewhite|ravestonedoji)|xsidegap3methods|m(orning(star|dojistar)|a(t(hold|chinglow)|rubozu))|b(elthold|reakaway))|eil|mo)|t(sf|ypprice|3|ema|an(h)?|r(i(x|ma)|ange))|obv|d(iv|ema|x)|ultosc|p(po|lus_d(i|m))|e(rrno|xp|ma)|var|kama|floor|w(clprice|illr|ma)|l(n|inearreg(_(slope|intercept|angle))?|og10)|a(sin|cos|t(an|r)|d(osc|d|x(r)?)?|po|vgprice|roon(osc)?)|r(si|oc(p|r(100)?)?)|get_(compat|unstable_period)|m(i(n(index|us_d(i|m)|max(index)?)?|dp(oint|rice))|om|ult|edprice|fi|a(cd(ext|fix)?|vp|x(index)?|ma)?)|b(op|eta|bands))\b + name + support.function.trader.php + + + match + (?i)\bUI\\(Draw\\Text\\Font\\fontFamilies|quit|run)\b + name + support.function.ui.php + + + match + (?i)\buopz_(co(py|mpose)|implement|overload|delete|undefine|extend|f(unction|lags)|re(store|name|define)|backup)\b + name + support.function.uopz.php + + + match + (?i)\b(http_build_query|url(decode|encode)|parse_url|rawurl(decode|encode)|get_(headers|meta_tags)|base64_(decode|encode))\b + name + support.function.url.php + + + match + (?i)\b(s(trval|e(ttype|rialize))|i(s(set|_(s(calar|tring)|nu(ll|meric)|callable|i(nt(eger)?|terable)|object|double|float|long|array|re(source|al)|bool))|ntval|mport_request_variables)|d(oubleval|ebug_zval_dump)|unse(t|rialize)|print_r|empty|var_(dump|export)|floatval|get(type|_(defined_vars|resource_type))|boolval)\b + name + support.function.var.php + + + match + (?i)\bwddx_(serialize_va(lue|rs)|deserialize|packet_(start|end)|add_vars)\b + name + support.function.wddx.php + + + match + (?i)\bxhprof_(sample_(disable|enable)|disable|enable)\b + name + support.function.xhprof.php + + + match + (?i)\b(utf8_(decode|encode)|xml_(set_(start_namespace_decl_handler|notation_decl_handler|character_data_handler|object|default_handler|unparsed_entity_decl_handler|processing_instruction_handler|e(nd_namespace_decl_handler|lement_handler|xternal_entity_ref_handler))|parse(_into_struct|r_(set_option|create(_ns)?|free|get_option))?|error_string|get_(current_(column_number|line_number|byte_index)|error_code)))\b + name + support.function.xml.php + + + match + (?i)\bxmlrpc_(se(t_type|rver_(c(all_method|reate)|destroy|add_introspection_data|register_(introspection_callback|method)))|is_fault|decode(_request)?|parse_method_descriptions|encode(_request)?|get_type)\b + name + support.function.xmlrpc.php + + + match + (?i)\bxmlwriter_(s(tart_(c(omment|data)|d(td(_(e(ntity|lement)|attlist))?|ocument)|pi|element(_ns)?|attribute(_ns)?)|et_indent(_string)?)|text|o(utput_memory|pen_(uri|memory))|end_(c(omment|data)|d(td(_(e(ntity|lement)|attlist))?|ocument)|pi|element|attribute)|f(ull_end_element|lush)|write_(c(omment|data)|dtd(_(e(ntity|lement)|attlist))?|pi|element(_ns)?|attribute(_ns)?|raw))\b + name + support.function.xmlwriter.php + + + match + (?i)\b(inflate_(init|add)|zlib_(decode|encode|get_coding_type)|deflate_(init|add)|readgzfile|gz(seek|c(ompress|lose)|tell|inflate|open|de(code|flate)|uncompress|p(uts|assthru)|e(ncode|of)|file|write|re(wind|ad)|get(s(s)?|c)))\b + name + support.function.zlib.php + + + match + (?i)\bis_int(eger)?\b + name + support.function.alias.php + + + + user-function-call + + begin + (?i)(?=[a-z_0-9\\]*[a-z_][a-z0-9_]*\s*\() + end + (?i)[a-z_][a-z_0-9]*(?=\s*\() + name + meta.function-call.php + patterns + + + include + #namespace + + + + var_basic + + patterns + + + captures + + 1 + + name + punctuation.definition.variable.php + + + match + (?x) + (\$+)[a-zA-Z_\x{7f}-\x{ff}] + [a-zA-Z0-9_\x{7f}-\x{ff}]*?\b + name + variable.other.php + + + + var_global + + captures + + 1 + + name + punctuation.definition.variable.php + + + match + (\$)((_(COOKIE|FILES|GET|POST|REQUEST))|arg(v|c))\b + name + variable.other.global.php + + var_global_safer + + captures + + 1 + + name + punctuation.definition.variable.php + + + match + (\$)((GLOBALS|_(ENV|SERVER|SESSION))) + name + variable.other.global.safer.php + + variable-name + + patterns + + + include + #var_global + + + include + #var_global_safer + + + captures + + 1 + + name + variable.other.php + + 10 + + name + string.unquoted.index.php + + 11 + + name + punctuation.section.array.end.php + + 2 + + name + punctuation.definition.variable.php + + 4 + + name + keyword.operator.class.php + + 5 + + name + variable.other.property.php + + 6 + + name + punctuation.section.array.begin.php + + 7 + + name + constant.numeric.index.php + + 8 + + name + variable.other.index.php + + 9 + + name + punctuation.definition.variable.php + + + comment + Simple syntax: $foo, $foo[0], $foo[$bar], $foo->bar + match + (?x) + ((\$)(?<name>[a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)) + (?: + (->)(\g<name>) + | + (\[) + (?:(\d+)|((\$)\g<name>)|(\w+)) + (\]) + )? + + + + captures + + 1 + + name + variable.other.php + + 2 + + name + punctuation.definition.variable.php + + 4 + + name + punctuation.definition.variable.php + + + comment + Simple syntax with braces: "foo${bar}baz" + match + (?x) + ((\$\{)(?<name>[a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)(\})) + + + + + variables + + patterns + + + include + #var_global + + + include + #var_global_safer + + + include + #var_basic + + + begin + (\$\{)(?=.*?\}) + beginCaptures + + 1 + + name + punctuation.definition.variable.php + + + end + (\}) + endCaptures + + 1 + + name + punctuation.definition.variable.php + + + patterns + + + include + #language + + + + + + + scopeName + text.html.php + uuid + 22986475-8CA5-11D9-AEDD-000D93C8BE28 + + \ No newline at end of file diff --git a/src/file-viewer/highlight-grammar/powershell.plist b/src/file-viewer/highlight-grammar/powershell.plist new file mode 100644 index 0000000..b7b4a06 --- /dev/null +++ b/src/file-viewer/highlight-grammar/powershell.plist @@ -0,0 +1,1614 @@ + + + + + fileTypes + + ps1 + psm1 + psd1 + + name + PowerShell + patterns + + + begin + <# + beginCaptures + + 0 + + name + punctuation.definition.comment.block.begin.powershell + + + end + #> + endCaptures + + 0 + + name + punctuation.definition.comment.block.end.powershell + + + name + comment.block.powershell + patterns + + + include + #commentEmbeddedDocs + + + + + match + [2-6]>&1|>>|>|<<|<|>|>\||[1-6]>|[1-6]>> + name + keyword.operator.redirection.powershell + + + include + #commands + + + include + #commentLine + + + include + #variable + + + include + #subexpression + + + include + #function + + + include + #attribute + + + include + #UsingDirective + + + include + #type + + + include + #hashtable + + + include + #doubleQuotedString + + + include + #scriptblock + + + comment + Needed to parse stuff correctly in 'argument mode'. (See about_parsing.) + include + #doubleQuotedStringEscapes + + + begin + ['\x{2018}-\x{201B}] + beginCaptures + + 0 + + name + punctuation.definition.string.begin.powershell + + + end + ['\x{2018}-\x{201B}] + applyEndPatternLast + + endCaptures + + 0 + + name + punctuation.definition.string.end.powershell + + + name + string.quoted.single.powershell + patterns + + + match + ['\x{2018}-\x{201B}]{2} + name + constant.character.escape.powershell + + + + + begin + (@["\x{201C}-\x{201E}])\s*$ + beginCaptures + + 1 + + name + punctuation.definition.string.begin.powershell + + + end + ^["\x{201C}-\x{201E}]@ + endCaptures + + 0 + + name + punctuation.definition.string.end.powershell + + + name + string.quoted.double.heredoc.powershell + patterns + + + include + #variableNoProperty + + + include + #doubleQuotedStringEscapes + + + include + #interpolation + + + + + begin + (@['\x{2018}-\x{201B}])\s*$ + beginCaptures + + 1 + + name + punctuation.definition.string.begin.powershell + + + end + ^['\x{2018}-\x{201B}]@ + endCaptures + + 0 + + name + punctuation.definition.string.end.powershell + + + name + string.quoted.single.heredoc.powershell + + + include + #numericConstant + + + begin + (@)(\() + beginCaptures + + 1 + + name + keyword.other.array.begin.powershell + + 2 + + name + punctuation.section.group.begin.powershell + + + end + \) + endCaptures + + 0 + + name + punctuation.section.group.end.powershell + + + name + meta.group.array-expression.powershell + patterns + + + include + $self + + + + + begin + ((\$))(\() + beginCaptures + + 1 + + name + keyword.other.substatement.powershell + + 2 + + name + punctuation.definition.subexpression.powershell + + 3 + + name + punctuation.section.group.begin.powershell + + + comment + TODO: move to repo; make recursive. + end + \) + endCaptures + + 0 + + name + punctuation.section.group.end.powershell + + + name + meta.group.complex.subexpression.powershell + patterns + + + include + $self + + + + + match + (\b(([A-Za-z0-9\-_\.]+)\.(?i:exe|com|cmd|bat))\b) + name + support.function.powershell + + + match + (?<!\w|-|\.)((?i:begin|break|catch|clean|continue|data|default|define|do|dynamicparam|else|elseif|end|exit|finally|for|from|if|in|inlinescript|parallel|param|process|return|sequence|switch|throw|trap|try|until|var|while)|%|\?)(?!\w) + name + keyword.control.powershell + + + match + (?<!\w|-|[^\)]\.)((?i:(foreach|where)(?!-object))|%|\?)(?!\w) + name + keyword.control.powershell + + + begin + (?<!\w)(--%)(?!\w) + beginCaptures + + 1 + + name + keyword.control.powershell + + + end + $ + patterns + + + match + .+ + name + string.unquoted.powershell + + + comment + This should be moved to the repository at some point. + + + comment + This should only be relevant inside a class but will require a rework of how classes are matched. This is a temp fix. + match + (?<!\w)((?i:hidden|static))(?!\w) + name + storage.modifier.powershell + + + captures + + 1 + + name + storage.type.powershell + + 2 + + name + entity.name.function + + + comment + capture should be entity.name.type, but it doesn't provide a good color in the default schema. + match + (?<!\w|-)((?i:class)|%|\?)(?:\s)+((?:\p{L}|\d|_|-|)+)\b + + + match + (?<!\w)-(?i:is(?:not)?|as)\b + name + keyword.operator.comparison.powershell + + + match + (?<!\w)-(?i:[ic]?(?:eq|ne|[gl][te]|(?:not)?(?:like|match|contains|in)|replace))(?!\p{L}) + name + keyword.operator.comparison.powershell + + + match + (?<!\w)-(?i:join|split)(?!\p{L})|! + name + keyword.operator.unary.powershell + + + match + (?<!\w)-(?i:and|or|not|xor)(?!\p{L})|! + name + keyword.operator.logical.powershell + + + match + (?<!\w)-(?i:band|bor|bnot|bxor|shl|shr)(?!\p{L}) + name + keyword.operator.bitwise.powershell + + + match + (?<!\w)-(?i:f)(?!\p{L}) + name + keyword.operator.string-format.powershell + + + match + [+%*/-]?=|[+/*%-] + name + keyword.operator.assignment.powershell + + + match + \|{2}|&{2}|; + name + punctuation.terminator.statement.powershell + + + match + &|(?<!\w)\.(?= )|`|,|\| + name + keyword.operator.other.powershell + + + comment + This is very imprecise, is there a syntax for 'must come after...' + match + (?<!\s|^)\.\.(?=\-?\d|\(|\$) + name + keyword.operator.range.powershell + + + repository + + commentLine + + begin + (?<![`\\-])(#)#* + captures + + 1 + + name + punctuation.definition.comment.powershell + + + end + $\n? + name + comment.line.powershell + patterns + + + include + #commentEmbeddedDocs + + + include + #RequiresDirective + + + + attribute + + begin + (\[)\s*\b(?i)(cmdletbinding|alias|outputtype|parameter|validatenotnull|validatenotnullorempty|validatecount|validateset|allownull|allowemptycollection|allowemptystring|validatescript|validaterange|validatepattern|validatelength|supportswildcards)\b + beginCaptures + + 1 + + name + punctuation.section.bracket.begin.powershell + + 2 + + name + support.function.attribute.powershell + + + end + (\]) + endCaptures + + 1 + + name + punctuation.section.bracket.end.powershell + + + name + meta.attribute.powershell + patterns + + + begin + \( + beginCaptures + + 0 + + name + punctuation.section.group.begin.powershell + + + end + \) + endCaptures + + 0 + + name + punctuation.section.group.end.powershell + + + patterns + + + include + $self + + + match + (?i)\b(mandatory|valuefrompipeline|valuefrompipelinebypropertyname|valuefromremainingarguments|position|parametersetname|defaultparametersetname|supportsshouldprocess|supportspaging|positionalbinding|helpuri|confirmimpact|helpmessage)\b(?:\s+)?(=)? + captures + + 1 + + name + variable.parameter.attribute.powershell + + 2 + + name + keyword.operator.assignment.powershell + + + + + + + + commands + + patterns + + + comment + Verb-Noun pattern: + match + (?:(\p{L}|\d|_|-|\\|\:)*\\)?\b(?i:Add|Approve|Assert|Backup|Block|Build|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Deploy|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Mount|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Write)\-.+?(?:\.(?i:exe|cmd|bat|ps1))?\b + name + support.function.powershell + + + comment + Builtin cmdlets with reserved verbs + match + (?<!\w)(?i:foreach-object)(?!\w) + name + support.function.powershell + + + comment + Builtin cmdlets with reserved verbs + match + (?<!\w)(?i:where-object)(?!\w) + name + support.function.powershell + + + comment + Builtin cmdlets with reserved verbs + match + (?<!\w)(?i:sort-object)(?!\w) + name + support.function.powershell + + + comment + Builtin cmdlets with reserved verbs + match + (?<!\w)(?i:tee-object)(?!\w) + name + support.function.powershell + + + + commentEmbeddedDocs + + patterns + + + captures + + 1 + + name + constant.string.documentation.powershell + + 2 + + name + keyword.operator.documentation.powershell + + + comment + these embedded doc keywords do not support arguments, must be the only thing on the line + match + (?:^|\G)(?i:\s*(\.)(COMPONENT|DESCRIPTION|EXAMPLE|FUNCTIONALITY|INPUTS|LINK|NOTES|OUTPUTS|ROLE|SYNOPSIS))\s*$ + name + comment.documentation.embedded.powershell + + + captures + + 1 + + name + constant.string.documentation.powershell + + 2 + + name + keyword.operator.documentation.powershell + + 3 + + name + keyword.operator.documentation.powershell + + + comment + these embedded doc keywords require arguments though the type required may be inconsistent, they may not all be able to use the same argument match + match + (?:^|\G)(?i:\s*(\.)(EXTERNALHELP|FORWARDHELP(?:CATEGORY|TARGETNAME)|PARAMETER|REMOTEHELPRUNSPACE))\s+(.+?)\s*$ + name + comment.documentation.embedded.powershell + + + + doubleQuotedStringEscapes + + patterns + + + match + `[`0abefnrtv'"\x{2018}-\x{201E}$] + name + constant.character.escape.powershell + + + include + #unicodeEscape + + + + unicodeEscape + + comment + `u{xxxx} added in PowerShell 6.0 + patterns + + + match + `u\{(?:(?:10)?([0-9a-fA-F]){1,4}|0?\g<1>{1,5})} + name + constant.character.escape.powershell + + + match + `u(?:\{[0-9a-fA-F]{,6}.)? + name + invalid.character.escape.powershell + + + + function + + begin + ^(?:\s*+)(?i)(function|filter|configuration|workflow)\s+(?:(global|local|script|private):)?((?:\p{L}|\d|_|-|\.)+) + beginCaptures + + 0 + + name + meta.function.powershell + + 1 + + name + storage.type.powershell + + 2 + + name + storage.modifier.scope.powershell + + 3 + + name + entity.name.function.powershell + + + end + (?=\{|\() + patterns + + + include + #commentLine + + + + subexpression + + begin + \( + beginCaptures + + 0 + + name + punctuation.section.group.begin.powershell + + + end + \) + endCaptures + + 0 + + name + punctuation.section.group.end.powershell + + + name + meta.group.simple.subexpression.powershell + patterns + + + include + $self + + + + interpolation + + begin + (((\$)))((\()) + beginCaptures + + 1 + + name + keyword.other.substatement.powershell + + 2 + + name + punctuation.definition.substatement.powershell + + 3 + + name + punctuation.section.embedded.substatement.begin.powershell + + 4 + + name + punctuation.section.group.begin.powershell + + 5 + + name + punctuation.section.embedded.substatement.begin.powershell + + + contentName + interpolated.complex.source.powershell + end + (\)) + endCaptures + + 0 + + name + punctuation.section.group.end.powershell + + 1 + + name + punctuation.section.embedded.substatement.end.powershell + + + name + meta.embedded.substatement.powershell + patterns + + + include + $self + + + + numericConstant + + patterns + + + captures + + 1 + + name + constant.numeric.hex.powershell + + 2 + + name + keyword.other.powershell + + + match + (?<!\w)([-+]?0(?:x|X)[0-9a-fA-F_]+(?:U|u|L|l|UL|Ul|uL|ul|LU|Lu|lU|lu)?)((?i:[kmgtp]b)?)\b + + + captures + + 1 + + name + constant.numeric.integer.powershell + + 2 + + name + keyword.other.powershell + + + match + (?<!\w)([-+]?(?:[0-9_]+)?\.[0-9_]+(?:(?:e|E)[0-9]+)?(?:F|f|D|d|M|m)?)((?i:[kmgtp]b)?)\b + + + captures + + 1 + + name + constant.numeric.octal.powershell + + 2 + + name + keyword.other.powershell + + + match + (?<!\w)([-+]?0(?:b|B)[01_]+(?:U|u|L|l|UL|Ul|uL|ul|LU|Lu|lU|lu)?)((?i:[kmgtp]b)?)\b + + + captures + + 1 + + name + constant.numeric.integer.powershell + + 2 + + name + keyword.other.powershell + + + match + (?<!\w)([-+]?[0-9_]+(?:e|E)(?:[0-9_])?+(?:F|f|D|d|M|m)?)((?i:[kmgtp]b)?)\b + + + captures + + 1 + + name + constant.numeric.integer.powershell + + 2 + + name + keyword.other.powershell + + + match + (?<!\w)([-+]?[0-9_]+\.(?:e|E)(?:[0-9_])?+(?:F|f|D|d|M|m)?)((?i:[kmgtp]b)?)\b + + + captures + + 1 + + name + constant.numeric.integer.powershell + + 2 + + name + keyword.other.powershell + + + match + (?<!\w)([-+]?[0-9_]+[\.]?(?:F|f|D|d|M|m))((?i:[kmgtp]b)?)\b + + + captures + + 1 + + name + constant.numeric.integer.powershell + + 2 + + name + keyword.other.powershell + + + match + (?<!\w)([-+]?[0-9_]+[\.]?(?:U|u|L|l|UL|Ul|uL|ul|LU|Lu|lU|lu)?)((?i:[kmgtp]b)?)\b + + + + scriptblock + + begin + \{ + beginCaptures + + 0 + + name + punctuation.section.braces.begin.powershell + + + end + \} + endCaptures + + 0 + + name + punctuation.section.braces.end.powershell + + + name + meta.scriptblock.powershell + patterns + + + include + $self + + + + type + + begin + \[ + beginCaptures + + 0 + + name + punctuation.section.bracket.begin.powershell + + + end + \] + endCaptures + + 0 + + name + punctuation.section.bracket.end.powershell + + + patterns + + + match + (?!\d+|\.)(?:\p{L}|\p{N}|\.)+ + name + storage.type.powershell + + + include + $self + + + + variable + + patterns + + + captures + + 0 + + name + constant.language.powershell + + 1 + + name + punctuation.definition.variable.powershell + + + comment + These are special constants. + match + (\$)(?i:(False|Null|True))\b + + + captures + + 0 + + name + support.constant.variable.powershell + + 1 + + name + punctuation.definition.variable.powershell + + 3 + + name + variable.other.member.powershell + + + comment + These are the other built-in constants. + match + (\$)(?i:(Error|ExecutionContext|Host|Home|PID|PsHome|PsVersionTable|ShellID))((?:\.(?:\p{L}|\d|_)+)*\b)?\b + + + captures + + 0 + + name + support.variable.automatic.powershell + + 1 + + name + punctuation.definition.variable.powershell + + 3 + + name + variable.other.member.powershell + + + comment + Automatic variables are not constants, but they are read-only. In monokai (default) color schema support.variable doesn't have color, so we use constant. + match + (\$)((?:[$^?])|(?i:_|Args|ConsoleFileName|Event|EventArgs|EventSubscriber|ForEach|Input|LastExitCode|Matches|MyInvocation|NestedPromptLevel|Profile|PSBoundParameters|PsCmdlet|PsCulture|PSDebugContext|PSItem|PSCommandPath|PSScriptRoot|PsUICulture|Pwd|Sender|SourceArgs|SourceEventArgs|StackTrace|Switch|This)\b)((?:\.(?:\p{L}|\d|_)+)*\b)? + + + captures + + 0 + + name + variable.language.powershell + + 1 + + name + punctuation.definition.variable.powershell + + 3 + + name + variable.other.member.powershell + + + comment + Style preference variables as language variables so that they stand out. + match + (\$)(?i:(ConfirmPreference|DebugPreference|ErrorActionPreference|ErrorView|FormatEnumerationLimit|InformationPreference|LogCommandHealthEvent|LogCommandLifecycleEvent|LogEngineHealthEvent|LogEngineLifecycleEvent|LogProviderHealthEvent|LogProviderLifecycleEvent|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount|MaximumHistoryCount|MaximumVariableCount|OFS|OutputEncoding|PSCulture|PSDebugContext|PSDefaultParameterValues|PSEmailServer|PSItem|PSModuleAutoLoadingPreference|PSModuleAutoloadingPreference|PSSenderInfo|PSSessionApplicationName|PSSessionConfigurationName|PSSessionOption|ProgressPreference|VerbosePreference|WarningPreference|WhatIfPreference))((?:\.(?:\p{L}|\d|_)+)*\b)?\b + + + captures + + 0 + + name + variable.other.readwrite.powershell + + 1 + + name + punctuation.definition.variable.powershell + + 2 + + name + storage.modifier.scope.powershell + + 4 + + name + variable.other.member.powershell + + + match + (?i:(\$|@)(global|local|private|script|using|workflow):((?:\p{L}|\d|_)+))((?:\.(?:\p{L}|\d|_)+)*\b)? + + + captures + + 0 + + name + variable.other.readwrite.powershell + + 1 + + name + punctuation.definition.variable.powershell + + 2 + + name + punctuation.section.braces.begin.powershell + + 3 + + name + storage.modifier.scope.powershell + + 5 + + name + punctuation.section.braces.end.powershell + + 6 + + name + variable.other.member.powershell + + + match + (?i:(\$)(\{)(global|local|private|script|using|workflow):([^}]*[^}`])(\}))((?:\.(?:\p{L}|\d|_)+)*\b)? + + + captures + + 0 + + name + variable.other.readwrite.powershell + + 1 + + name + punctuation.definition.variable.powershell + + 2 + + name + support.variable.drive.powershell + + 4 + + name + variable.other.member.powershell + + + match + (?i:(\$|@)((?:\p{L}|\d|_)+:)?((?:\p{L}|\d|_)+))((?:\.(?:\p{L}|\d|_)+)*\b)? + + + captures + + 0 + + name + variable.other.readwrite.powershell + + 1 + + name + punctuation.definition.variable.powershell + + 2 + + name + punctuation.section.braces.begin.powershell + + 3 + + name + support.variable.drive.powershell + + 5 + + name + punctuation.section.braces.end.powershell + + 6 + + name + variable.other.member.powershell + + + match + (?i:(\$)(\{)((?:\p{L}|\d|_)+:)?([^}]*[^}`])(\}))((?:\.(?:\p{L}|\d|_)+)*\b)? + + + + UsingDirective + + match + (?<!\w)(?i:(using))\s+(?i:(namespace|module))\s+(?i:((?:\w+(?:\.)?)+)) + captures + + 1 + + name + keyword.control.using.powershell + + 2 + + name + keyword.other.powershell + + 3 + + name + variable.parameter.powershell + + + + RequiresDirective + + begin + (?<=#)(?i:(requires))\s + beginCaptures + + 0 + + name + keyword.control.requires.powershell + + + end + $ + name + meta.requires.powershell + patterns + + + match + \-(?i:Modules|PSSnapin|RunAsAdministrator|ShellId|Version|Assembly|PSEdition) + name + keyword.other.powershell + + + match + (?<!-)\b\p{L}+|\d+(?:\.\d+)* + name + variable.parameter.powershell + + + include + #hashtable + + + + variableNoProperty + + patterns + + + captures + + 0 + + name + constant.language.powershell + + 1 + + name + punctuation.definition.variable.powershell + + + comment + These are special constants. + match + (\$)(?i:(False|Null|True))\b + + + captures + + 0 + + name + support.constant.variable.powershell + + 1 + + name + punctuation.definition.variable.powershell + + 3 + + name + variable.other.member.powershell + + + comment + These are the other built-in constants. + match + (\$)(?i:(Error|ExecutionContext|Host|Home|PID|PsHome|PsVersionTable|ShellID))\b + + + captures + + 0 + + name + support.variable.automatic.powershell + + 1 + + name + punctuation.definition.variable.powershell + + 3 + + name + variable.other.member.powershell + + + comment + Automatic variables are not constants, but they are read-only... + match + (\$)((?:[$^?])|(?i:_|Args|ConsoleFileName|Event|EventArgs|EventSubscriber|ForEach|Input|LastExitCode|Matches|MyInvocation|NestedPromptLevel|Profile|PSBoundParameters|PsCmdlet|PsCulture|PSDebugContext|PSItem|PSCommandPath|PSScriptRoot|PsUICulture|Pwd|Sender|SourceArgs|SourceEventArgs|StackTrace|Switch|This)\b) + + + captures + + 0 + + name + variable.language.powershell + + 1 + + name + punctuation.definition.variable.powershell + + 3 + + name + variable.other.member.powershell + + + comment + Style preference variables as language variables so that they stand out. + match + (\$)(?i:(ConfirmPreference|DebugPreference|ErrorActionPreference|ErrorView|FormatEnumerationLimit|InformationPreference|LogCommandHealthEvent|LogCommandLifecycleEvent|LogEngineHealthEvent|LogEngineLifecycleEvent|LogProviderHealthEvent|LogProviderLifecycleEvent|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount|MaximumHistoryCount|MaximumVariableCount|OFS|OutputEncoding|PSCulture|PSDebugContext|PSDefaultParameterValues|PSEmailServer|PSItem|PSModuleAutoLoadingPreference|PSModuleAutoloadingPreference|PSSenderInfo|PSSessionApplicationName|PSSessionConfigurationName|PSSessionOption|ProgressPreference|VerbosePreference|WarningPreference|WhatIfPreference))\b + + + captures + + 0 + + name + variable.other.readwrite.powershell + + 1 + + name + punctuation.definition.variable.powershell + + 2 + + name + storage.modifier.scope.powershell + + 4 + + name + variable.other.member.powershell + + + match + (?i:(\$)(global|local|private|script|using|workflow):((?:\p{L}|\d|_)+)) + + + captures + + 0 + + name + variable.other.readwrite.powershell + + 1 + + name + punctuation.definition.variable.powershell + + 2 + + name + storage.modifier.scope.powershell + + 4 + + name + keyword.other.powershell + + 5 + + name + variable.other.member.powershell + + + match + (?i:(\$)(\{)(global|local|private|script|using|workflow):([^}]*[^}`])(\})) + + + captures + + 0 + + name + variable.other.readwrite.powershell + + 1 + + name + punctuation.definition.variable.powershell + + 2 + + name + support.variable.drive.powershell + + 4 + + name + variable.other.member.powershell + + + match + (?i:(\$)((?:\p{L}|\d|_)+:)?((?:\p{L}|\d|_)+)) + + + captures + + 0 + + name + variable.other.readwrite.powershell + + 1 + + name + punctuation.definition.variable.powershell + + 2 + + name + punctuation.section.braces.begin + + 3 + + name + support.variable.drive.powershell + + 5 + + name + punctuation.section.braces.end + + + match + (?i:(\$)(\{)((?:\p{L}|\d|_)+:)?([^}]*[^}`])(\})) + + + + hashtable + + begin + (@)(\{) + beginCaptures + + 1 + + name + keyword.other.hashtable.begin.powershell + + 2 + + name + punctuation.section.braces.begin.powershell + + + end + (\}) + endCaptures + + 1 + + name + punctuation.section.braces.end.powershell + + + name + meta.hashtable.powershell + patterns + + + captures + + 1 + + name + punctuation.definition.string.begin.powershell + + 2 + + name + variable.other.readwrite.powershell + + 3 + + name + punctuation.definition.string.end.powershell + + 4 + + name + keyword.operator.assignment.powershell + + + match + \b((?:\'|\")?)(\w+)((?:\'|\")?)(?:\s+)?(=)(?:\s+)? + name + meta.hashtable.assignment.powershell + + + include + #scriptblock + + + include + $self + + + + doubleQuotedString + + begin + ["\x{201C}-\x{201E}] + beginCaptures + + 0 + + name + punctuation.definition.string.begin.powershell + + + end + ["\x{201C}-\x{201E}] + applyEndPatternLast + + endCaptures + + 0 + + name + punctuation.definition.string.end.powershell + + + name + string.quoted.double.powershell + patterns + + + match + (?i)\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,64}\b + + + include + #variableNoProperty + + + include + #doubleQuotedStringEscapes + + + match + ["\x{201C}-\x{201E}]{2} + name + constant.character.escape.powershell + + + include + #interpolation + + + match + `\s*$ + name + keyword.other.powershell + + + + + scopeName + source.powershell + uuid + f8f5ffb0-503e-11df-9879-0800200c9a66 + + \ No newline at end of file diff --git a/src/file-viewer/highlight-grammar/python.plist b/src/file-viewer/highlight-grammar/python.plist new file mode 100644 index 0000000..8eb1254 --- /dev/null +++ b/src/file-viewer/highlight-grammar/python.plist @@ -0,0 +1,4009 @@ + + + + + fileTypes + + py + py3 + rpy + pyw + cpy + SConstruct + Sconstruct + sconstruct + SConscript + gyp + gypi + + firstLineMatch + ^#!/.*\bpython[\d\.]*\b + keyEquivalent + ^~P + name + Python + patterns + + + match + (?<!^from\s|^import\s)(\.{3}) + name + support.type.ellipsis.python + + + include + #comment + + + comment + Match identifiers in ALL_CAPS as constants, except when followed by `.`, `(`, `'`, or `"`. + match + \b([[:upper:]_][[:upper:][:digit:]_]*)\b(?![\.\(\'\"]) + name + constant.other.allcaps.python + + + match + \b(?i:(0x\h+)L) + name + constant.numeric.integer.hexadecimal.long.python + + + match + \b(?i:(0x\h+)) + name + constant.numeric.integer.hexadecimal.python + + + match + \b(?i:(0b[01]+)L) + name + constant.numeric.integer.binary.long.python + + + match + \b(?i:(0b[01]+)) + name + constant.numeric.integer.binary.python + + + match + \b(?i:(0[o]?[0-7]+)L) + name + constant.numeric.integer.octal.long.python + + + match + \b(?i:(0[o]?[0-7]+)) + name + constant.numeric.integer.octal.python + + + match + \b(?i:(((\d+(\.(?=[^[:alpha:]_])\d*)?|(?<=[^[:alnum:]_])\.\d+)(e[\-\+]?\d+)?))J) + name + constant.numeric.complex.python + + + match + \b(?i:(\d+\.\d*(e[\-\+]?\d+)?))(?=[^[:alpha:]_]) + name + constant.numeric.float.python + + + match + (?<=[^[:alnum:]_])(?i:(\.\d+(e[\-\+]?\d+)?)) + name + constant.numeric.float.python + + + match + \b(?i:(\d+e[\-\+]?\d+)) + name + constant.numeric.float.python + + + match + \b(?i:([1-9]+[0-9]*|0)L) + name + constant.numeric.integer.decimal.long.python + + + match + \b([1-9]+[0-9]*|0) + name + constant.numeric.integer.decimal.python + + + match + \b(None|True|False|Ellipsis|NotImplemented|__debug__)\b + name + constant.language.python + + + match + \b(global|nonlocal)\b + name + storage.modifier.$1.python + + + match + \b(?:(import|from|as))\b + name + keyword.control.import.$1.python + + + comment + keyword operators that evaluate to True or False + match + \b(and|in|is|not|or)\b + name + keyword.operator.logical.python + + + comment + keywords that do not fit into other groups. + match + \b(assert|del)\b + name + keyword.other.python + + + match + <> + name + invalid.deprecated.operator.python + + + match + (?<!\.)(apply|buffer|coerce|intern)\s*(?=\() + name + invalid.deprecated.function.python + + + match + <\=|>\=|\=\=|<|>|\!\= + name + keyword.operator.comparison.python + + + match + \+\=|-\=|\*\=|/\=|//\=|%\=|&\=|\|\=|\^\=|>>\=|<<\=|\*\*\=|@\= + name + keyword.operator.assignment.augmented.python + + + match + \+|\-|\*|\*\*|/|//|%|<<|>>|&|\||\^|~|(?!^)@ + name + keyword.operator.arithmetic.python + + + match + \= + name + keyword.operator.assignment.python + + + begin + ^\s*(class)\s+(?=[[:alpha:]_][[:alnum:]_]*\s*\:) + beginCaptures + + 1 + + name + storage.type.class.python + + + contentName + entity.name.type.class.python + end + \s*(:) + endCaptures + + 1 + + name + punctuation.section.class.begin.python + + + name + meta.class.old-style.python + patterns + + + include + #entity_name_class + + + + + begin + ^\s*(class)\s+(?=[[:alpha:]_][[:alnum:]_]*\s*\() + beginCaptures + + 1 + + name + storage.type.class.python + + + end + (\))\s*(?:(\:)|(.*$\n?)) + endCaptures + + 1 + + name + punctuation.definition.inheritance.end.python + + 2 + + name + punctuation.section.class.begin.python + + 3 + + name + invalid.illegal.missing-section-begin.python + + + name + meta.class.python + patterns + + + begin + (?=[[:alpha:]_][[:alnum:]_]*) + contentName + entity.name.type.class.python + end + (?![[:alnum:]_]) + patterns + + + include + #entity_name_class + + + + + begin + (\() + beginCaptures + + 1 + + name + punctuation.definition.inheritance.begin.python + + + contentName + meta.class.inheritance.python + end + (?=\)|:) + patterns + + + begin + (?<=\(|,)\s* + contentName + entity.other.inherited-class.python + end + \s*(?:(,)|(?=\))) + endCaptures + + 1 + + name + punctuation.separator.inheritance.python + + + patterns + + + include + $self + + + + + + + + + begin + ^\s*(class)\s+(?=[[:alpha:]_][[:alnum:]_]*) + beginCaptures + + 1 + + name + storage.type.class.python + + + end + (\()|(\s*$\n?|#.*$\n?) + endCaptures + + 1 + + name + punctuation.definition.inheritance.begin.python + + 2 + + name + invalid.illegal.missing-inheritance.python + + + name + meta.class.python + patterns + + + begin + (?=[[:alpha:]_][[:alnum:]_]*) + contentName + entity.name.type.class.python + end + (?![[:alnum:]_]) + patterns + + + include + #entity_name_function + + + + + + + begin + \s*(?:(async)\s+)?(def)\s+(?=[[:alpha:]_][[:alnum:]_]*\s*\() + beginCaptures + + 1 + + name + storage.modifier.async.python + + 2 + + name + storage.type.function.python + + + end + (\:) + endCaptures + + 1 + + name + punctuation.section.function.begin.python + + + name + meta.function.python + patterns + + + begin + (?=[[:alpha:]_][[:alnum:]_]*) + contentName + entity.name.function.python + end + (?![[:alnum:]_]) + patterns + + + include + #entity_name_function + + + + + begin + (\() + beginCaptures + + 1 + + name + punctuation.definition.parameters.begin.python + + + contentName + meta.function.parameters.python + end + (?=\)\s*(?:\:|-\>)) + patterns + + + include + #annotated_arguments + + + include + #keyword_arguments + + + include + #comment + + + captures + + 1 + + name + variable.parameter.function.language.python + + 2 + + name + variable.parameter.function.python + + 3 + + name + punctuation.separator.parameters.python + + + match + \b(?:(self|cls)|([[:alpha:]_][[:alnum:]_]*))\s*(?:(,)|(?=[\n\)])) + + + + + begin + (\))\s*(\->) + beginCaptures + + 1 + + name + punctuation.definition.parameters.end.python + + 2 + + name + punctuation.separator.annotation.result.python + + + end + (?=\:) + patterns + + + include + $self + + + + + + + begin + \s*(?:(async)\s+)?(def)\s+(?=[[:alpha:]_][[:alnum:]_]*) + beginCaptures + + 1 + + name + storage.modifier.async.python + + 2 + + name + storage.type.function.python + + + end + (\()|\s*($\n?|#.*$\n?) + endCaptures + + 1 + + name + punctuation.definition.parameters.begin.python + + 2 + + name + invalid.illegal.missing-parameters.python + + + name + meta.function.python + patterns + + + begin + (?=[[:alpha:]_][[:alnum:]_]*) + contentName + entity.name.function.python + end + (?![[:alnum:]_]) + patterns + + + include + #entity_name_function + + + + + + + captures + + 1 + + name + storage.modifier.async.python + + 2 + + name + storage.type.function.python + + 3 + + name + storage.type.function.python + + + match + \b(?:(?:(async)\s+)?(def)|(lambda))\b + + + comment + Keywords that delimit flow blocks or alter flow from within a + block. + + This block should be matched *after* meta.function.python to + let 'async def' be matched *first*. + + match + (?x) \b( + async | await | break | continue | elif | else | except | finally | for | + if | pass | raise | return | try | while | with | + (yield(?:\s+from)?) + )\b + + name + keyword.control.flow.python + + + begin + (lambda)(?=\s+|:) + beginCaptures + + 1 + + name + storage.type.function.inline.python + + + end + (\:) + endCaptures + + 1 + + name + punctuation.definition.parameters.end.python + + 2 + + name + punctuation.section.function.begin.python + + 3 + + name + invalid.illegal.missing-section-begin.python + + + name + meta.function.inline.python + patterns + + + begin + \s+ + contentName + meta.function.inline.parameters.python + end + (?=\:) + patterns + + + include + #keyword_arguments + + + captures + + 1 + + name + variable.parameter.function.python + + 2 + + name + punctuation.separator.parameters.python + + + match + \b([[:alpha:]_][[:alnum:]_]*)\s*(?:(,)|(?=[\n\)\:])) + + + + + + + begin + ^\s*(?=@\s*[[:alpha:]_][[:alnum:]_]*(?:\s*\.\s*[[:alpha:]_][[:alnum:]_]*)*\s*\() + comment + a decorator may be a function call which returns a decorator. + end + (\)) + endCaptures + + 1 + + name + punctuation.definition.arguments.end.python + + + name + meta.function.decorator.python + patterns + + + begin + (?=(@)\s*[[:alpha:]_][[:alnum:]_]*(?:\s*\.\s*[[:alpha:]_][[:alnum:]_]*)*\s*\() + beginCaptures + + 1 + + name + punctuation.definition.decorator.python + + + contentName + entity.name.function.decorator.python + end + (?=\s*\() + patterns + + + include + #dotted_name + + + + + begin + (\() + beginCaptures + + 1 + + name + punctuation.definition.arguments.begin.python + + + contentName + meta.function.decorator.arguments.python + end + (?=\)) + patterns + + + include + #keyword_arguments + + + include + $self + + + + + + + begin + ^\s*(?=@\s*[[:alpha:]_][[:alnum:]_]*(?:\s*\.\s*[[:alpha:]_][[:alnum:]_]*)*) + contentName + entity.name.function.decorator.python + end + (?=\s|$\n?|#) + name + meta.function.decorator.python + patterns + + + begin + (?=(@)\s*[[:alpha:]_][[:alnum:]_]*(\s*\.\s*[[:alpha:]_][[:alnum:]_]*)*) + beginCaptures + + 1 + + name + punctuation.definition.decorator.python + + + end + (?=\s|$\n?|#) + patterns + + + include + #dotted_name + + + + + + + begin + (?<=\)|\])\s*(\() + beginCaptures + + 1 + + name + punctuation.definition.arguments.begin.python + + + contentName + meta.function-call.arguments.python + end + (\)) + endCaptures + + 1 + + name + punctuation.definition.arguments.end.python + + + name + meta.function-call.python + patterns + + + include + #keyword_arguments + + + include + $self + + + + + include + #builtin_types + + + include + #builtin_functions_name + + + include + #builtin_functions_call + + + include + #errors_warnings_exceptions + + + include + #magic_function_names + + + include + #magic_function_calls + + + include + #docstrings + + + include + #magic_variable_names + + + begin + \b(self|cls)\b\s*(?=(\()) + beginCaptures + + 1 + + name + variable.language.python + + 2 + + name + punctuation.definition.arguments.begin.python + + + end + (\)) + endCaptures + + 1 + + name + punctuation.definition.arguments.end.python + + + name + meta.function-call.python + patterns + + + begin + (\() + beginCaptures + + 1 + + name + punctuation.definition.arguments.begin.python + + + contentName + meta.function-call.arguments.python + end + (?=(\))) + endCaptures + + 1 + + name + punctuation.definition.arguments.end.python + + + patterns + + + include + #keyword_arguments + + + include + $self + + + + + + + include + #language_variables + + + include + #generic_object_names + + + begin + (?:\.)?([[:alpha:]_][[:alnum:]_]*)\s*(?=(\()) + beginCaptures + + 1 + + name + meta.function-call.generic.python + + + end + (\)) + endCaptures + + 1 + + name + punctuation.definition.arguments.end.python + + + name + meta.function-call.python + patterns + + + begin + (\() + beginCaptures + + 1 + + name + punctuation.definition.arguments.begin.python + + + contentName + meta.function-call.arguments.python + end + (?=\)) + patterns + + + include + #keyword_arguments + + + include + $self + + + + + + + comment + Py2 print statement that should only be matched after function calls + match + (?<!\.)\b(print)(?=\s|$) + name + keyword.other.print.python + + + begin + (?=[[:alpha:]_][[:alnum:]_]*(?:\s*\.\s*[[:alpha:]_][[:alnum:]_]*)*\s*\[) + end + (\]) + endCaptures + + 1 + + name + punctuation.definition.arguments.end.python + + + name + meta.item-access.python + patterns + + + begin + (?=[[:alpha:]_][[:alnum:]_]*(?:\s*\.\s*[[:alpha:]_][[:alnum:]_]*)*\s*\[) + end + (?=\s*\[) + patterns + + + include + #dotted_name + + + + + begin + (\[) + beginCaptures + + 1 + + name + punctuation.definition.arguments.begin.python + + + contentName + meta.item-access.arguments.python + end + (?=\]) + patterns + + + include + $self + + + + + begin + \G + end + (?=\[) + patterns + + + include + #dotted_name + + + + + + + captures + + 1 + + name + storage.type.class.python + + + match + \b(class)\b + + + include + #line_continuation + + + include + #string_quoted_single + + + include + #string_quoted_double + + + include + #dotted_name + + + begin + (\() + end + (\)) + patterns + + + include + $self + + + + + captures + + 1 + + name + punctuation.definition.list.begin.python + + 2 + + name + meta.empty-list.python + + 3 + + name + punctuation.definition.list.end.python + + + match + (\[)(\s*(\]))\b + + + begin + (\[) + beginCaptures + + 1 + + name + punctuation.definition.list.begin.python + + + end + (\]) + endCaptures + + 1 + + name + punctuation.definition.list.end.python + + + name + meta.structure.list.python + patterns + + + begin + (?<=\[|\,)\s*(?![\],]) + contentName + meta.structure.list.item.python + end + \s*(?:(,)|(?=\])) + endCaptures + + 1 + + name + punctuation.separator.list.python + + + patterns + + + include + $self + + + + + + + captures + + 1 + + name + punctuation.definition.tuple.begin.python + + 2 + + name + meta.empty-tuple.python + + 3 + + name + punctuation.definition.tuple.end.python + + + match + (\()(\s*(\))) + name + meta.structure.tuple.python + + + captures + + 1 + + name + punctuation.definition.dictionary.begin.python + + 2 + + name + meta.empty-dictionary.python + + 3 + + name + punctuation.definition.dictionary.end.python + + + match + (\{)(\s*(\})) + name + meta.structure.dictionary.python + + + begin + (\{) + beginCaptures + + 1 + + name + punctuation.definition.dictionary.begin.python + + + end + (\}) + endCaptures + + 1 + + name + punctuation.definition.dictionary.end.python + + + name + meta.structure.dictionary.python + patterns + + + begin + (?<=\{|\,|^)\s*(?![\},]) + contentName + meta.structure.dictionary.key.python + end + \s*(?:(?=\})|(\:)) + endCaptures + + 1 + + name + punctuation.separator.valuepair.dictionary.python + + + patterns + + + include + $self + + + + + begin + (?<=\:|^)\s* + contentName + meta.structure.dictionary.value.python + end + \s*(?:(?=\})|(,)) + endCaptures + + 1 + + name + punctuation.separator.dictionary.python + + + patterns + + + include + $self + + + + + + + repository + + annotated_arguments + + begin + \b([[:alpha:]_][[:alnum:]_]*)\s*(:)|(?=\() + beginCaptures + + 1 + + name + variable.parameter.function.python + + 2 + + name + punctuation.separator.annotation.python + + + end + \s*(?:(,)|(?=$\n?|[\)\:])) + endCaptures + + 1 + + name + punctuation.separator.parameters.python + + + patterns + + + include + #annotated_group + + + match + = + name + keyword.operator.assignment.python + + + include + $self + + + + annotated_group + + begin + (\() + beginCaptures + + 1 + + name + punctuation.definition.parameters-group.begin.python + + + end + (\)) + endCaptures + + 1 + + name + punctuation.definition.parameters-group.end.python + + + patterns + + + begin + \b([[:alpha:]_][[:alnum:]_]*)\s*(:) + beginCaptures + + 1 + + name + variable.parameter.function.python + + 2 + + name + punctuation.separator.annotation.python + + + end + \s*(?:(,)|(?=$\n?|\))) + endCaptures + + 1 + + name + punctuation.separator.parameters.python + + + patterns + + + include + $self + + + + + begin + \b([[:alpha:]_][[:alnum:]_]*) + beginCaptures + + 1 + + name + variable.parameter.function.python + + + end + \s*(?:(,)|(?=$\n?|\))) + endCaptures + + 1 + + name + punctuation.separator.parameters.python + + + + + include + #comment + + + + builtin_functions_call + + patterns + + + begin + (?x) + (?<!\.)\b( + __import__ | abs | all | any | ascii | basestring | bin | bool | + bytearray | bytes | callable | chr | classmethod | cmp | compile | + complex | delattr | dict | dir | divmod | enumerate | eval | exec | + execfile | file | filter | float | format | frozenset | getattr | + globals | hasattr | hash | help | hex | id | input | int | + isinstance | issubclass | iter | len | list | locals | long | map | + max | memoryview | min | next | object | oct | open | ord | pow | + print | property | range | raw_input | reduce | reload | repr | + reversed | round | set | setattr | slice | sorted | staticmethod | + str | sum | super | tuple | type | unichr | unicode | vars | + xrange | zip) + \b\s*(?=\() + + beginCaptures + + 1 + + name + support.function.builtin.call.python + + + end + (\)) + endCaptures + + 1 + + name + punctuation.definition.arguments.end.python + + + name + meta.function-call.python + patterns + + + begin + (?=[[:alpha:]_][[:alnum:]_]*(?:\s*\.\s*[[:alpha:]_][[:alnum:]_]*)*\s*\() + end + (?=\s*\() + patterns + + + include + #dotted_name + + + + + begin + (\() + beginCaptures + + 1 + + name + punctuation.definition.arguments.begin.python + + + contentName + meta.function-call.arguments.python + end + (?=\)) + patterns + + + include + #keyword_arguments + + + include + $self + + + + + + + + builtin_functions_name + + match + (?x) + (?<!\.|@) + \b( + __import__ | abs | all | any | ascii | basestring | bin | bool | + bytearray | bytes | callable | chr | classmethod | cmp | compile | + complex | delattr | dict | dir | divmod | enumerate | eval | exec | + execfile | file | filter | float | format | frozenset | getattr | + globals | hasattr | hash | help | hex | id | input | int | + isinstance | issubclass | iter | len | list | locals | long | map | + max | memoryview | min | next | object | oct | open | ord | pow | + property | range | raw_input | reduce | reload | repr | + reversed | round | set | setattr | slice | sorted | staticmethod | + str | sum | super | tuple | type | unichr | unicode | vars | + xrange | zip) + \b\s*(?!(\()) + name + support.function.builtin.name.python + + builtin_types + + comment + These are from https://docs.python.org/X/library/stdtypes.html + where X is 2.7 or 3.5. + match + (?x) + (?<!\.) + \b( + bool | buffer | bytearray | bytes | complex | dict | float | + frozenset | int | list | long | memoryview | object | property | + range | set | slice | str | tuple | type | unicode | xrange) + \b(?!(\s*\()) + name + support.type.python + + comment + + begin + (^[ \t]+)?(?=#) + beginCaptures + + 1 + + name + punctuation.whitespace.comment.leading.python + + + end + (?!\G) + patterns + + + begin + # + beginCaptures + + 0 + + name + punctuation.definition.comment.python + + + end + \n + name + comment.line.number-sign.python + + + + constant_placeholder + + match + (?i:(%(\([[:lower:]_]+\))?#?0?\-?[ ]?\+?([0-9]*|\*)(\.([0-9]*|\*))?[hL]?[[:lower:]%])|(\{([!\[\].:\w ]+)?\})) + name + constant.other.placeholder.python + + docstrings + + patterns + + + begin + ^\s*(?=[uU]?[rR]?""") + end + (?<=""") + name + comment.block.python + patterns + + + include + #string_quoted_double + + + + + begin + ^\s*(?=[uU]?[rR]?''') + end + (?<=''') + name + comment.block.python + patterns + + + include + #string_quoted_single + + + + + + dotted_name + + begin + (?=(?:\.(?!\s+import)\s*)?[[:alpha:]_][[:alnum:]_]*(?:\s*\.\s*[[:alpha:]_][[:alnum:]_]*)*) + end + (?![[:alnum:]_\.\s])|(?=(?<!\.)\s+[^.])|$ + patterns + + + begin + (\.)(?=[[:alpha:]_][[:alnum:]_]*) + beginCaptures + + 1 + + name + meta.dot.python + + + end + (?![[:alnum:]_]) + patterns + + + include + #builtin_functions_name + + + include + #magic_function_names + + + include + #magic_variable_names + + + include + #generic_names + + + include + #illegal_names + + + + + begin + (?<!\.)(?=[[:alpha:]_][[:alnum:]_]*) + end + (?![[:alnum:]_]) + patterns + + + include + #builtin_types + + + include + #builtin_functions_name + + + include + #builtin_functions_call + + + include + #errors_warnings_exceptions + + + include + #magic_function_names + + + include + #magic_function_calls + + + include + #magic_variable_names + + + include + #language_variables + + + include + #generic_names + + + include + #illegal_names + + + + + + entity_name_class + + patterns + + + include + #generic_names + + + include + #illegal_names + + + + entity_name_function + + patterns + + + include + #builtin_functions_name + + + include + #magic_function_names + + + include + #illegal_names + + + + errors_warnings_exceptions + + match + (?x) + \b( + ( + Arithmetic | Assertion | Attribute | Buffer | BlockingIO | + BrokenPipe | ChildProcess | (Connection(Aborted | Refused | Reset)?) | + EOF | Environment | FileExists | FileNotFound | FloatingPoint | IO | + Import | Indentation | Index | Interrupted | IsADirectory | + NotADirectory | Permission | ProcessLookup | Timeout | Key | Lookup | + Memory | Name | NotImplemented | OS | Overflow | Reference | Runtime | + Recursion | Standard | Syntax | System | Tab | Type | UnboundLocal | + Unicode(Encode | Decode | Translate)? | Value | VMS | Windows | + ZeroDivision | ([[:alpha:]_][[:alnum:]_]*)) + ?Error + | + ( + (Pending)?Deprecation | Bytes | Future | Import | Resource | + Runtime | Syntax | Unicode | User | [[:alpha:]_][[:alnum:]_]*) + ?Warning + | + SystemExit | Stop(Async)?Iteration | NotImplemented | + KeyboardInterrupt | GeneratorExit + | + ([[:alpha:]_][[:alnum:]_]*) + ?Exception + ) + \b + name + support.type.exception.python + + escaped_char + + captures + + 1 + + name + constant.character.escape.hex.python + + 10 + + name + constant.character.escape.linefeed.python + + 11 + + name + constant.character.escape.return.python + + 12 + + name + constant.character.escape.tab.python + + 13 + + name + constant.character.escape.vertical-tab.python + + 2 + + name + constant.character.escape.octal.python + + 3 + + name + constant.character.escape.newline.python + + 4 + + name + constant.character.escape.backslash.python + + 5 + + name + constant.character.escape.double-quote.python + + 6 + + name + constant.character.escape.single-quote.python + + 7 + + name + constant.character.escape.bell.python + + 8 + + name + constant.character.escape.backspace.python + + 9 + + name + constant.character.escape.formfeed.python + + + match + (\\x[\h]{2})|(\\[0-7]{3})|(\\\n)|(\\\\)|(\\\")|(\\')|(\\a)|(\\b)|(\\f)|(\\n)|(\\r)|(\\t)|(\\v) + + escaped_char_raw_double + + match + \\" + name + constant.character.escape.quote.python + + escaped_char_raw_single + + match + \\' + name + constant.character.escape.quote.python + + escaped_unicode_char + + captures + + 1 + + name + constant.character.escape.unicode.32-bit-hex.python + + 2 + + name + constant.character.escape.unicode.16-bit-hex.python + + 3 + + name + constant.character.escape.unicode.name.python + + + match + (\\U[\h]{8})|(\\u[\h]{4})|(\\N\{[a-zA-Z0-9\, ]+\}) + + generic_names + + match + [[:alpha:]_][[:alnum:]_]* + name + meta.identifier.python + + generic_object_names + + match + (\.\b([[:alpha:]_][[:alnum:]_]*)\b(?!\(|\[)|\b([[:alpha:]_][[:alnum:]_]*)\b\.) + + illegal_names + + comment + from Lib/keyword.py, in kwlist. `async` and `await` not keywords until Python 3.7 (according to PEP-0492) + match + (?x) + \b ( + False | None | True | and | as | assert | break | class | continue | def | + del | elif | else | except | exec | finally | for | from | global | if | + import | in | is | lambda | nonlocal | not | or | pass | print | raise | + return | try | while | with | yield | __debug__ ) + \b + name + invalid.illegal.name.python + + keyword_arguments + + begin + \b([[:alpha:]_][[:alnum:]_]*)\s*(=)(?!=) + beginCaptures + + 1 + + name + variable.parameter.function.keyword.python + + 2 + + name + keyword.operator.assignment.python + + + end + \s*(?:(,)|(?=[\)\:])) + endCaptures + + 1 + + name + punctuation.separator.parameters.python + + + patterns + + + include + $self + + + + language_variables + + captures + + 1 + + name + variable.language.python + + + match + (?<!\.)\b(self|cls)\b(?:\.|\()? + + line_continuation + + captures + + 1 + + name + punctuation.separator.continuation.line.python + + 2 + + name + invalid.illegal.unexpected-text.python + + + match + (\\)(.*)$\n? + + magic_function_calls + + patterns + + + begin + (?x) + (\.)? + \b( + __(?: + abs | add | aenter | aexit | aiter | and | anext | await | bool | + bytes | call | ceil | cmp | class_getitem | coerce | complex | contains | + copy | deepcopy | del | delattr | delete | delitem | delslice | dir | div | + divmod | enter | eq | execute | exit | float | floor | floordiv | format | + fspath | ge | get | getattr | getattribute | getinitargs | getitem | + getnewargs | getnewargs_ex | getslice | getstate | gt | hash | hex | iadd | + iand | idiv | idivmod | ifloordiv | ilshift | imatmul | imod | imul | index | + init | init_subclass | instancecheck | int | invert | iop | ior | ipow | + irshift | isub | iter | itruediv | ixor | le | len | length_hint | long | + lshift | lt | main | matmul | missing | mod | mro_entries | mul | ne | neg | + new | next | nonzero | oct | op | or | pos | pow | prepare | radd | rand | + rcmp | rdiv | rdivmod | reduce | reduce_ex | repr | reversed | rfloordiv | + rlshift | rmatmul | rmod | rmul | rop | ror | round | rpow | rrshift | + rshift | rsub | rtruediv | rxor | set | set_name | setattr | setitem | + setslice | setstate | sizeof | str | sub | subclasscheck | subclasshook | + truediv | trunc | unicode | xor) + __) + \s*(?=(\()) + beginCaptures + + 2 + + name + support.function.magic.call.python + + 4 + + name + punctuation.definition.arguments.begin.python + + + end + (\)) + endCaptures + + 1 + + name + punctuation.definition.arguments.end.python + + + name + meta.function-call.python + patterns + + + begin + (?=[[:alpha:]_][[:alnum:]_]*(?:\s*\.\s*[[:alpha:]_][[:alnum:]_]*)*\s*\() + end + (?=\s*\() + patterns + + + include + #dotted_name + + + + + begin + (\() + beginCaptures + + 1 + + name + punctuation.definition.arguments.begin.python + + + contentName + meta.function-call.arguments.python + end + (?=\)) + patterns + + + include + #keyword_arguments + + + include + $self + + + + + + + + magic_function_names + + captures + + 2 + + name + support.function.magic.name.python + + + comment + These methods have magic interpretation by python and are generally + called indirectly through syntactic constructs. Names are from + https://docs.python.org/X/reference/datamodel.html where X is 2.7 and 3.5 + See also http://www.rafekettler.com/magicmethods.html + match + (?x) + (def|\.)? + \s*\b( + __(?: + abs | add | aenter | aexit | aiter | and | anext | await | bool | + bytes | call | ceil | cmp | class_getitem | coerce | complex | contains | + copy | deepcopy | del | delattr | delete | delitem | delslice | dir | div | + divmod | enter | eq | execute | exit | float | floor | floordiv | format | + fspath | ge | get | getattr | getattribute | getinitargs | getitem | + getnewargs | getnewargs_ex | getslice | getstate | gt | hash | hex | iadd | + iand | idiv | idivmod | ifloordiv | ilshift | imatmul | imod | imul | index | + init | init_subclass | instancecheck | int | invert | iop | ior | ipow | + irshift | isub | iter | itruediv | ixor | le | len | length_hint | long | + lshift | lt | main | matmul | missing | mod | mro_entries | mul | ne | neg | + new | next | nonzero | oct | op | or | pos | pow | prepare | radd | rand | + rcmp | rdiv | rdivmod | reduce | reduce_ex | repr | reversed | rfloordiv | + rlshift | rmatmul | rmod | rmul | rop | ror | round | rpow | rrshift | + rshift | rsub | rtruediv | rxor | set | set_name | setattr | setitem | + setslice | setstate | sizeof | str | sub | subclasscheck | subclasshook | + truediv | trunc | unicode | xor) + __) + \b + + magic_variable_names + + captures + + 2 + + name + support.variable.magic.python + + + comment + magic attributes which a class/module may have. + match + (?x) + (\.)? + \b( + __(?: + all | annotations | bases | cached | class | closure | code | debug | + defaults | dict | doc | file | func | future | globals | kwdefaults | + loader | members | metaclass | methods | module | mro | name | origin | + package | path | qualname | self | slots | spec | subclasses | version | + weakref | wrapped) + __) \b + + regular_expressions + + comment + Changed disabled to 1 to turn off syntax highlighting in “r” strings. + disabled + 0 + patterns + + + include + source.regexp.python + + + + string_quoted_double + + patterns + + + begin + ([uU]r)(""") + beginCaptures + + 1 + + name + storage.type.string.python + + 2 + + name + punctuation.definition.string.begin.python + + + comment + single quoted unicode-raw string + end + """ + endCaptures + + 0 + + name + punctuation.definition.string.end.python + + + name + string.quoted.double.block.unicode-raw-regex.python + patterns + + + include + #constant_placeholder + + + include + #escaped_char_raw_double + + + include + #regular_expressions + + + + + begin + ([uU]R)(""") + beginCaptures + + 1 + + name + storage.type.string.python + + 2 + + name + punctuation.definition.string.begin.python + + + comment + single quoted unicode-raw string without regular expression highlighting + end + """ + endCaptures + + 0 + + name + punctuation.definition.string.end.python + + + name + string.quoted.double.block.unicode-raw.python + patterns + + + include + #constant_placeholder + + + include + #escaped_char_raw_double + + + + + begin + ([bB]r)(""") + beginCaptures + + 1 + + name + storage.type.string.python + + 2 + + name + punctuation.definition.string.begin.python + + + comment + single quoted bytes-raw string + end + """ + endCaptures + + 0 + + name + punctuation.definition.string.end.python + + + name + string.quoted.double.block.bytes-raw-regex.python + patterns + + + include + #constant_placeholder + + + include + #escaped_char_raw_double + + + include + #regular_expressions + + + + + begin + ([bB]R)(""") + beginCaptures + + 1 + + name + storage.type.string.python + + 2 + + name + punctuation.definition.string.begin.python + + + comment + single quoted bytes-raw string without regular expression highlighting + end + """ + endCaptures + + 0 + + name + punctuation.definition.string.end.python + + + name + string.quoted.double.block.bytes-raw.python + patterns + + + include + #constant_placeholder + + + include + #escaped_char_raw_double + + + + + begin + (r)(""") + beginCaptures + + 1 + + name + storage.type.string.python + + 2 + + name + punctuation.definition.string.begin.python + + + comment + double quoted raw string + end + """ + endCaptures + + 0 + + name + punctuation.definition.string.end.python + + + name + string.quoted.double.block.raw-regex.python + patterns + + + include + #constant_placeholder + + + include + #escaped_char_raw_double + + + include + #regular_expressions + + + + + begin + (R)(""") + beginCaptures + + 1 + + name + storage.type.string.python + + 2 + + name + punctuation.definition.string.begin.python + + + comment + double quoted raw string + end + """ + endCaptures + + 0 + + name + punctuation.definition.string.end.python + + + name + string.quoted.double.block.raw.python + patterns + + + include + #constant_placeholder + + + include + #escaped_char_raw_double + + + + + begin + ([uU])(""") + beginCaptures + + 1 + + name + storage.type.string.python + + 2 + + name + punctuation.definition.string.begin.python + + + comment + double quoted unicode string + end + """ + endCaptures + + 0 + + name + punctuation.definition.string.end.python + + + name + string.quoted.double.block.unicode.python + patterns + + + include + #constant_placeholder + + + include + #escaped_unicode_char + + + include + #escaped_char + + + + + begin + ([bB])(""") + beginCaptures + + 1 + + name + storage.type.string.python + + 2 + + name + punctuation.definition.string.begin.python + + + comment + double quoted bytes string + end + """ + endCaptures + + 0 + + name + punctuation.definition.string.end.python + + + name + string.quoted.double.block.bytes.python + patterns + + + include + #constant_placeholder + + + include + #escaped_unicode_char + + + include + #escaped_char + + + + + captures + + 1 + + name + storage.type.string.python + + 2 + + name + punctuation.definition.string.begin.python + + 3 + + patterns + + + include + #constant_placeholder + + + include + #escaped_char_raw_double + + + include + #regular_expressions + + + + 4 + + name + punctuation.definition.string.end.python + + + comment + double-quoted raw string + match + ([uU]r)(")((?:[^"\\]|\\.)*)(") + name + string.quoted.double.single-line.unicode-raw-regex.python + + + begin + ([uU]R)(") + beginCaptures + + 1 + + name + storage.type.string.python + + 2 + + name + punctuation.definition.string.begin.python + + + comment + double-quoted raw string + end + (")|(\n) + endCaptures + + 1 + + name + punctuation.definition.string.end.python + + 2 + + name + invalid.illegal.unclosed-string.python + + + name + string.quoted.double.single-line.unicode-raw.python + patterns + + + include + #constant_placeholder + + + include + #escaped_char_raw_double + + + + + begin + ([bB]r)(") + beginCaptures + + 1 + + name + storage.type.string.python + + 2 + + name + punctuation.definition.string.begin.python + + + comment + double-quoted raw string + end + (")|(\n) + endCaptures + + 1 + + name + punctuation.definition.string.end.python + + 2 + + name + invalid.illegal.unclosed-string.python + + + name + string.quoted.double.single-line.bytes-raw-regex.python + patterns + + + include + #constant_placeholder + + + include + #escaped_char_raw_double + + + include + #regular_expressions + + + + + begin + ([bB]R)(") + beginCaptures + + 1 + + name + storage.type.string.python + + 2 + + name + punctuation.definition.string.begin.python + + + comment + double-quoted raw string + end + (")|(\n) + endCaptures + + 1 + + name + punctuation.definition.string.end.python + + 2 + + name + invalid.illegal.unclosed-string.python + + + name + string.quoted.double.single-line.bytes-raw.python + patterns + + + include + #constant_placeholder + + + include + #escaped_char_raw_double + + + + + captures + + 1 + + name + storage.type.string.python + + 2 + + name + punctuation.definition.string.begin.python + + 3 + + patterns + + + include + #constant_placeholder + + + include + #escaped_char_raw_double + + + include + #regular_expressions + + + + 4 + + name + punctuation.definition.string.end.python + + + comment + double-quoted raw string + match + (r)(")((?:[^"\\]|\\.)*)(") + name + string.quoted.double.single-line.raw-regex.python + + + begin + (R)(") + beginCaptures + + 1 + + name + storage.type.string.python + + 2 + + name + punctuation.definition.string.begin.python + + + comment + double-quoted raw string + end + (")|(\n) + endCaptures + + 1 + + name + punctuation.definition.string.end.python + + 2 + + name + invalid.illegal.unclosed-string.python + + + name + string.quoted.double.single-line.raw.python + patterns + + + include + #constant_placeholder + + + include + #escaped_char_raw_double + + + + + begin + ([uU])(") + beginCaptures + + 1 + + name + storage.type.string.python + + 2 + + name + punctuation.definition.string.begin.python + + + comment + double quoted unicode string + end + (")|(\n) + endCaptures + + 1 + + name + punctuation.definition.string.end.python + + 2 + + name + invalid.illegal.unclosed-string.python + + + name + string.quoted.double.single-line.unicode.python + patterns + + + include + #constant_placeholder + + + include + #escaped_unicode_char + + + include + #escaped_char + + + + + begin + ([bB])(") + beginCaptures + + 1 + + name + storage.type.string.python + + 2 + + name + punctuation.definition.string.begin.python + + + comment + double quoted bytes string + end + (")|(\n) + endCaptures + + 1 + + name + punctuation.definition.string.end.python + + 2 + + name + invalid.illegal.unclosed-string.python + + + name + string.quoted.double.single-line.bytes.python + patterns + + + include + #constant_placeholder + + + include + #escaped_unicode_char + + + include + #escaped_char + + + + + begin + (")(?=\s*(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER)) + beginCaptures + + 1 + + name + punctuation.definition.string.begin.python + + + comment + double quoted string + end + (")|(\n) + endCaptures + + 1 + + name + punctuation.definition.string.end.python + + 2 + + name + invalid.illegal.unclosed-string.python + + + name + string.quoted.double.single-line.sql.python + patterns + + + captures + + 0 + + patterns + + + include + #constant_placeholder + + + include + #escaped_unicode_char + + + include + #escaped_char + + + include + source.sql + + + + + match + (\G|^)([^"\\]|\\(.|\n))*(?="|$) + + + + + begin + (""") + beginCaptures + + 1 + + name + punctuation.definition.string.begin.python + + + comment + double quoted string + end + """ + endCaptures + + 0 + + name + punctuation.definition.string.end.python + + + name + string.quoted.double.block.python + patterns + + + begin + (?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER)) + end + (?=""") + patterns + + + include + #constant_placeholder + + + include + #escaped_unicode_char + + + include + #escaped_char + + + include + source.sql + + + + + begin + (?=\S) + end + (?=""") + patterns + + + include + #constant_placeholder + + + include + #escaped_unicode_char + + + include + #escaped_char + + + + + + + begin + (") + beginCaptures + + 1 + + name + punctuation.definition.string.begin.python + + + comment + double quoted string + end + (")|(\n) + endCaptures + + 1 + + name + punctuation.definition.string.end.python + + 2 + + name + invalid.illegal.unclosed-string.python + + + name + string.quoted.double.single-line.python + patterns + + + include + #constant_placeholder + + + include + #escaped_unicode_char + + + include + #escaped_char + + + + + + string_quoted_single + + patterns + + + begin + ([uU]r)(''') + beginCaptures + + 1 + + name + storage.type.string.python + + 2 + + name + punctuation.definition.string.begin.python + + + comment + single quoted unicode-raw string + end + ''' + endCaptures + + 0 + + name + punctuation.definition.string.end.python + + + name + string.quoted.single.block.unicode-raw-regex.python + patterns + + + include + #constant_placeholder + + + include + #escaped_char_raw_single + + + include + #regular_expressions + + + + + begin + ([uU]R)(''') + beginCaptures + + 1 + + name + storage.type.string.python + + 2 + + name + punctuation.definition.string.begin.python + + + comment + single quoted unicode-raw string + end + ''' + endCaptures + + 0 + + name + punctuation.definition.string.end.python + + + name + string.quoted.single.block.unicode-raw.python + patterns + + + include + #constant_placeholder + + + include + #escaped_char_raw_single + + + + + begin + ([bB]r)(''') + beginCaptures + + 1 + + name + storage.type.string.python + + 2 + + name + punctuation.definition.string.begin.python + + + comment + single quoted bytes-raw string + end + ''' + endCaptures + + 0 + + name + punctuation.definition.string.end.python + + + name + string.quoted.single.block.bytes-raw-regex.python + patterns + + + include + #constant_placeholder + + + include + #escaped_char_raw_single + + + include + #regular_expressions + + + + + begin + ([bB]R)(''') + beginCaptures + + 1 + + name + storage.type.string.python + + 2 + + name + punctuation.definition.string.begin.python + + + comment + single quoted bytes-raw string + end + ''' + endCaptures + + 0 + + name + punctuation.definition.string.end.python + + + name + string.quoted.single.block.bytes-raw.python + patterns + + + include + #constant_placeholder + + + include + #escaped_char_raw_single + + + + + begin + (r)(''') + beginCaptures + + 1 + + name + storage.type.string.python + + 2 + + name + punctuation.definition.string.begin.python + + + comment + single quoted raw string + end + ''' + endCaptures + + 0 + + name + punctuation.definition.string.end.python + + + name + string.quoted.single.block.raw-regex.python + patterns + + + include + #constant_placeholder + + + include + #escaped_char_raw_single + + + include + #regular_expressions + + + + + begin + (R)(''') + beginCaptures + + 1 + + name + storage.type.string.python + + 2 + + name + punctuation.definition.string.begin.python + + + comment + single quoted raw string + end + ''' + endCaptures + + 0 + + name + punctuation.definition.string.end.python + + + name + string.quoted.single.block.raw.python + patterns + + + include + #constant_placeholder + + + include + #escaped_char_raw_single + + + + + begin + ([uU])(''') + beginCaptures + + 1 + + name + storage.type.string.python + + 2 + + name + punctuation.definition.string.begin.python + + + comment + single quoted unicode string + end + ''' + endCaptures + + 0 + + name + punctuation.definition.string.end.python + + + name + string.quoted.single.block.unicode.python + patterns + + + include + #constant_placeholder + + + include + #escaped_unicode_char + + + include + #escaped_char + + + + + begin + ([bB])(''') + beginCaptures + + 1 + + name + storage.type.string.python + + 2 + + name + punctuation.definition.string.begin.python + + + comment + single quoted bytes string + end + ''' + endCaptures + + 0 + + name + punctuation.definition.string.end.python + + + name + string.quoted.single.block.bytes.python + patterns + + + include + #constant_placeholder + + + include + #escaped_unicode_char + + + include + #escaped_char + + + + + captures + + 1 + + name + storage.type.string.python + + 2 + + name + punctuation.definition.string.begin.python + + 3 + + patterns + + + include + #constant_placeholder + + + include + #escaped_char_raw_single + + + include + #regular_expressions + + + + 4 + + name + punctuation.definition.string.end.python + + + comment + single quoted raw string + match + ([uU]r)(')((?:[^'\\]|\\.)*)(') + name + string.quoted.single.single-line.unicode-raw-regex.python + + + begin + ([uU]R)(') + beginCaptures + + 1 + + name + storage.type.string.python + + 2 + + name + punctuation.definition.string.begin.python + + + comment + single quoted unicode-raw string + end + (')|(\n) + endCaptures + + 1 + + name + punctuation.definition.string.end.python + + 2 + + name + invalid.illegal.unclosed-string.python + + + name + string.quoted.single.single-line.unicode-raw.python + patterns + + + include + #constant_placeholder + + + include + #escaped_char_raw_single + + + + + begin + ([bB]r)(') + beginCaptures + + 1 + + name + storage.type.string.python + + 2 + + name + punctuation.definition.string.begin.python + + + comment + single quoted bytes-raw string + end + (')|(\n) + endCaptures + + 1 + + name + punctuation.definition.string.end.python + + 2 + + name + invalid.illegal.unclosed-string.python + + + name + string.quoted.single.single-line.bytes-raw-regex.python + patterns + + + include + #constant_placeholder + + + include + #escaped_char_raw_single + + + include + #regular_expressions + + + + + begin + ([bB]R)(') + beginCaptures + + 1 + + name + storage.type.string.python + + 2 + + name + punctuation.definition.string.begin.python + + + comment + single quoted bytes-raw string + end + (')|(\n) + endCaptures + + 1 + + name + punctuation.definition.string.end.python + + 2 + + name + invalid.illegal.unclosed-string.python + + + name + string.quoted.single.single-line.bytes-raw.python + patterns + + + include + #constant_placeholder + + + include + #escaped_char_raw_single + + + + + captures + + 1 + + name + storage.type.string.python + + 2 + + name + punctuation.definition.string.begin.python + + 3 + + patterns + + + include + #constant_placeholder + + + include + #escaped_char_raw_single + + + include + #regular_expressions + + + + 4 + + name + punctuation.definition.string.end.python + + + match + (r)(')((?:[^'\\]|\\.)*)(') + name + string.quoted.single.single-line.raw-regex.python + + + begin + (R)(') + beginCaptures + + 1 + + name + storage.type.string.python + + 2 + + name + punctuation.definition.string.begin.python + + + comment + single quoted raw string + end + (')|(\n) + endCaptures + + 1 + + name + punctuation.definition.string.end.python + + 2 + + name + invalid.illegal.unclosed-string.python + + + name + string.quoted.single.single-line.raw.python + patterns + + + include + #constant_placeholder + + + include + #escaped_char_raw_single + + + + + begin + ([uU])(') + beginCaptures + + 1 + + name + storage.type.string.python + + 2 + + name + punctuation.definition.string.begin.python + + + comment + single quoted unicode string + end + (')|(\n) + endCaptures + + 1 + + name + punctuation.definition.string.end.python + + 2 + + name + invalid.illegal.unclosed-string.python + + + name + string.quoted.single.single-line.unicode.python + patterns + + + include + #constant_placeholder + + + include + #escaped_unicode_char + + + include + #escaped_char + + + + + begin + ([bB])(') + beginCaptures + + 1 + + name + storage.type.string.python + + 2 + + name + punctuation.definition.string.begin.python + + + comment + single quoted bytes string + end + (')|(\n) + endCaptures + + 1 + + name + punctuation.definition.string.end.python + + 2 + + name + invalid.illegal.unclosed-string.python + + + name + string.quoted.single.single-line.bytes.python + patterns + + + include + #constant_placeholder + + + include + #escaped_unicode_char + + + include + #escaped_char + + + + + begin + (')(?=\s*(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER)) + beginCaptures + + 1 + + name + punctuation.definition.string.begin.python + + + comment + single quoted string + end + (')|(\n) + endCaptures + + 1 + + name + punctuation.definition.string.end.python + + 2 + + name + invalid.illegal.unclosed-string.python + + + name + string.quoted.single.single-line.python + patterns + + + captures + + 0 + + patterns + + + include + #constant_placeholder + + + include + #escaped_unicode_char + + + include + #escaped_char + + + include + source.sql + + + + + match + (\G|^)([^'\\]|\\(.|\n))*(?='|$) + + + + + begin + (''') + beginCaptures + + 1 + + name + punctuation.definition.string.begin.python + + + comment + single quoted string + end + ''' + endCaptures + + 0 + + name + punctuation.definition.string.end.python + + + name + string.quoted.single.block.python + patterns + + + begin + (?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER)) + end + (?=''') + patterns + + + include + #constant_placeholder + + + include + #escaped_unicode_char + + + include + #escaped_char + + + include + source.sql + + + + + begin + (?=\S) + end + (?=''') + patterns + + + include + #constant_placeholder + + + include + #escaped_unicode_char + + + include + #escaped_char + + + + + + + begin + (') + beginCaptures + + 1 + + name + punctuation.definition.string.begin.python + + + comment + single quoted string + end + (')|(\n) + endCaptures + + 1 + + name + punctuation.definition.string.end.python + + 2 + + name + invalid.illegal.unclosed-string.python + + + name + string.quoted.single.single-line.python + patterns + + + include + #constant_placeholder + + + include + #escaped_unicode_char + + + include + #escaped_char + + + + + + strings + + patterns + + + include + #string_quoted_double + + + include + #string_quoted_single + + + + + scopeName + source.python + uuid + F23DB5B2-7D08-11D9-A709-000D93B6E43C + + \ No newline at end of file diff --git a/src/file-viewer/highlight-grammar/shell.plist b/src/file-viewer/highlight-grammar/shell.plist new file mode 100644 index 0000000..b705179 --- /dev/null +++ b/src/file-viewer/highlight-grammar/shell.plist @@ -0,0 +1,1889 @@ + + + + + fileTypes + + sh + bash + zsh + bashrc + bash_profile + bash_login + profile + bash_logout + .textmate_init + + firstLineMatch + ^#!.*\b(bash|zsh|sh|tcsh)|^#.*-\*-.*\bshell-script\b.*-\*- + keyEquivalent + ^~S + name + Shell Script (Bash) + patterns + + + include + #comment + + + include + #pipeline + + + include + #list + + + include + #compound-command + + + include + #loop + + + include + #string + + + include + #function-definition + + + include + #variable + + + include + #interpolation + + + include + #heredoc + + + include + #herestring + + + include + #redirection + + + include + #pathname + + + include + #keyword + + + include + #support + + + include + #lines + + + repository + + case-clause + + patterns + + + begin + (?=\S) + end + ;; + endCaptures + + 0 + + name + punctuation.terminator.case-clause.shell + + + name + meta.scope.case-clause.shell + patterns + + + begin + (\(|(?=\S)) + captures + + 0 + + name + punctuation.definition.case-pattern.shell + + + end + \) + name + meta.scope.case-pattern.shell + patterns + + + match + \| + name + punctuation.separator.pipe-sign.shell + + + include + #string + + + include + #variable + + + include + #interpolation + + + include + #pathname + + + + + begin + (?<=\)) + end + (?=;;) + name + meta.scope.case-clause-body.shell + patterns + + + include + $self + + + + + + + + comment + + begin + (^[ \t]+)?(?<!\S)(?=#)(?!#\{) + beginCaptures + + 1 + + name + punctuation.whitespace.comment.leading.shell + + + end + (?!\G) + patterns + + + begin + ^(#!) + beginCaptures + + 1 + + name + punctuation.definition.comment.line.shebang.shell + + + end + \n + name + comment.line.shebang.shell + + + begin + # + beginCaptures + + 0 + + name + punctuation.definition.comment.shell + + + end + \n + name + comment.line.number-sign.shell + + + + compound-command + + patterns + + + begin + (\[{2}) + captures + + 1 + + name + punctuation.definition.logical-expression.shell + + + end + (\]{2}) + name + meta.scope.logical-expression.shell + patterns + + + include + #logical-expression + + + include + $self + + + + + begin + (\({2}) + beginCaptures + + 0 + + name + punctuation.definition.string.begin.shell + + + end + (\){2}) + endCaptures + + 0 + + name + punctuation.definition.string.end.shell + + + name + string.other.math.shell + patterns + + + include + #math + + + + + begin + (\() + captures + + 1 + + name + punctuation.definition.subshell.shell + + + end + (\)) + name + meta.scope.subshell.shell + patterns + + + include + $self + + + + + begin + (?<=\s|^)(\{)(?=\s|$) + captures + + 1 + + name + punctuation.definition.group.shell + + + end + (?<=^|;)\s*(\}) + name + meta.scope.group.shell + patterns + + + include + $self + + + + + + function-definition + + patterns + + + begin + (?<=^|;|&)\s*(function)\s+([^\s<>;'"\\|$&()]+)(?:\s*(\(\)))? + beginCaptures + + 1 + + name + storage.type.function.shell + + 2 + + name + entity.name.function.shell + + 3 + + name + punctuation.definition.arguments.shell + + + end + ;|&|\n + endCaptures + + 0 + + name + punctuation.definition.function.shell + + + name + meta.function.shell + patterns + + + include + $self + + + + + begin + (?<=^|;|&)\s*([^\s<>;'"\\|$&()]+)\s*(\(\)) + beginCaptures + + 1 + + name + entity.name.function.shell + + 2 + + name + punctuation.definition.arguments.shell + + + end + ;|&|\n + endCaptures + + 0 + + name + punctuation.definition.function.shell + + + name + meta.function.shell + patterns + + + include + $self + + + + + + heredoc + + patterns + + + begin + (<<)-\s*("|'|)(RUBY)\2 + beginCaptures + + 1 + + name + keyword.operator.heredoc.shell + + 3 + + name + keyword.control.heredoc-token.shell + + + captures + + 0 + + name + punctuation.definition.string.shell + + + contentName + source.ruby.embedded.shell + end + ^\t*(RUBY)(?=\s|;|&|$) + endCaptures + + 1 + + name + keyword.control.heredoc-token.shell + + + name + string.unquoted.heredoc.no-indent.ruby.shell + patterns + + + include + source.ruby + + + + + begin + (<<)\s*("|'|)(RUBY)\2 + beginCaptures + + 1 + + name + keyword.operator.heredoc.shell + + 3 + + name + keyword.control.heredoc-token.shell + + + captures + + 0 + + name + punctuation.definition.string.shell + + + contentName + source.ruby.embedded.shell + end + ^(RUBY)(?=\s|;|&|$) + endCaptures + + 1 + + name + keyword.control.heredoc-token.shell + + + name + string.unquoted.heredoc.ruby.shell + patterns + + + include + source.ruby + + + + + begin + (<<)-\s*("|'|)(PYTHON)\2 + beginCaptures + + 1 + + name + keyword.operator.heredoc.shell + + 3 + + name + keyword.control.heredoc-token.shell + + + captures + + 0 + + name + punctuation.definition.string.shell + + + contentName + source.python.embedded.shell + end + ^\t*(PYTHON)(?=\s|;|&|$) + endCaptures + + 1 + + name + keyword.control.heredoc-token.shell + + + name + string.unquoted.heredoc.no-indent.python.shell + patterns + + + include + source.python + + + + + begin + (<<)\s*("|'|)(PYTHON)\2 + beginCaptures + + 1 + + name + keyword.operator.heredoc.shell + + 3 + + name + keyword.control.heredoc-token.shell + + + captures + + 0 + + name + punctuation.definition.string.shell + + + contentName + source.python.embedded.shell + end + ^(PYTHON)(?=\s|;|&|$) + endCaptures + + 1 + + name + keyword.control.heredoc-token.shell + + + name + string.unquoted.heredoc.python.shell + patterns + + + include + source.python + + + + + begin + (<<)-\s*("|'|)(APPLESCRIPT)\2 + beginCaptures + + 1 + + name + keyword.operator.heredoc.shell + + 3 + + name + keyword.control.heredoc-token.shell + + + captures + + 0 + + name + punctuation.definition.string.shell + + + contentName + source.applescript.embedded.shell + end + ^\t*(APPLESCRIPT)(?=\s|;|&|$) + endCaptures + + 1 + + name + keyword.control.heredoc-token.shell + + + name + string.unquoted.heredoc.no-indent.applescript.shell + patterns + + + include + source.applescript + + + + + begin + (<<)\s*("|'|)(APPLESCRIPT)\2 + beginCaptures + + 1 + + name + keyword.operator.heredoc.shell + + 3 + + name + keyword.control.heredoc-token.shell + + + captures + + 0 + + name + punctuation.definition.string.shell + + + contentName + source.applescript.embedded.shell + end + ^(APPLESCRIPT)(?=\s|;|&|$) + endCaptures + + 1 + + name + keyword.control.heredoc-token.shell + + + name + string.unquoted.heredoc.applescript.shell + patterns + + + include + source.applescript + + + + + begin + (<<)-\s*("|'|)(HTML)\2 + beginCaptures + + 1 + + name + keyword.operator.heredoc.shell + + 3 + + name + keyword.control.heredoc-token.shell + + + captures + + 0 + + name + punctuation.definition.string.shell + + + contentName + text.html.embedded.shell + end + ^\t*(HTML)(?=\s|;|&|$) + endCaptures + + 1 + + name + keyword.control.heredoc-token.shell + + + name + string.unquoted.heredoc.no-indent.html.shell + patterns + + + include + text.html.basic + + + + + begin + (<<)\s*("|'|)(HTML)\2 + beginCaptures + + 1 + + name + keyword.operator.heredoc.shell + + 3 + + name + keyword.control.heredoc-token.shell + + + captures + + 0 + + name + punctuation.definition.string.shell + + + contentName + text.html.embedded.shell + end + ^(HTML)(?=\s|;|&|$) + endCaptures + + 1 + + name + keyword.control.heredoc-token.shell + + + name + string.unquoted.heredoc.html.shell + patterns + + + include + text.html.basic + + + + + begin + (<<)-\s*("|'|)(MARKDOWN)\2 + beginCaptures + + 1 + + name + keyword.operator.heredoc.shell + + 3 + + name + keyword.control.heredoc-token.shell + + + captures + + 0 + + name + punctuation.definition.string.shell + + + contentName + text.html.markdown.embedded.shell + end + ^\t*(MARKDOWN)(?=\s|;|&|$) + endCaptures + + 1 + + name + keyword.control.heredoc-token.shell + + + name + string.unquoted.heredoc.no-indent.markdown.shell + patterns + + + include + text.html.markdown + + + + + begin + (<<)\s*("|'|)(MARKDOWN)\2 + beginCaptures + + 1 + + name + keyword.operator.heredoc.shell + + 3 + + name + keyword.control.heredoc-token.shell + + + captures + + 0 + + name + punctuation.definition.string.shell + + + contentName + text.html.markdown.embedded.shell + end + ^(MARKDOWN)(?=\s|;|&|$) + endCaptures + + 1 + + name + keyword.control.heredoc-token.shell + + + name + string.unquoted.heredoc.markdown.shell + patterns + + + include + text.html.markdown + + + + + begin + (<<)-\s*("|'|)(TEXTILE)\2 + beginCaptures + + 1 + + name + keyword.operator.heredoc.shell + + 3 + + name + keyword.control.heredoc-token.shell + + + captures + + 0 + + name + punctuation.definition.string.shell + + + contentName + text.html.textile.embedded.shell + end + ^\t*(TEXTILE)(?=\s|;|&|$) + endCaptures + + 1 + + name + keyword.control.heredoc-token.shell + + + name + string.unquoted.heredoc.no-indent.textile.shell + patterns + + + include + text.html.textile + + + + + begin + (<<)\s*("|'|)(TEXTILE)\2 + beginCaptures + + 1 + + name + keyword.operator.heredoc.shell + + 3 + + name + keyword.control.heredoc-token.shell + + + captures + + 0 + + name + punctuation.definition.string.shell + + + contentName + text.html.textile.embedded.shell + end + ^(TEXTILE)(?=\s|;|&|$) + endCaptures + + 1 + + name + keyword.control.heredoc-token.shell + + + name + string.unquoted.heredoc.textile.shell + patterns + + + include + text.html.textile + + + + + begin + (<<)-\s*("|'|)\\?(\w+)\2 + beginCaptures + + 1 + + name + keyword.operator.heredoc.shell + + 3 + + name + keyword.control.heredoc-token.shell + + + captures + + 0 + + name + punctuation.definition.string.shell + + + end + ^\t*(\3)(?=\s|;|&|$) + endCaptures + + 1 + + name + keyword.control.heredoc-token.shell + + + name + string.unquoted.heredoc.no-indent.shell + + + begin + (<<)\s*("|'|)\\?(\w+)\2 + beginCaptures + + 1 + + name + keyword.operator.heredoc.shell + + 3 + + name + keyword.control.heredoc-token.shell + + + captures + + 0 + + name + punctuation.definition.string.shell + + + end + ^(\3)(?=\s|;|&|$) + endCaptures + + 1 + + name + keyword.control.heredoc-token.shell + + + name + string.unquoted.heredoc.shell + + + + herestring + + patterns + + + captures + + 1 + + name + keyword.operator.herestring.shell + + + match + (<<<) + name + meta.herestring.shell + + + + interpolation + + patterns + + + begin + \$\({2} + beginCaptures + + 0 + + name + punctuation.definition.string.begin.shell + + + end + \){2} + endCaptures + + 0 + + name + punctuation.definition.string.end.shell + + + name + string.other.math.shell + patterns + + + include + #math + + + + + begin + ` + beginCaptures + + 0 + + name + punctuation.definition.string.begin.shell + + + end + ` + endCaptures + + 0 + + name + punctuation.definition.string.end.shell + + + name + string.interpolated.backtick.shell + patterns + + + match + \\[`\\$] + name + constant.character.escape.shell + + + begin + (?<=^|;|&|\s|`)(#)(?!\{) + beginCaptures + + 1 + + name + punctuation.definition.comment.shell + + + end + (?=`)|\n + name + comment.line.number-sign.shell + + + include + $self + + + + + begin + \$\( + beginCaptures + + 0 + + name + punctuation.definition.string.begin.shell + + + end + \) + endCaptures + + 0 + + name + punctuation.definition.string.end.shell + + + name + string.interpolated.dollar.shell + patterns + + + begin + (?<=^|;|&|\s|\()(#)(?!\{) + beginCaptures + + 1 + + name + punctuation.definition.comment.shell + + + end + (?=\))|\n + name + comment.line.number-sign.shell + + + include + $self + + + + + + keyword + + patterns + + + match + (?<=^|;|&|\s)(?:if|then|else|elif|fi|for|in|do|done|select|case|continue|esac|while|until|return|coproc)(?=\s|;|&|$) + name + keyword.control.shell + + + match + (?<=^|;|&|\s)(?:export|declare|typeset|local|readonly)(?=\s|;|&|$) + name + storage.modifier.shell + + + + lines + + patterns + + + match + \\\n + name + constant.character.escape.newline.shell + + + + list + + patterns + + + match + ;|&&|&|\|\| + name + keyword.operator.list.shell + + + + logical-expression + + patterns + + + comment + do we want a special rule for ( expr )? + match + =[=~]?|!=?|<|>|&&|\|\| + name + keyword.operator.logical.shell + + + match + (?<!\S)-(nt|ot|ef|eq|ne|l[te]|g[te]|[a-hknoprstuwxzOGLSN]) + name + keyword.operator.logical.shell + + + + loop + + patterns + + + begin + (?<=^|;|&|\s)(for)\s+(?=\({2}) + captures + + 1 + + name + keyword.control.shell + + + end + (?<=^|;|&|\s)(done)(?=\s|;|&|$|\)) + name + meta.scope.for-loop.shell + patterns + + + include + $self + + + + + begin + (?<=^|;|&|\s)(for)\s+([^\s\\]+)(?=\s|;|&|$) + beginCaptures + + 1 + + name + keyword.control.shell + + 2 + + name + variable.other.loop.shell + + + end + (?<=^|;|&|\s)(done)(?=\s|;|&|$|\)) + endCaptures + + 1 + + name + keyword.control.shell + + + name + meta.scope.for-in-loop.shell + patterns + + + include + $self + + + + + begin + (?<=^|;|&|\s)(while|until)(?=\s|;|&|$) + captures + + 1 + + name + keyword.control.shell + + + end + (?<=^|;|&|\s)(done)(?=\s|;|&|$|\)) + name + meta.scope.while-loop.shell + patterns + + + include + $self + + + + + begin + (?<=^|;|&|\s)(select)\s+([^\s\\]+)(?=\s|;|&|$) + beginCaptures + + 1 + + name + keyword.control.shell + + 2 + + name + variable.other.loop.shell + + + end + (?<=^|;|&|\s)(done)(?=\s|;|&|$|\)) + endCaptures + + 1 + + name + keyword.control.shell + + + name + meta.scope.select-block.shell + patterns + + + include + $self + + + + + begin + (?<=^|;|&|\s)(case)(?=\s|;|&|$) + captures + + 1 + + name + keyword.control.shell + + + end + (?<=^|;|&|\s)(esac)(?=\s|;|&|$|\)) + name + meta.scope.case-block.shell + patterns + + + begin + (?<=^|;|&|\s)(?:in)(?=\s|;|&|$) + beginCaptures + + 1 + + name + keyword.control.shell + + + end + (?<=^|;|&|\s)(?=(?:esac)(?:\s|;|&|$|\))) + name + meta.scope.case-body.shell + patterns + + + include + #comment + + + include + #case-clause + + + include + $self + + + + + include + $self + + + + + begin + (^|(?<=[&;|]))\s*(if)(?=\s|;|&|$) + beginCaptures + + 2 + + name + keyword.control.shell + + + comment + Restrict match to avoid matching in lines like `dd if=/dev/sda1 …` + end + (?<=^|;|&|\s)(fi)(?=\s|;|&|$|\)) + endCaptures + + 1 + + name + keyword.control.shell + + + name + meta.scope.if-block.shell + patterns + + + include + $self + + + + + + math + + patterns + + + include + #variable + + + match + \+{1,2}|-{1,2}|!|~|\*{1,2}|/|%|<[<=]?|>[>=]?|==|!=|\^|\|{1,2}|&{1,2}|\?|\:|,|=|[*/%+\-&^|]=|<<=|>>= + name + keyword.operator.arithmetic.shell + + + match + 0[xX]\h+ + name + constant.numeric.hex.shell + + + match + 0\d+ + name + constant.numeric.octal.shell + + + match + \d{1,2}#[0-9a-zA-Z@_]+ + name + constant.numeric.other.shell + + + match + \d+ + name + constant.numeric.integer.shell + + + + pathname + + patterns + + + match + (?<=\s|:|=|^)~ + name + keyword.operator.tilde.shell + + + match + \*|\? + name + keyword.operator.glob.shell + + + begin + ([?*+@!])(\() + beginCaptures + + 1 + + name + keyword.operator.extglob.shell + + 2 + + name + punctuation.definition.extglob.shell + + + end + (\)) + endCaptures + + 1 + + name + punctuation.definition.extglob.shell + + + name + meta.structure.extglob.shell + patterns + + + include + $self + + + + + + pipeline + + patterns + + + match + (?<=^|;|&|\s)(time)(?=\s|;|&|$) + name + keyword.other.shell + + + match + [|!] + name + keyword.operator.pipe.shell + + + + redirection + + patterns + + + begin + [><]\( + beginCaptures + + 0 + + name + punctuation.definition.string.begin.shell + + + end + \) + endCaptures + + 0 + + name + punctuation.definition.string.end.shell + + + name + string.interpolated.process-substitution.shell + patterns + + + include + $self + + + + + comment + valid: &>word >&word >word [n]>&[n] [n]<word [n]>word [n]>>word [n]<&word (last one is duplicate) + match + &>|\d*>&\d*|\d*(>>|>|<)|\d*<&|\d*<> + name + keyword.operator.redirect.shell + + + + string + + patterns + + + match + \\. + name + constant.character.escape.shell + + + begin + ' + beginCaptures + + 0 + + name + punctuation.definition.string.begin.shell + + + end + ' + endCaptures + + 0 + + name + punctuation.definition.string.end.shell + + + name + string.quoted.single.shell + + + begin + \$?" + beginCaptures + + 0 + + name + punctuation.definition.string.begin.shell + + + end + " + endCaptures + + 0 + + name + punctuation.definition.string.end.shell + + + name + string.quoted.double.shell + patterns + + + match + \\[\$`"\\\n] + name + constant.character.escape.shell + + + include + #variable + + + include + #interpolation + + + + + begin + \$' + beginCaptures + + 0 + + name + punctuation.definition.string.begin.shell + + + end + ' + endCaptures + + 0 + + name + punctuation.definition.string.end.shell + + + name + string.quoted.single.dollar.shell + patterns + + + match + \\(a|b|e|f|n|r|t|v|\\|') + name + constant.character.escape.ansi-c.shell + + + match + \\[0-9]{3} + name + constant.character.escape.octal.shell + + + match + \\x[0-9a-fA-F]{2} + name + constant.character.escape.hex.shell + + + match + \\c. + name + constant.character.escape.control-char.shell + + + + + + support + + patterns + + + match + (?<=^|;|&|\s)(?::|\.)(?=\s|;|&|$) + name + support.function.builtin.shell + + + match + (?<=^|;|&|\s)(?:alias|bg|bind|break|builtin|caller|cd|command|compgen|complete|dirs|disown|echo|enable|eval|exec|exit|false|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|mapfile|popd|printf|pushd|pwd|read(array)?|readonly|set|shift|shopt|source|suspend|test|times|trap|true|type|ulimit|umask|unalias|unset|wait)(?=\s|;|&|$) + name + support.function.builtin.shell + + + + variable + + patterns + + + captures + + 1 + + name + punctuation.definition.variable.shell + + + match + (\$)[a-zA-Z_][a-zA-Z0-9_]* + name + variable.other.normal.shell + + + captures + + 1 + + name + punctuation.definition.variable.shell + + + match + (\$)[-*@#?$!0_] + name + variable.other.special.shell + + + captures + + 1 + + name + punctuation.definition.variable.shell + + + match + (\$)[1-9] + name + variable.other.positional.shell + + + begin + \$\{ + captures + + 0 + + name + punctuation.definition.variable.shell + + + end + \} + name + variable.other.bracket.shell + patterns + + + match + !|:[-=?+]?|\*|@|#{1,2}|%{1,2}|/ + name + keyword.operator.expansion.shell + + + captures + + 1 + + name + punctuation.section.array.shell + + 3 + + name + punctuation.section.array.shell + + + match + (\[)([^\]]+)(\]) + + + include + #string + + + include + #variable + + + include + #interpolation + + + + + + + scopeName + source.shell + uuid + DDEEA3ED-6B1C-11D9-8B10-000D93589AF6 + + \ No newline at end of file diff --git a/src/file-viewer/highlight-grammar/toml.plist b/src/file-viewer/highlight-grammar/toml.plist new file mode 100644 index 0000000..68b3b82 --- /dev/null +++ b/src/file-viewer/highlight-grammar/toml.plist @@ -0,0 +1,736 @@ + + + + + fileTypes + + toml + + keyEquivalent + ^~T + name + TOML + patterns + + + include + #comments + + + include + #groups + + + include + #key_pair + + + include + #invalid + + + repository + + comments + + begin + (^[ \t]+)?(?=#) + beginCaptures + + 1 + + name + punctuation.whitespace.comment.leading.toml + + + end + (?!\G) + patterns + + + begin + # + beginCaptures + + 0 + + name + punctuation.definition.comment.toml + + + end + \n + name + comment.line.number-sign.toml + + + + groups + + patterns + + + captures + + 1 + + name + punctuation.definition.section.begin.toml + + 2 + + patterns + + + match + [^\s.]+ + name + entity.name.section.toml + + + + 3 + + name + punctuation.definition.section.begin.toml + + + match + ^\s*(\[)([^\[\]]*)(\]) + name + meta.group.toml + + + captures + + 1 + + name + punctuation.definition.section.begin.toml + + 2 + + patterns + + + match + [^\s.]+ + name + entity.name.section.toml + + + + 3 + + name + punctuation.definition.section.begin.toml + + + match + ^\s*(\[\[)([^\[\]]*)(\]\]) + name + meta.group.double.toml + + + + invalid + + match + \S+(\s*(?=\S))? + name + invalid.illegal.not-allowed-here.toml + + key_pair + + patterns + + + begin + ([A-Za-z0-9_-]+)\s*(=)\s* + captures + + 1 + + name + variable.other.key.toml + + 2 + + name + punctuation.separator.key-value.toml + + + end + (?<=\S)(?<!=)|$ + patterns + + + include + #primatives + + + + + begin + ((")(.*?)("))\s*(=)\s* + captures + + 1 + + name + variable.other.key.toml + + 2 + + name + punctuation.definition.variable.begin.toml + + 3 + + patterns + + + match + \\([btnfr"\\]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8}) + name + constant.character.escape.toml + + + match + \\[^btnfr"\\] + name + invalid.illegal.escape.toml + + + match + " + name + invalid.illegal.not-allowed-here.toml + + + + 4 + + name + punctuation.definition.variable.end.toml + + 5 + + name + punctuation.separator.key-value.toml + + + end + (?<=\S)(?<!=)|$ + patterns + + + include + #primatives + + + + + begin + ((')([^']*)('))\s*(=)\s* + captures + + 1 + + name + variable.other.key.toml + + 2 + + name + punctuation.definition.variable.begin.toml + + 4 + + name + punctuation.definition.variable.end.toml + + 5 + + name + punctuation.separator.key-value.toml + + + end + (?<=\S)(?<!=)|$ + patterns + + + include + #primatives + + + + + begin + (?x) + ( + ( + (?: + [A-Za-z0-9_-]+ # Bare key + | " (?:[^"\\]|\\.)* " # Double quoted key + | ' [^']* ' # Sindle quoted key + ) + (?: + \s* \. \s* # Dot + | (?= \s* =) # or look-ahead for equals + ) + ){2,} # Ensure at least one dot + ) + \s*(=)\s* + + captures + + 1 + + name + variable.other.key.toml + patterns + + + match + \. + name + punctuation.separator.variable.toml + + + captures + + 1 + + name + punctuation.definition.variable.begin.toml + + 2 + + patterns + + + match + \\([btnfr"\\]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8}) + name + constant.character.escape.toml + + + match + \\[^btnfr"\\] + name + invalid.illegal.escape.toml + + + + 3 + + name + punctuation.definition.variable.end.toml + + + match + (")((?:[^"\\]|\\.)*)(") + + + captures + + 1 + + name + punctuation.definition.variable.begin.toml + + 2 + + name + punctuation.definition.variable.end.toml + + + match + (')[^']*(') + + + + 3 + + name + punctuation.separator.key-value.toml + + + comment + Dotted key + end + (?<=\S)(?<!=)|$ + patterns + + + include + #primatives + + + + + + primatives + + patterns + + + begin + \G""" + beginCaptures + + 0 + + name + punctuation.definition.string.begin.toml + + + end + "{3,5} + endCaptures + + 0 + + name + punctuation.definition.string.end.toml + + + name + string.quoted.triple.double.toml + patterns + + + match + \\([btnfr"\\]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8}) + name + constant.character.escape.toml + + + match + \\[^btnfr"\\\n] + name + invalid.illegal.escape.toml + + + + + begin + \G" + beginCaptures + + 0 + + name + punctuation.definition.string.begin.toml + + + end + " + endCaptures + + 0 + + name + punctuation.definition.string.end.toml + + + name + string.quoted.double.toml + patterns + + + match + \\([btnfr"\\]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8}) + name + constant.character.escape.toml + + + match + \\[^btnfr"\\] + name + invalid.illegal.escape.toml + + + + + begin + \G''' + beginCaptures + + 0 + + name + punctuation.definition.string.begin.toml + + + end + '{3,5} + endCaptures + + 0 + + name + punctuation.definition.string.end.toml + + + name + string.quoted.triple.single.toml + + + begin + \G' + beginCaptures + + 0 + + name + punctuation.definition.string.begin.toml + + + end + ' + endCaptures + + 0 + + name + punctuation.definition.string.end.toml + + + name + string.quoted.single.toml + + + match + \G(?x) + [0-9]{4} + - + (0[1-9]|1[012]) + - + (?!00|3[2-9])[0-3][0-9] + ( + [Tt ] + (?!2[5-9])[0-2][0-9] + : + [0-5][0-9] + : + (?!6[1-9])[0-6][0-9] + (\.[0-9]+)? + ( + Z + | [+-](?!2[5-9])[0-2][0-9]:[0-5][0-9] + )? + )? + + name + constant.other.date.toml + + + match + \G(?x) + (?!2[5-9])[0-2][0-9] + : + [0-5][0-9] + : + (?!6[1-9])[0-6][0-9] + (\.[0-9]+)? + + name + constant.other.time.toml + + + match + \G(true|false) + name + constant.language.boolean.toml + + + match + \G0x\h(\h|_\h)* + name + constant.numeric.hex.toml + + + match + \G0o[0-7]([0-7]|_[0-7])* + name + constant.numeric.octal.toml + + + match + \G0b[01]([01]|_[01])* + name + constant.numeric.binary.toml + + + match + \G[+-]?(inf|nan) + name + constant.numeric.toml + + + match + (?x) + \G + ( + [+-]? + ( + 0 + | ([1-9](([0-9]|_[0-9])+)?) + ) + ) + (?=[.eE]) + ( + \. + ([0-9](([0-9]|_[0-9])+)?) + )? + ( + [eE] + ([+-]?[0-9](([0-9]|_[0-9])+)?) + )? + + name + constant.numeric.float.toml + + + match + (?x) + \G + ( + [+-]? + ( + 0 + | ([1-9](([0-9]|_[0-9])+)?) + ) + ) + + name + constant.numeric.integer.toml + + + begin + \G\[ + beginCaptures + + 0 + + name + punctuation.definition.array.begin.toml + + + end + \] + endCaptures + + 0 + + name + punctuation.definition.array.end.toml + + + name + meta.array.toml + patterns + + + begin + (?=["'']|[+-]?[0-9]|[+-]?(inf|nan)|true|false|\[|\{) + end + ,|(?=]) + endCaptures + + 0 + + name + punctuation.separator.array.toml + + + patterns + + + include + #primatives + + + include + #comments + + + include + #invalid + + + + + include + #comments + + + include + #invalid + + + + + begin + \G\{ + beginCaptures + + 0 + + name + punctuation.definition.inline-table.begin.toml + + + end + \} + endCaptures + + 0 + + name + punctuation.definition.inline-table.end.toml + + + name + meta.inline-table.toml + patterns + + + begin + (?=\S) + end + ,|(?=}) + endCaptures + + 0 + + name + punctuation.separator.inline-table.toml + + + patterns + + + include + #key_pair + + + + + include + #comments + + + + + + + scopeName + source.toml + uuid + 7DEF2EDB-5BB7-4DD2-9E78-3541A26B7923 + + \ No newline at end of file diff --git a/src/file-viewer/highlight-grammar/ts.plist b/src/file-viewer/highlight-grammar/ts.plist new file mode 100644 index 0000000..4d91f6a --- /dev/null +++ b/src/file-viewer/highlight-grammar/ts.plist @@ -0,0 +1,9858 @@ + + + + + name + TypeScript + scopeName + source.ts + fileTypes + + ts + + uuid + ef98eb90-bf9b-11e4-bb52-0800200c9a66 + patterns + + + include + #directives + + + include + #statements + + + include + #shebang + + + repository + + shebang + + name + comment.line.shebang.ts + match + \A(#!).*(?=$) + captures + + 1 + + name + punctuation.definition.comment.ts + + + + statements + + patterns + + + include + #declaration + + + include + #control-statement + + + include + #after-operator-block-as-object-literal + + + include + #decl-block + + + include + #label + + + include + #expression + + + include + #punctuation-semicolon + + + include + #string + + + include + #comment + + + + declaration + + patterns + + + include + #decorator + + + include + #var-expr + + + include + #function-declaration + + + include + #class-declaration + + + include + #interface-declaration + + + include + #enum-declaration + + + include + #namespace-declaration + + + include + #type-alias-declaration + + + include + #import-equals-declaration + + + include + #import-declaration + + + include + #export-declaration + + + name + storage.modifier.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(declare|export)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + + control-statement + + patterns + + + include + #switch-statement + + + include + #for-loop + + + name + keyword.control.trycatch.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(catch|finally|throw|try)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(break|continue|goto)\s+([_$[:alpha:]][_$[:alnum:]]*)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + captures + + 1 + + name + keyword.control.loop.ts + + 2 + + name + entity.name.label.ts + + + + + name + keyword.control.loop.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(break|continue|do|goto|while)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(return)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + beginCaptures + + 0 + + name + keyword.control.flow.ts + + + end + (?=[;}]|$|;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b)) + patterns + + + include + #expression + + + + + name + keyword.control.switch.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(case|default|switch)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + include + #if-statement + + + name + keyword.control.conditional.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(else|if)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + name + keyword.control.with.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(with)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + name + keyword.control.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(package)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + name + keyword.other.debugger.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(debugger)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + + label + + patterns + + + begin + ([_$[:alpha:]][_$[:alnum:]]*)\s*(:)(?=\s*\{) + beginCaptures + + 1 + + name + entity.name.label.ts + + 2 + + name + punctuation.separator.label.ts + + + end + (?<=\}) + patterns + + + include + #decl-block + + + + + match + ([_$[:alpha:]][_$[:alnum:]]*)\s*(:) + captures + + 1 + + name + entity.name.label.ts + + 2 + + name + punctuation.separator.label.ts + + + + + + expression + + patterns + + + include + #expressionWithoutIdentifiers + + + include + #identifiers + + + include + #expressionPunctuations + + + + expressionWithoutIdentifiers + + patterns + + + include + #string + + + include + #regex + + + include + #comment + + + include + #function-expression + + + include + #class-expression + + + include + #arrow-function + + + include + #paren-expression-possibly-arrow + + + include + #cast + + + include + #ternary-expression + + + include + #new-expr + + + include + #instanceof-expr + + + include + #object-literal + + + include + #expression-operators + + + include + #function-call + + + include + #literal + + + include + #support-objects + + + include + #paren-expression + + + + expressionPunctuations + + patterns + + + include + #punctuation-comma + + + include + #punctuation-accessor + + + + decorator + + name + meta.decorator.ts + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))\@ + beginCaptures + + 0 + + name + punctuation.decorator.ts + + + end + (?=\s) + patterns + + + include + #expression + + + + var-expr + + patterns + + + name + meta.var.expr.ts + begin + (?=(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(var|let)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) + end + (?!(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(var|let)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))((?=^|;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b))|((?<!^let|[^\._$[:alnum:]]let|^var|[^\._$[:alnum:]]var)(?=\s*$))) + patterns + + + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(var|let)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s* + beginCaptures + + 1 + + name + keyword.control.export.ts + + 2 + + name + storage.modifier.ts + + 3 + + name + storage.type.ts + + + end + (?=\S) + + + include + #destructuring-variable + + + include + #var-single-variable + + + include + #variable-initializer + + + include + #comment + + + begin + (,)\s*(?=$|\/\/) + beginCaptures + + 1 + + name + punctuation.separator.comma.ts + + + end + (?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$))) + patterns + + + include + #single-line-comment-consuming-line-ending + + + include + #comment + + + include + #destructuring-variable + + + include + #var-single-variable + + + include + #punctuation-comma + + + + + include + #punctuation-comma + + + + + name + meta.var.expr.ts + begin + (?=(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(const(?!\s+enum\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) + beginCaptures + + 1 + + name + keyword.control.export.ts + + 2 + + name + storage.modifier.ts + + 3 + + name + storage.type.ts + + + end + (?!(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(const(?!\s+enum\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))((?=^|;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b))|((?<!^const|[^\._$[:alnum:]]const)(?=\s*$))) + patterns + + + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(const(?!\s+enum\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s* + beginCaptures + + 1 + + name + keyword.control.export.ts + + 2 + + name + storage.modifier.ts + + 3 + + name + storage.type.ts + + + end + (?=\S) + + + include + #destructuring-const + + + include + #var-single-const + + + include + #variable-initializer + + + include + #comment + + + begin + (,)\s*(?=$|\/\/) + beginCaptures + + 1 + + name + punctuation.separator.comma.ts + + + end + (?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$))) + patterns + + + include + #single-line-comment-consuming-line-ending + + + include + #comment + + + include + #destructuring-const + + + include + #var-single-const + + + include + #punctuation-comma + + + + + include + #punctuation-comma + + + + + name + meta.var.expr.ts + begin + (?=(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b((?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) + beginCaptures + + 1 + + name + keyword.control.export.ts + + 2 + + name + storage.modifier.ts + + 3 + + name + storage.type.ts + + + end + (?!(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b((?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))((?=;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b))|((?<!^using|[^\._$[:alnum:]]using|^await\s+using|[^\._$[:alnum:]]await\s+using)(?=\s*$))) + patterns + + + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b((?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s* + beginCaptures + + 1 + + name + keyword.control.export.ts + + 2 + + name + storage.modifier.ts + + 3 + + name + storage.type.ts + + + end + (?=\S) + + + include + #var-single-const + + + include + #variable-initializer + + + include + #comment + + + begin + (,)\s*((?!\S)|(?=\/\/)) + beginCaptures + + 1 + + name + punctuation.separator.comma.ts + + + end + (?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$))) + patterns + + + include + #single-line-comment-consuming-line-ending + + + include + #comment + + + include + #var-single-const + + + include + #punctuation-comma + + + + + include + #punctuation-comma + + + + + + var-single-variable + + patterns + + + name + meta.var-single-variable.expr.ts + begin + (?x)([_$[:alpha:]][_$[:alnum:]]*)(\!)?(?=\s* +# function assignment | +(=\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|((<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) +) | + +# arrow function possible to detect only with => on same line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator +) + )) +)) | +# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) => +(:\s*( + (<) | + ([(]\s*( + ([)]) | + (\.\.\.) | + ([_$[:alnum:]]+\s*( + ([:,?=])| + ([)]\s*=>) + )) + )) +)) | +(:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) | +(:\s*((<\s*$)|((<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) | +(:\s*(=>|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|((<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) +) | + +# arrow function possible to detect only with => on same line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator +) + )) +))) + beginCaptures + + 1 + + name + meta.definition.variable.ts entity.name.function.ts + + 2 + + name + keyword.operator.definiteassignment.ts + + + end + (?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|(;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b))) + patterns + + + include + #var-single-variable-type-annotation + + + + + name + meta.var-single-variable.expr.ts + begin + ([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])(\!)? + beginCaptures + + 1 + + name + meta.definition.variable.ts variable.other.constant.ts + + 2 + + name + keyword.operator.definiteassignment.ts + + + end + (?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|(;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b))) + patterns + + + include + #var-single-variable-type-annotation + + + + + name + meta.var-single-variable.expr.ts + begin + ([_$[:alpha:]][_$[:alnum:]]*)(\!)? + beginCaptures + + 1 + + name + meta.definition.variable.ts variable.other.readwrite.ts + + 2 + + name + keyword.operator.definiteassignment.ts + + + end + (?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|(;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b))) + patterns + + + include + #var-single-variable-type-annotation + + + + + + var-single-const + + patterns + + + name + meta.var-single-variable.expr.ts + begin + (?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\s* +# function assignment | +(=\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|((<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) +) | + +# arrow function possible to detect only with => on same line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator +) + )) +)) | +# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) => +(:\s*( + (<) | + ([(]\s*( + ([)]) | + (\.\.\.) | + ([_$[:alnum:]]+\s*( + ([:,?=])| + ([)]\s*=>) + )) + )) +)) | +(:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) | +(:\s*((<\s*$)|((<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) | +(:\s*(=>|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|((<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) +) | + +# arrow function possible to detect only with => on same line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator +) + )) +))) + beginCaptures + + 1 + + name + meta.definition.variable.ts variable.other.constant.ts entity.name.function.ts + + + end + (?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|(;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b))) + patterns + + + include + #var-single-variable-type-annotation + + + + + name + meta.var-single-variable.expr.ts + begin + ([_$[:alpha:]][_$[:alnum:]]*) + beginCaptures + + 1 + + name + meta.definition.variable.ts variable.other.constant.ts + + + end + (?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|(;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b))) + patterns + + + include + #var-single-variable-type-annotation + + + + + + var-single-variable-type-annotation + + patterns + + + include + #type-annotation + + + include + #string + + + include + #comment + + + + destructuring-variable + + patterns + + + name + meta.object-binding-pattern-variable.ts + begin + (?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\{) + end + (?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)) + patterns + + + include + #object-binding-pattern + + + include + #type-annotation + + + include + #comment + + + + + name + meta.array-binding-pattern-variable.ts + begin + (?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\[) + end + (?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)) + patterns + + + include + #array-binding-pattern + + + include + #type-annotation + + + include + #comment + + + + + + destructuring-const + + patterns + + + name + meta.object-binding-pattern-variable.ts + begin + (?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\{) + end + (?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)) + patterns + + + include + #object-binding-pattern-const + + + include + #type-annotation + + + include + #comment + + + + + name + meta.array-binding-pattern-variable.ts + begin + (?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\[) + end + (?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)) + patterns + + + include + #array-binding-pattern-const + + + include + #type-annotation + + + include + #comment + + + + + + object-binding-element + + patterns + + + include + #comment + + + begin + (?x)(?=((\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?: + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3 + (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3 + (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3 + (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3 + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1 + (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1. + (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1 + (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1 +)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:)) + end + (?=,|\}) + patterns + + + include + #object-binding-element-propertyName + + + include + #binding-element + + + + + include + #object-binding-pattern + + + include + #destructuring-variable-rest + + + include + #variable-initializer + + + include + #punctuation-comma + + + + object-binding-element-const + + patterns + + + include + #comment + + + begin + (?x)(?=((\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?: + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3 + (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3 + (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3 + (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3 + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1 + (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1. + (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1 + (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1 +)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:)) + end + (?=,|\}) + patterns + + + include + #object-binding-element-propertyName + + + include + #binding-element-const + + + + + include + #object-binding-pattern-const + + + include + #destructuring-variable-rest-const + + + include + #variable-initializer + + + include + #punctuation-comma + + + + object-binding-element-propertyName + + begin + (?x)(?=((\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?: + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3 + (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3 + (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3 + (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3 + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1 + (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1. + (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1 + (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1 +)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:)) + end + (:) + endCaptures + + 0 + + name + punctuation.destructuring.ts + + + patterns + + + include + #string + + + include + #array-literal + + + include + #numeric-literal + + + name + variable.object.property.ts + match + ([_$[:alpha:]][_$[:alnum:]]*) + + + + binding-element + + patterns + + + include + #comment + + + include + #string + + + include + #numeric-literal + + + include + #regex + + + include + #object-binding-pattern + + + include + #array-binding-pattern + + + include + #destructuring-variable-rest + + + include + #variable-initializer + + + + binding-element-const + + patterns + + + include + #comment + + + include + #string + + + include + #numeric-literal + + + include + #regex + + + include + #object-binding-pattern-const + + + include + #array-binding-pattern-const + + + include + #destructuring-variable-rest-const + + + include + #variable-initializer + + + + destructuring-variable-rest + + match + (?:(\.\.\.)\s*)?([_$[:alpha:]][_$[:alnum:]]*) + captures + + 1 + + name + keyword.operator.rest.ts + + 2 + + name + meta.definition.variable.ts variable.other.readwrite.ts + + + + destructuring-variable-rest-const + + match + (?:(\.\.\.)\s*)?([_$[:alpha:]][_$[:alnum:]]*) + captures + + 1 + + name + keyword.operator.rest.ts + + 2 + + name + meta.definition.variable.ts variable.other.constant.ts + + + + object-binding-pattern + + begin + (?:(\.\.\.)\s*)?(\{) + beginCaptures + + 1 + + name + keyword.operator.rest.ts + + 2 + + name + punctuation.definition.binding-pattern.object.ts + + + end + \} + endCaptures + + 0 + + name + punctuation.definition.binding-pattern.object.ts + + + patterns + + + include + #object-binding-element + + + + object-binding-pattern-const + + begin + (?:(\.\.\.)\s*)?(\{) + beginCaptures + + 1 + + name + keyword.operator.rest.ts + + 2 + + name + punctuation.definition.binding-pattern.object.ts + + + end + \} + endCaptures + + 0 + + name + punctuation.definition.binding-pattern.object.ts + + + patterns + + + include + #object-binding-element-const + + + + array-binding-pattern + + begin + (?:(\.\.\.)\s*)?(\[) + beginCaptures + + 1 + + name + keyword.operator.rest.ts + + 2 + + name + punctuation.definition.binding-pattern.array.ts + + + end + \] + endCaptures + + 0 + + name + punctuation.definition.binding-pattern.array.ts + + + patterns + + + include + #binding-element + + + include + #punctuation-comma + + + + array-binding-pattern-const + + begin + (?:(\.\.\.)\s*)?(\[) + beginCaptures + + 1 + + name + keyword.operator.rest.ts + + 2 + + name + punctuation.definition.binding-pattern.array.ts + + + end + \] + endCaptures + + 0 + + name + punctuation.definition.binding-pattern.array.ts + + + patterns + + + include + #binding-element-const + + + include + #punctuation-comma + + + + parameter-name + + patterns + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(override|public|protected|private|readonly)\s+(?=(override|public|protected|private|readonly)\s+) + captures + + 1 + + name + storage.modifier.ts + + + + + match + (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(override|public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)(?=\s* +# function assignment | +(=\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|((<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) +) | + +# arrow function possible to detect only with => on same line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator +) + )) +)) | +# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) => +(:\s*( + (<) | + ([(]\s*( + ([)]) | + (\.\.\.) | + ([_$[:alnum:]]+\s*( + ([:,?=])| + ([)]\s*=>) + )) + )) +)) | +(:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) | +(:\s*((<\s*$)|((<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) | +(:\s*(=>|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|((<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) +) | + +# arrow function possible to detect only with => on same line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator +) + )) +))) + captures + + 1 + + name + storage.modifier.ts + + 2 + + name + keyword.operator.rest.ts + + 3 + + name + entity.name.function.ts variable.language.this.ts + + 4 + + name + entity.name.function.ts + + 5 + + name + keyword.operator.optional.ts + + + + + match + (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(override|public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??) + captures + + 1 + + name + storage.modifier.ts + + 2 + + name + keyword.operator.rest.ts + + 3 + + name + variable.parameter.ts variable.language.this.ts + + 4 + + name + variable.parameter.ts + + 5 + + name + keyword.operator.optional.ts + + + + + + destructuring-parameter + + patterns + + + name + meta.parameter.object-binding-pattern.ts + begin + (?<!=|:)\s*(?:(\.\.\.)\s*)?(\{) + beginCaptures + + 1 + + name + keyword.operator.rest.ts + + 2 + + name + punctuation.definition.binding-pattern.object.ts + + + end + \} + endCaptures + + 0 + + name + punctuation.definition.binding-pattern.object.ts + + + patterns + + + include + #parameter-object-binding-element + + + + + name + meta.paramter.array-binding-pattern.ts + begin + (?<!=|:)\s*(?:(\.\.\.)\s*)?(\[) + beginCaptures + + 1 + + name + keyword.operator.rest.ts + + 2 + + name + punctuation.definition.binding-pattern.array.ts + + + end + \] + endCaptures + + 0 + + name + punctuation.definition.binding-pattern.array.ts + + + patterns + + + include + #parameter-binding-element + + + include + #punctuation-comma + + + + + + parameter-object-binding-element + + patterns + + + include + #comment + + + begin + (?x)(?=((\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?: + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3 + (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3 + (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3 + (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3 + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1 + (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1. + (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1 + (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1 +)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:)) + end + (?=,|\}) + patterns + + + include + #object-binding-element-propertyName + + + include + #parameter-binding-element + + + include + #paren-expression + + + + + include + #parameter-object-binding-pattern + + + include + #destructuring-parameter-rest + + + include + #variable-initializer + + + include + #punctuation-comma + + + + parameter-binding-element + + patterns + + + include + #comment + + + include + #string + + + include + #numeric-literal + + + include + #regex + + + include + #parameter-object-binding-pattern + + + include + #parameter-array-binding-pattern + + + include + #destructuring-parameter-rest + + + include + #variable-initializer + + + + destructuring-parameter-rest + + match + (?:(\.\.\.)\s*)?([_$[:alpha:]][_$[:alnum:]]*) + captures + + 1 + + name + keyword.operator.rest.ts + + 2 + + name + variable.parameter.ts + + + + parameter-object-binding-pattern + + begin + (?:(\.\.\.)\s*)?(\{) + beginCaptures + + 1 + + name + keyword.operator.rest.ts + + 2 + + name + punctuation.definition.binding-pattern.object.ts + + + end + \} + endCaptures + + 0 + + name + punctuation.definition.binding-pattern.object.ts + + + patterns + + + include + #parameter-object-binding-element + + + + parameter-array-binding-pattern + + begin + (?:(\.\.\.)\s*)?(\[) + beginCaptures + + 1 + + name + keyword.operator.rest.ts + + 2 + + name + punctuation.definition.binding-pattern.array.ts + + + end + \] + endCaptures + + 0 + + name + punctuation.definition.binding-pattern.array.ts + + + patterns + + + include + #parameter-binding-element + + + include + #punctuation-comma + + + + field-declaration + + name + meta.field.declaration.ts + begin + (?x)(?<!\()(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(readonly)\s+)?(?=\s*((\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?: + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3 + (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3 + (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3 + (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3 + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1 + (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1. + (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1 + (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1 +)(?!\$))|(\#?[_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(?:(?:(\?)|(\!))\s*)?(=|:|;|,|\}|$)) + beginCaptures + + 1 + + name + storage.modifier.ts + + + end + (?x)(?=\}|;|,|$|(^(?!\s*((\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?: + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3 + (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3 + (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3 + (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3 + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1 + (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1. + (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1 + (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1 +)(?!\$))|(\#?[_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(?:(?:(\?)|(\!))\s*)?(=|:|;|,|$))))|(?<=\}) + patterns + + + include + #variable-initializer + + + include + #type-annotation + + + include + #string + + + include + #array-literal + + + include + #numeric-literal + + + include + #comment + + + match + (?x)(\#?[_$[:alpha:]][_$[:alnum:]]*)(?:(\?)|(\!))?(?=\s*\s* +# function assignment | +(=\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|((<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) +) | + +# arrow function possible to detect only with => on same line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator +) + )) +)) | +# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) => +(:\s*( + (<) | + ([(]\s*( + ([)]) | + (\.\.\.) | + ([_$[:alnum:]]+\s*( + ([:,?=])| + ([)]\s*=>) + )) + )) +)) | +(:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) | +(:\s*((<\s*$)|((<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) | +(:\s*(=>|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|((<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) +) | + +# arrow function possible to detect only with => on same line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator +) + )) +))) + captures + + 1 + + name + meta.definition.property.ts entity.name.function.ts + + 2 + + name + keyword.operator.optional.ts + + 3 + + name + keyword.operator.definiteassignment.ts + + + + + name + meta.definition.property.ts variable.object.property.ts + match + \#?[_$[:alpha:]][_$[:alnum:]]* + + + name + keyword.operator.optional.ts + match + \? + + + name + keyword.operator.definiteassignment.ts + match + \! + + + + variable-initializer + + patterns + + + begin + (?<!=|!)(=)(?!=)(?=\s*\S)(?!\s*.*=>\s*$) + beginCaptures + + 1 + + name + keyword.operator.assignment.ts + + + end + (?=$|^|[,);}\]]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)) + patterns + + + include + #expression + + + + + begin + (?<!=|!)(=)(?!=) + beginCaptures + + 1 + + name + keyword.operator.assignment.ts + + + end + (?=[,);}\]]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))|(?=^\s*$)|(?<![\|\&\+\-\*\/])(?<=\S)(?<!=)(?=\s*$) + patterns + + + include + #expression + + + + + + function-declaration + + name + meta.function.ts + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?(?:(async)\s+)?(function\b)(?:\s*(\*))?(?:(?:\s+|(?<=\*))([_$[:alpha:]][_$[:alnum:]]*))?\s* + beginCaptures + + 1 + + name + keyword.control.export.ts + + 2 + + name + storage.modifier.ts + + 3 + + name + storage.modifier.async.ts + + 4 + + name + storage.type.function.ts + + 5 + + name + keyword.generator.asterisk.ts + + 6 + + name + meta.definition.function.ts entity.name.function.ts + + + end + (?=;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b))|(?<=\}) + patterns + + + include + #function-name + + + include + #function-body + + + + function-expression + + name + meta.function.expression.ts + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(async)\s+)?(function\b)(?:\s*(\*))?(?:(?:\s+|(?<=\*))([_$[:alpha:]][_$[:alnum:]]*))?\s* + beginCaptures + + 1 + + name + storage.modifier.async.ts + + 2 + + name + storage.type.function.ts + + 3 + + name + keyword.generator.asterisk.ts + + 4 + + name + meta.definition.function.ts entity.name.function.ts + + + end + (?=;)|(?<=\}) + patterns + + + include + #function-name + + + include + #single-line-comment-consuming-line-ending + + + include + #function-body + + + + function-name + + name + meta.definition.function.ts entity.name.function.ts + match + [_$[:alpha:]][_$[:alnum:]]* + + function-body + + patterns + + + include + #comment + + + include + #type-parameters + + + include + #function-parameters + + + include + #return-type + + + include + #type-function-return-type + + + include + #decl-block + + + name + keyword.generator.asterisk.ts + match + \* + + + + method-declaration + + patterns + + + name + meta.method.declaration.ts + begin + (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(override)\s+)?(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?\s*\b(constructor)\b(?!:)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + beginCaptures + + 1 + + name + storage.modifier.ts + + 2 + + name + storage.modifier.ts + + 3 + + name + storage.modifier.ts + + 4 + + name + storage.modifier.async.ts + + 5 + + name + storage.type.ts + + + end + (?=\}|;|,|$)|(?<=\}) + patterns + + + include + #method-declaration-name + + + include + #function-body + + + + + name + meta.method.declaration.ts + begin + (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(override)\s+)?(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?(?:(?:\s*\b(new)\b(?!:)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|(?:(\*)\s*)?)(?=\s*((<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(]) + beginCaptures + + 1 + + name + storage.modifier.ts + + 2 + + name + storage.modifier.ts + + 3 + + name + storage.modifier.ts + + 4 + + name + storage.modifier.async.ts + + 5 + + name + keyword.operator.new.ts + + 6 + + name + keyword.generator.asterisk.ts + + + end + (?=\}|;|,|$)|(?<=\}) + patterns + + + include + #method-declaration-name + + + include + #function-body + + + + + name + meta.method.declaration.ts + begin + (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(override)\s+)?(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?(?:\b(get|set)\s+)?(?:(\*)\s*)?(?=\s*(((\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?: + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3 + (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3 + (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3 + (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3 + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1 + (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1. + (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1 + (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1 +)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*((<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(]) + beginCaptures + + 1 + + name + storage.modifier.ts + + 2 + + name + storage.modifier.ts + + 3 + + name + storage.modifier.ts + + 4 + + name + storage.modifier.async.ts + + 5 + + name + storage.type.property.ts + + 6 + + name + keyword.generator.asterisk.ts + + + end + (?=\}|;|,|$)|(?<=\}) + patterns + + + include + #method-declaration-name + + + include + #function-body + + + + + + object-literal-method-declaration + + name + meta.method.declaration.ts + begin + (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(async)\s+)?(?:\b(get|set)\s+)?(?:(\*)\s*)?(?=\s*(((\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?: + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3 + (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3 + (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3 + (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3 + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1 + (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1. + (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1 + (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1 +)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*((<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(]) + beginCaptures + + 1 + + name + storage.modifier.async.ts + + 2 + + name + storage.type.property.ts + + 3 + + name + keyword.generator.asterisk.ts + + + end + (?=\}|;|,)|(?<=\}) + patterns + + + include + #method-declaration-name + + + include + #function-body + + + begin + (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(async)\s+)?(?:\b(get|set)\s+)?(?:(\*)\s*)?(?=\s*(((\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?: + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3 + (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3 + (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3 + (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3 + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1 + (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1. + (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1 + (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1 +)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*((<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(]) + beginCaptures + + 1 + + name + storage.modifier.async.ts + + 2 + + name + storage.type.property.ts + + 3 + + name + keyword.generator.asterisk.ts + + + end + (?=\(|\<) + patterns + + + include + #method-declaration-name + + + + + + method-declaration-name + + begin + (?x)(?=((\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?: + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3 + (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3 + (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3 + (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3 + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1 + (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1. + (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1 + (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1 +)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??)\s*[\(\<]) + end + (?=\(|\<) + patterns + + + include + #string + + + include + #array-literal + + + include + #numeric-literal + + + name + meta.definition.method.ts entity.name.function.ts + match + [_$[:alpha:]][_$[:alnum:]]* + + + name + keyword.operator.optional.ts + match + \? + + + + arrow-function + + patterns + + + name + meta.arrow.ts + match + (?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(\basync)\s+)?([_$[:alpha:]][_$[:alnum:]]*)\s*(?==>) + captures + + 1 + + name + storage.modifier.async.ts + + 2 + + name + variable.parameter.ts + + + + + name + meta.arrow.ts + begin + (?x) (?: + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(\basync) +)? ((?<![})!\]])\s* + (?= + # sure shot arrow functions even if => is on new line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) +) | + +# arrow function possible to detect only with => on same line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator +) + ) +) + beginCaptures + + 1 + + name + storage.modifier.async.ts + + + end + (?==>|\{|(^\s*(export|function|class|interface|let|var|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|const|import|enum|namespace|module|type|abstract|declare)\s+)) + patterns + + + include + #comment + + + include + #type-parameters + + + include + #function-parameters + + + include + #arrow-return-type + + + include + #possibly-arrow-return-type + + + + + name + meta.arrow.ts + begin + => + beginCaptures + + 0 + + name + storage.type.function.arrow.ts + + + end + ((?<=\}|\S)(?<!=>)|((?!\{)(?=\S)))(?!\/[\/\*]) + patterns + + + include + #single-line-comment-consuming-line-ending + + + include + #decl-block + + + include + #expression + + + + + + indexer-declaration + + name + meta.indexer.declaration.ts + begin + (?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(readonly)\s*)?\s*(\[)\s*([_$[:alpha:]][_$[:alnum:]]*)\s*(?=:) + beginCaptures + + 1 + + name + storage.modifier.ts + + 2 + + name + meta.brace.square.ts + + 3 + + name + variable.parameter.ts + + + end + (\])\s*(\?\s*)?|$ + endCaptures + + 1 + + name + meta.brace.square.ts + + 2 + + name + keyword.operator.optional.ts + + + patterns + + + include + #type-annotation + + + + indexer-mapped-type-declaration + + name + meta.indexer.mappedtype.declaration.ts + begin + (?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))([+-])?(readonly)\s*)?\s*(\[)\s*([_$[:alpha:]][_$[:alnum:]]*)\s+(in)\s+ + beginCaptures + + 1 + + name + keyword.operator.type.modifier.ts + + 2 + + name + storage.modifier.ts + + 3 + + name + meta.brace.square.ts + + 4 + + name + entity.name.type.ts + + 5 + + name + keyword.operator.expression.in.ts + + + end + (\])([+-])?\s*(\?\s*)?|$ + endCaptures + + 1 + + name + meta.brace.square.ts + + 2 + + name + keyword.operator.type.modifier.ts + + 3 + + name + keyword.operator.optional.ts + + + patterns + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+ + captures + + 1 + + name + keyword.control.as.ts + + + + + include + #type + + + + function-parameters + + name + meta.parameters.ts + begin + \( + beginCaptures + + 0 + + name + punctuation.definition.parameters.begin.ts + + + end + \) + endCaptures + + 0 + + name + punctuation.definition.parameters.end.ts + + + patterns + + + include + #function-parameters-body + + + + function-parameters-body + + patterns + + + include + #comment + + + include + #string + + + include + #decorator + + + include + #destructuring-parameter + + + include + #parameter-name + + + include + #parameter-type-annotation + + + include + #variable-initializer + + + name + punctuation.separator.parameter.ts + match + , + + + + class-declaration + + name + meta.class.ts + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(?:(abstract)\s+)?\b(class)\b(?=\s+|/[/*]) + beginCaptures + + 1 + + name + keyword.control.export.ts + + 2 + + name + storage.modifier.ts + + 3 + + name + storage.modifier.ts + + 4 + + name + storage.type.class.ts + + + end + (?<=\}) + patterns + + + include + #class-declaration-or-expression-patterns + + + + class-expression + + name + meta.class.ts + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(abstract)\s+)?(class)\b(?=\s+|[<{]|\/[\/*]) + beginCaptures + + 1 + + name + storage.modifier.ts + + 2 + + name + storage.type.class.ts + + + end + (?<=\}) + patterns + + + include + #class-declaration-or-expression-patterns + + + + class-declaration-or-expression-patterns + + patterns + + + include + #comment + + + include + #class-or-interface-heritage + + + match + [_$[:alpha:]][_$[:alnum:]]* + captures + + 0 + + name + entity.name.type.class.ts + + + + + include + #type-parameters + + + include + #class-or-interface-body + + + + interface-declaration + + name + meta.interface.ts + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(?:(abstract)\s+)?\b(interface)\b(?=\s+|/[/*]) + beginCaptures + + 1 + + name + keyword.control.export.ts + + 2 + + name + storage.modifier.ts + + 3 + + name + storage.modifier.ts + + 4 + + name + storage.type.interface.ts + + + end + (?<=\}) + patterns + + + include + #comment + + + include + #class-or-interface-heritage + + + match + [_$[:alpha:]][_$[:alnum:]]* + captures + + 0 + + name + entity.name.type.interface.ts + + + + + include + #type-parameters + + + include + #class-or-interface-body + + + + class-or-interface-heritage + + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(extends|implements)\b)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + beginCaptures + + 1 + + name + storage.modifier.ts + + + end + (?=\{) + patterns + + + include + #comment + + + include + #class-or-interface-heritage + + + include + #type-parameters + + + include + #expressionWithoutIdentifiers + + + match + ([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))(?=\s*[_$[:alpha:]][_$[:alnum:]]*(\s*\??\.\s*[_$[:alpha:]][_$[:alnum:]]*)*\s*) + captures + + 1 + + name + entity.name.type.module.ts + + 2 + + name + punctuation.accessor.ts + + 3 + + name + punctuation.accessor.optional.ts + + + + + match + ([_$[:alpha:]][_$[:alnum:]]*) + captures + + 1 + + name + entity.other.inherited-class.ts + + + + + include + #expressionPunctuations + + + + class-or-interface-body + + begin + \{ + beginCaptures + + 0 + + name + punctuation.definition.block.ts + + + end + \} + endCaptures + + 0 + + name + punctuation.definition.block.ts + + + patterns + + + include + #comment + + + include + #decorator + + + begin + (?<=:)\s* + end + (?=\s|[;),}\]:\-\+]|;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b)) + patterns + + + include + #expression + + + + + include + #method-declaration + + + include + #indexer-declaration + + + include + #field-declaration + + + include + #string + + + include + #type-annotation + + + include + #variable-initializer + + + include + #access-modifier + + + include + #property-accessor + + + include + #async-modifier + + + include + #after-operator-block-as-object-literal + + + include + #decl-block + + + include + #expression + + + include + #punctuation-comma + + + include + #punctuation-semicolon + + + + access-modifier + + name + storage.modifier.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(abstract|declare|override|public|protected|private|readonly|static)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + property-accessor + + name + storage.type.property.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(accessor|get|set)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + async-modifier + + name + storage.modifier.async.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(async)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + enum-declaration + + name + meta.enum.declaration.ts + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?(?:\b(const)\s+)?\b(enum)\s+([_$[:alpha:]][_$[:alnum:]]*) + beginCaptures + + 1 + + name + keyword.control.export.ts + + 2 + + name + storage.modifier.ts + + 3 + + name + storage.modifier.ts + + 4 + + name + storage.type.enum.ts + + 5 + + name + entity.name.type.enum.ts + + + end + (?<=\}) + patterns + + + include + #comment + + + begin + \{ + beginCaptures + + 0 + + name + punctuation.definition.block.ts + + + end + \} + endCaptures + + 0 + + name + punctuation.definition.block.ts + + + patterns + + + include + #comment + + + begin + ([_$[:alpha:]][_$[:alnum:]]*) + beginCaptures + + 0 + + name + variable.other.enummember.ts + + + end + (?=,|\}|$) + patterns + + + include + #comment + + + include + #variable-initializer + + + + + begin + (?=((\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))) + end + (?=,|\}|$) + patterns + + + include + #string + + + include + #array-literal + + + include + #comment + + + include + #variable-initializer + + + + + include + #punctuation-comma + + + + + + namespace-declaration + + name + meta.namespace.declaration.ts + begin + (?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(namespace|module)\s+(?=[_$[:alpha:]"'`])) + beginCaptures + + 1 + + name + keyword.control.export.ts + + 2 + + name + storage.modifier.ts + + 3 + + name + storage.type.namespace.ts + + + end + (?<=\})|(?=;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b)) + patterns + + + include + #comment + + + include + #string + + + name + entity.name.type.module.ts + match + ([_$[:alpha:]][_$[:alnum:]]*) + + + include + #punctuation-accessor + + + include + #decl-block + + + + type-alias-declaration + + name + meta.type.declaration.ts + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(type)\b\s+([_$[:alpha:]][_$[:alnum:]]*)\s* + beginCaptures + + 1 + + name + keyword.control.export.ts + + 2 + + name + storage.modifier.ts + + 3 + + name + storage.type.type.ts + + 4 + + name + entity.name.type.alias.ts + + + end + (?=\}|;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b)) + patterns + + + include + #comment + + + include + #type-parameters + + + begin + (=)\s*(intrinsic)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + beginCaptures + + 1 + + name + keyword.operator.assignment.ts + + 2 + + name + keyword.control.intrinsic.ts + + + end + (?=\}|;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b)) + patterns + + + include + #type + + + + + begin + (=)\s* + beginCaptures + + 1 + + name + keyword.operator.assignment.ts + + + end + (?=\}|;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b)) + patterns + + + include + #type + + + + + + import-equals-declaration + + patterns + + + name + meta.import-equals.external.ts + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(import)(?:\s+(type))?\s+([_$[:alpha:]][_$[:alnum:]]*)\s*(=)\s*(require)\s*(\() + beginCaptures + + 1 + + name + keyword.control.export.ts + + 2 + + name + storage.modifier.ts + + 3 + + name + keyword.control.import.ts + + 4 + + name + keyword.control.type.ts + + 5 + + name + variable.other.readwrite.alias.ts + + 6 + + name + keyword.operator.assignment.ts + + 7 + + name + keyword.control.require.ts + + 8 + + name + meta.brace.round.ts + + + end + \) + endCaptures + + 0 + + name + meta.brace.round.ts + + + patterns + + + include + #comment + + + include + #string + + + + + name + meta.import-equals.internal.ts + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(import)(?:\s+(type))?\s+([_$[:alpha:]][_$[:alnum:]]*)\s*(=)\s*(?!require\b) + beginCaptures + + 1 + + name + keyword.control.export.ts + + 2 + + name + storage.modifier.ts + + 3 + + name + keyword.control.import.ts + + 4 + + name + keyword.control.type.ts + + 5 + + name + variable.other.readwrite.alias.ts + + 6 + + name + keyword.operator.assignment.ts + + + end + (?=;|$|^) + patterns + + + include + #single-line-comment-consuming-line-ending + + + include + #comment + + + match + ([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]]))) + captures + + 1 + + name + entity.name.type.module.ts + + 2 + + name + punctuation.accessor.ts + + 3 + + name + punctuation.accessor.optional.ts + + + + + name + variable.other.readwrite.ts + match + ([_$[:alpha:]][_$[:alnum:]]*) + + + + + + import-declaration + + name + meta.import.ts + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(import)(?:\s+(type)(?!\s+from))?(?!\s*[:\(])(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + beginCaptures + + 1 + + name + keyword.control.export.ts + + 2 + + name + storage.modifier.ts + + 3 + + name + keyword.control.import.ts + + 4 + + name + keyword.control.type.ts + + + end + (?<!^import|[^\._$[:alnum:]]import)(?=;|$|^) + patterns + + + include + #single-line-comment-consuming-line-ending + + + include + #comment + + + include + #string + + + begin + (?<=^import|[^\._$[:alnum:]]import)(?!\s*["']) + end + \bfrom\b + endCaptures + + 0 + + name + keyword.control.from.ts + + + patterns + + + include + #import-export-declaration + + + + + include + #import-export-declaration + + + + export-declaration + + patterns + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(export)\s+(as)\s+(namespace)\s+([_$[:alpha:]][_$[:alnum:]]*) + captures + + 1 + + name + keyword.control.export.ts + + 2 + + name + keyword.control.as.ts + + 3 + + name + storage.type.namespace.ts + + 4 + + name + entity.name.type.module.ts + + + + + name + meta.export.default.ts + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(export)(?:\s+(type))?(?:(?:\s*(=))|(?:\s+(default)(?=\s+))) + beginCaptures + + 1 + + name + keyword.control.export.ts + + 2 + + name + keyword.control.type.ts + + 3 + + name + keyword.operator.assignment.ts + + 4 + + name + keyword.control.default.ts + + + end + (?=$|;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b)) + patterns + + + include + #interface-declaration + + + include + #expression + + + + + name + meta.export.ts + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(export)(?:\s+(type))?\b(?!(\$)|(\s*:))((?=\s*[\{*])|((?=\s*[_$[:alpha:]][_$[:alnum:]]*(\s|,))(?!\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b))) + beginCaptures + + 1 + + name + keyword.control.export.ts + + 2 + + name + keyword.control.type.ts + + + end + (?=$|;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b)) + patterns + + + include + #import-export-declaration + + + + + + import-export-declaration + + patterns + + + include + #comment + + + include + #string + + + include + #import-export-block + + + name + keyword.control.from.ts + match + \bfrom\b + + + include + #import-export-assert-clause + + + include + #import-export-clause + + + + import-export-assert-clause + + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(with)|(assert))\s*(\{) + beginCaptures + + 1 + + name + keyword.control.with.ts + + 2 + + name + keyword.control.assert.ts + + 3 + + name + punctuation.definition.block.ts + + + end + \} + endCaptures + + 0 + + name + punctuation.definition.block.ts + + + patterns + + + include + #comment + + + include + #string + + + name + meta.object-literal.key.ts + match + (?:[_$[:alpha:]][_$[:alnum:]]*)\s*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*:) + + + name + punctuation.separator.key-value.ts + match + : + + + + import-export-block + + name + meta.block.ts + begin + \{ + beginCaptures + + 0 + + name + punctuation.definition.block.ts + + + end + \} + endCaptures + + 0 + + name + punctuation.definition.block.ts + + + patterns + + + include + #import-export-clause + + + + import-export-clause + + patterns + + + include + #comment + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(?:(\btype)\s+)?(?:(\bdefault)|(\*)|(\b[_$[:alpha:]][_$[:alnum:]]*)|((\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))))\s+(as)\s+(?:(default(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|([_$[:alpha:]][_$[:alnum:]]*)|((\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))) + captures + + 1 + + name + keyword.control.type.ts + + 2 + + name + keyword.control.default.ts + + 3 + + name + constant.language.import-export-all.ts + + 4 + + name + variable.other.readwrite.ts + + 5 + + name + string.quoted.alias.ts + + 12 + + name + keyword.control.as.ts + + 13 + + name + keyword.control.default.ts + + 14 + + name + variable.other.readwrite.alias.ts + + 15 + + name + string.quoted.alias.ts + + + + + include + #punctuation-comma + + + name + constant.language.import-export-all.ts + match + \* + + + name + keyword.control.default.ts + match + \b(default)\b + + + match + (?:(\btype)\s+)?(?:([_$[:alpha:]][_$[:alnum:]]*)|((\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))) + captures + + 1 + + name + keyword.control.type.ts + + 2 + + name + variable.other.readwrite.alias.ts + + 3 + + name + string.quoted.alias.ts + + + + + + switch-statement + + name + switch-statement.expr.ts + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?=\bswitch\s*\() + end + \} + endCaptures + + 0 + + name + punctuation.definition.block.ts + + + patterns + + + include + #comment + + + name + switch-expression.expr.ts + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(switch)\s*(\() + beginCaptures + + 1 + + name + keyword.control.switch.ts + + 2 + + name + meta.brace.round.ts + + + end + \) + endCaptures + + 0 + + name + meta.brace.round.ts + + + patterns + + + include + #expression + + + + + name + switch-block.expr.ts + begin + \{ + beginCaptures + + 0 + + name + punctuation.definition.block.ts + + + end + (?=\}) + patterns + + + name + case-clause.expr.ts + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(case|default(?=:))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + beginCaptures + + 1 + + name + keyword.control.switch.ts + + + end + (?=:) + patterns + + + include + #expression + + + + + begin + (:)\s*(\{) + beginCaptures + + 1 + + name + case-clause.expr.ts punctuation.definition.section.case-statement.ts + + 2 + + name + meta.block.ts punctuation.definition.block.ts + + + end + \} + endCaptures + + 0 + + name + meta.block.ts punctuation.definition.block.ts + + + contentName + meta.block.ts + patterns + + + include + #statements + + + + + match + (:) + captures + + 0 + + name + case-clause.expr.ts punctuation.definition.section.case-statement.ts + + + + + include + #statements + + + + + + for-loop + + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))for(?=((\s+|(\s*\/\*([^\*]|(\*[^\/]))*\*\/\s*))await)?\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)?(\()) + beginCaptures + + 0 + + name + keyword.control.loop.ts + + + end + (?<=\)) + patterns + + + include + #comment + + + name + keyword.control.loop.ts + match + await + + + begin + \( + beginCaptures + + 0 + + name + meta.brace.round.ts + + + end + \) + endCaptures + + 0 + + name + meta.brace.round.ts + + + patterns + + + include + #var-expr + + + include + #expression + + + include + #punctuation-semicolon + + + + + + if-statement + + patterns + + + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?=\bif\s*(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))\s*(?!\{)) + end + (?=;|$|\}) + patterns + + + include + #comment + + + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(if)\s*(\() + beginCaptures + + 1 + + name + keyword.control.conditional.ts + + 2 + + name + meta.brace.round.ts + + + end + \) + endCaptures + + 0 + + name + meta.brace.round.ts + + + patterns + + + include + #expression + + + + + name + string.regexp.ts + begin + (?<=\))\s*\/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)*\])+\/([dgimsuvy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$])) + beginCaptures + + 0 + + name + punctuation.definition.string.begin.ts + + + end + (/)([dgimsuvy]*) + endCaptures + + 1 + + name + punctuation.definition.string.end.ts + + 2 + + name + keyword.other.ts + + + patterns + + + include + #regexp + + + + + include + #statements + + + + + + decl-block + + name + meta.block.ts + begin + \{ + beginCaptures + + 0 + + name + punctuation.definition.block.ts + + + end + \} + endCaptures + + 0 + + name + punctuation.definition.block.ts + + + patterns + + + include + #statements + + + + after-operator-block-as-object-literal + + name + meta.objectliteral.ts + begin + (?<!\+\+|--)(?<=[:=(,\[?+!>]|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^yield|[^\._$[:alnum:]]yield|^throw|[^\._$[:alnum:]]throw|^in|[^\._$[:alnum:]]in|^of|[^\._$[:alnum:]]of|^typeof|[^\._$[:alnum:]]typeof|&&|\|\||\*)\s*(\{) + beginCaptures + + 1 + + name + punctuation.definition.block.ts + + + end + \} + endCaptures + + 0 + + name + punctuation.definition.block.ts + + + patterns + + + include + #object-member + + + + object-literal + + name + meta.objectliteral.ts + begin + \{ + beginCaptures + + 0 + + name + punctuation.definition.block.ts + + + end + \} + endCaptures + + 0 + + name + punctuation.definition.block.ts + + + patterns + + + include + #object-member + + + + object-member + + patterns + + + include + #comment + + + include + #object-literal-method-declaration + + + name + meta.object.member.ts meta.object-literal.key.ts + begin + (?=\[) + end + (?=:)|((?<=[\]])(?=\s*[\(\<])) + patterns + + + include + #comment + + + include + #array-literal + + + + + name + meta.object.member.ts meta.object-literal.key.ts + begin + (?=[\'\"\`]) + end + (?=:)|((?<=[\'\"\`])(?=((\s*[\(\<,}])|(\s+(as|satisifies)\s+)))) + patterns + + + include + #comment + + + include + #string + + + + + name + meta.object.member.ts meta.object-literal.key.ts + begin + (?x)(?=(\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?: + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3 + (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3 + (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3 + (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3 + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1 + (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1. + (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1 + (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1 +)(?!\$))) + end + (?=:)|(?=\s*([\(\<,}])|(\s+as|satisifies\s+)) + patterns + + + include + #comment + + + include + #numeric-literal + + + + + name + meta.method.declaration.ts + begin + (?<=[\]\'\"\`])(?=\s*[\(\<]) + end + (?=\}|;|,)|(?<=\}) + patterns + + + include + #function-body + + + + + name + meta.object.member.ts + match + (?![_$[:alpha:]])([[:digit:]]+)\s*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*:) + captures + + 0 + + name + meta.object-literal.key.ts + + 1 + + name + constant.numeric.decimal.ts + + + + + name + meta.object.member.ts + match + (?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\s*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*:(\s*\/\*([^\*]|(\*[^\/]))*\*\/)*\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|((<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) +) | + +# arrow function possible to detect only with => on same line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator +) + )) +))) + captures + + 0 + + name + meta.object-literal.key.ts + + 1 + + name + entity.name.function.ts + + + + + name + meta.object.member.ts + match + (?:[_$[:alpha:]][_$[:alnum:]]*)\s*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*:) + captures + + 0 + + name + meta.object-literal.key.ts + + + + + name + meta.object.member.ts + begin + \.\.\. + beginCaptures + + 0 + + name + keyword.operator.spread.ts + + + end + (?=,|\}) + patterns + + + include + #expression + + + + + name + meta.object.member.ts + match + ([_$[:alpha:]][_$[:alnum:]]*)\s*(?=,|\}|$|\/\/|\/\*) + captures + + 1 + + name + variable.other.readwrite.ts + + + + + name + meta.object.member.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+(const)(?=\s*([,}]|$)) + captures + + 1 + + name + keyword.control.as.ts + + 2 + + name + storage.modifier.ts + + + + + name + meta.object.member.ts + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(as)|(satisfies))\s+ + beginCaptures + + 1 + + name + keyword.control.as.ts + + 2 + + name + keyword.control.satisfies.ts + + + end + (?=[;),}\]:?\-\+\>]|\|\||\&\&|\!\=\=|$|^|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as|satisifies)\s+)) + patterns + + + include + #type + + + + + name + meta.object.member.ts + begin + (?=[_$[:alpha:]][_$[:alnum:]]*\s*=) + end + (?=,|\}|$|\/\/|\/\*) + patterns + + + include + #expression + + + + + name + meta.object.member.ts + begin + : + beginCaptures + + 0 + + name + meta.object-literal.key.ts punctuation.separator.key-value.ts + + + end + (?=,|\}) + patterns + + + begin + (?<=:)\s*(async)?(?=\s*(<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)\(\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))) + beginCaptures + + 1 + + name + storage.modifier.async.ts + + + end + (?<=\)) + patterns + + + include + #type-parameters + + + begin + \( + beginCaptures + + 0 + + name + meta.brace.round.ts + + + end + \) + endCaptures + + 0 + + name + meta.brace.round.ts + + + patterns + + + include + #expression-inside-possibly-arrow-parens + + + + + + + begin + (?<=:)\s*(async)?\s*(\()(?=\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))) + beginCaptures + + 1 + + name + storage.modifier.async.ts + + 2 + + name + meta.brace.round.ts + + + end + \) + endCaptures + + 0 + + name + meta.brace.round.ts + + + patterns + + + include + #expression-inside-possibly-arrow-parens + + + + + begin + (?<=:)\s*(async)?\s*(?=\<\s*$) + beginCaptures + + 1 + + name + storage.modifier.async.ts + + + end + (?<=\>) + patterns + + + include + #type-parameters + + + + + begin + (?<=\>)\s*(\()(?=\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))) + beginCaptures + + 1 + + name + meta.brace.round.ts + + + end + \) + endCaptures + + 0 + + name + meta.brace.round.ts + + + patterns + + + include + #expression-inside-possibly-arrow-parens + + + + + include + #possibly-arrow-return-type + + + include + #expression + + + + + include + #punctuation-comma + + + include + #decl-block + + + + ternary-expression + + begin + (?!\?\.\s*[^[:digit:]])(\?)(?!\?) + beginCaptures + + 1 + + name + keyword.operator.ternary.ts + + + end + \s*(:) + endCaptures + + 1 + + name + keyword.operator.ternary.ts + + + patterns + + + include + #expression + + + + function-call + + patterns + + + begin + (?=(((([_$[:alpha:]][_$[:alnum:]]*)(\s*\??\.\s*(\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\)]))\s*(?:(\?\.\s*)|(\!))?((<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)?\()) + end + (?<=\))(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\s*\??\.\s*(\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\)]))\s*(?:(\?\.\s*)|(\!))?((<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)?\()) + patterns + + + name + meta.function-call.ts + begin + (?=(([_$[:alpha:]][_$[:alnum:]]*)(\s*\??\.\s*(\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*)) + end + (?=\s*(?:(\?\.\s*)|(\!))?((<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)?\()) + patterns + + + include + #function-call-target + + + + + include + #comment + + + include + #function-call-optionals + + + include + #type-arguments + + + include + #paren-expression + + + + + begin + (?=(((([_$[:alpha:]][_$[:alnum:]]*)(\s*\??\.\s*(\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\)]))(<\s*[\{\[\(]\s*$)) + end + (?<=\>)(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\s*\??\.\s*(\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\)]))(<\s*[\{\[\(]\s*$)) + patterns + + + name + meta.function-call.ts + begin + (?=(([_$[:alpha:]][_$[:alnum:]]*)(\s*\??\.\s*(\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*)) + end + (?=(<\s*[\{\[\(]\s*$)) + patterns + + + include + #function-call-target + + + + + include + #comment + + + include + #function-call-optionals + + + include + #type-arguments + + + + + + function-call-target + + patterns + + + include + #support-function-call-identifiers + + + name + entity.name.function.ts + match + (\#?[_$[:alpha:]][_$[:alnum:]]*) + + + + function-call-optionals + + patterns + + + name + meta.function-call.ts punctuation.accessor.optional.ts + match + \?\. + + + name + meta.function-call.ts keyword.operator.definiteassignment.ts + match + \! + + + + support-function-call-identifiers + + patterns + + + include + #literal + + + include + #support-objects + + + include + #object-identifiers + + + include + #punctuation-accessor + + + name + keyword.operator.expression.import.ts + match + (?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))import(?=\s*[\(]\s*[\"\'\`])) + + + + new-expr + + name + new.expr.ts + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(new)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + beginCaptures + + 1 + + name + keyword.operator.new.ts + + + end + (?<=\))|(?=[;),}\]:?\-\+\>]|\|\||\&\&|\!\=\=|$|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))new(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))function((\s+[_$[:alpha:]][_$[:alnum:]]*)|(\s*[\(])))) + patterns + + + include + #expression + + + + instanceof-expr + + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(instanceof)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + beginCaptures + + 1 + + name + keyword.operator.expression.instanceof.ts + + + end + (?<=\))|(?=[;),}\]:?\-\+\>]|\|\||\&\&|\!\=\=|$|(===|!==|==|!=)|(([\&\~\^\|]\s*)?[_$[:alpha:]][_$[:alnum:]]*\s+instanceof(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))function((\s+[_$[:alpha:]][_$[:alnum:]]*)|(\s*[\(])))) + patterns + + + include + #type + + + + paren-expression-possibly-arrow + + patterns + + + begin + (?<=[(=,])\s*(async)?(?=\s*((<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?\(\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))) + beginCaptures + + 1 + + name + storage.modifier.async.ts + + + end + (?<=\)) + patterns + + + include + #paren-expression-possibly-arrow-with-typeparameters + + + + + begin + (?<=[(=,]|=>|^return|[^\._$[:alnum:]]return)\s*(async)?(?=\s*((((<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?\()|(<)|((<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)))\s*$) + beginCaptures + + 1 + + name + storage.modifier.async.ts + + + end + (?<=\)) + patterns + + + include + #paren-expression-possibly-arrow-with-typeparameters + + + + + include + #possibly-arrow-return-type + + + + paren-expression-possibly-arrow-with-typeparameters + + patterns + + + include + #type-parameters + + + begin + \( + beginCaptures + + 0 + + name + meta.brace.round.ts + + + end + \) + endCaptures + + 0 + + name + meta.brace.round.ts + + + patterns + + + include + #expression-inside-possibly-arrow-parens + + + + + + expression-inside-possibly-arrow-parens + + patterns + + + include + #expressionWithoutIdentifiers + + + include + #comment + + + include + #string + + + include + #decorator + + + include + #destructuring-parameter + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(override|public|protected|private|readonly)\s+(?=(override|public|protected|private|readonly)\s+) + captures + + 1 + + name + storage.modifier.ts + + + + + match + (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(override|public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)(?=\s* +# function assignment | +(=\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|((<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) +) | + +# arrow function possible to detect only with => on same line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator +) + )) +)) | +# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) => +(:\s*( + (<) | + ([(]\s*( + ([)]) | + (\.\.\.) | + ([_$[:alnum:]]+\s*( + ([:,?=])| + ([)]\s*=>) + )) + )) +)) | +(:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) | +(:\s*((<\s*$)|((<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) | +(:\s*(=>|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|((<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) +) | + +# arrow function possible to detect only with => on same line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator +) + )) +))) + captures + + 1 + + name + storage.modifier.ts + + 2 + + name + keyword.operator.rest.ts + + 3 + + name + entity.name.function.ts variable.language.this.ts + + 4 + + name + entity.name.function.ts + + 5 + + name + keyword.operator.optional.ts + + + + + match + (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(override|public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)(?=\s*[:,]|$) + captures + + 1 + + name + storage.modifier.ts + + 2 + + name + keyword.operator.rest.ts + + 3 + + name + variable.parameter.ts variable.language.this.ts + + 4 + + name + variable.parameter.ts + + 5 + + name + keyword.operator.optional.ts + + + + + include + #type-annotation + + + include + #variable-initializer + + + name + punctuation.separator.parameter.ts + match + , + + + include + #identifiers + + + include + #expressionPunctuations + + + + paren-expression + + begin + \( + beginCaptures + + 0 + + name + meta.brace.round.ts + + + end + \) + endCaptures + + 0 + + name + meta.brace.round.ts + + + patterns + + + include + #expression + + + + cast + + patterns + + + name + cast.expr.ts + match + \s*(<)\s*(const)\s*(>) + captures + + 1 + + name + meta.brace.angle.ts + + 2 + + name + storage.modifier.ts + + 3 + + name + meta.brace.angle.ts + + + + + name + cast.expr.ts + begin + (?:(?<!\+\+|--)(?<=^return|[^\._$[:alnum:]]return|^throw|[^\._$[:alnum:]]throw|^yield|[^\._$[:alnum:]]yield|^await|[^\._$[:alnum:]]await|^default|[^\._$[:alnum:]]default|[=(,:>*?\&\|\^]|[^_$[:alnum:]](?:\+\+|\-\-)|[^\+]\+|[^\-]\-))\s*(<)(?!<?\=)(?!\s*$) + beginCaptures + + 1 + + name + meta.brace.angle.ts + + + end + (\>) + endCaptures + + 1 + + name + meta.brace.angle.ts + + + patterns + + + include + #type + + + + + name + cast.expr.ts + begin + (?:(?<=^))\s*(<)(?=[_$[:alpha:]][_$[:alnum:]]*\s*>) + beginCaptures + + 1 + + name + meta.brace.angle.ts + + + end + (\>) + endCaptures + + 1 + + name + meta.brace.angle.ts + + + patterns + + + include + #type + + + + + + expression-operators + + patterns + + + name + keyword.control.flow.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(await)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(yield)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))(?=\s*\/\*([^\*]|(\*[^\/]))*\*\/\s*\*) + beginCaptures + + 1 + + name + keyword.control.flow.ts + + + end + \* + endCaptures + + 0 + + name + keyword.generator.asterisk.ts + + + patterns + + + include + #comment + + + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(yield)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))(?:\s*(\*))? + captures + + 1 + + name + keyword.control.flow.ts + + 2 + + name + keyword.generator.asterisk.ts + + + + + name + keyword.operator.expression.delete.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))delete(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + name + keyword.operator.expression.in.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))in(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))(?!\() + + + name + keyword.operator.expression.of.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))of(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))(?!\() + + + name + keyword.operator.expression.instanceof.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))instanceof(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + name + keyword.operator.new.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))new(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + include + #typeof-operator + + + name + keyword.operator.expression.void.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))void(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+(const)(?=\s*($|[;,:})\]])) + captures + + 1 + + name + keyword.control.as.ts + + 2 + + name + storage.modifier.ts + + + + + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(as)|(satisfies))\s+ + beginCaptures + + 1 + + name + keyword.control.as.ts + + 2 + + name + keyword.control.satisfies.ts + + + end + (?=^|[;),}\]:?\-\+\>]|\|\||\&\&|\!\=\=|$|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as|satisfies)\s+)|(\s+\<)) + patterns + + + include + #type + + + + + name + keyword.operator.spread.ts + match + \.\.\. + + + name + keyword.operator.assignment.compound.ts + match + \*=|(?<!\()/=|%=|\+=|\-= + + + name + keyword.operator.assignment.compound.bitwise.ts + match + \&=|\^=|<<=|>>=|>>>=|\|= + + + name + keyword.operator.bitwise.shift.ts + match + <<|>>>|>> + + + name + keyword.operator.comparison.ts + match + ===|!==|==|!= + + + name + keyword.operator.relational.ts + match + <=|>=|<>|<|> + + + match + (?<=[_$[:alnum:]])(\!)\s*(?:(/=)|(?:(/)(?![/*]))) + captures + + 1 + + name + keyword.operator.logical.ts + + 2 + + name + keyword.operator.assignment.compound.ts + + 3 + + name + keyword.operator.arithmetic.ts + + + + + name + keyword.operator.logical.ts + match + \!|&&|\|\||\?\? + + + name + keyword.operator.bitwise.ts + match + \&|~|\^|\| + + + name + keyword.operator.assignment.ts + match + \= + + + name + keyword.operator.decrement.ts + match + -- + + + name + keyword.operator.increment.ts + match + \+\+ + + + name + keyword.operator.arithmetic.ts + match + %|\*|/|-|\+ + + + begin + (?<=[_$[:alnum:])\]])\s*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\s*)+(?:(/=)|(?:(/)(?![/*])))) + end + (?:(/=)|(?:(/)(?!\*([^\*]|(\*[^\/]))*\*\/))) + endCaptures + + 1 + + name + keyword.operator.assignment.compound.ts + + 2 + + name + keyword.operator.arithmetic.ts + + + patterns + + + include + #comment + + + + + match + (?<=[_$[:alnum:])\]])\s*(?:(/=)|(?:(/)(?![/*]))) + captures + + 1 + + name + keyword.operator.assignment.compound.ts + + 2 + + name + keyword.operator.arithmetic.ts + + + + + + typeof-operator + + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))typeof(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + beginCaptures + + 0 + + name + keyword.operator.expression.typeof.ts + + + end + (?=[,);}\]=>:&|{\?]|(extends\s+)|$|;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b)) + patterns + + + include + #type-arguments + + + include + #expression + + + + literal + + patterns + + + include + #numeric-literal + + + include + #boolean-literal + + + include + #null-literal + + + include + #undefined-literal + + + include + #numericConstant-literal + + + include + #array-literal + + + include + #this-literal + + + include + #super-literal + + + + array-literal + + name + meta.array.literal.ts + begin + \s*(\[) + beginCaptures + + 1 + + name + meta.brace.square.ts + + + end + \] + endCaptures + + 0 + + name + meta.brace.square.ts + + + patterns + + + include + #expression + + + include + #punctuation-comma + + + + numeric-literal + + patterns + + + name + constant.numeric.hex.ts + match + \b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$) + captures + + 1 + + name + storage.type.numeric.bigint.ts + + + + + name + constant.numeric.binary.ts + match + \b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$) + captures + + 1 + + name + storage.type.numeric.bigint.ts + + + + + name + constant.numeric.octal.ts + match + \b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$) + captures + + 1 + + name + storage.type.numeric.bigint.ts + + + + + match + (?x) +(?<!\$)(?: + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3 + (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3 + (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3 + (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3 + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1 + (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1. + (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1 + (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1 +)(?!\$) + captures + + 0 + + name + constant.numeric.decimal.ts + + 1 + + name + meta.delimiter.decimal.period.ts + + 2 + + name + storage.type.numeric.bigint.ts + + 3 + + name + meta.delimiter.decimal.period.ts + + 4 + + name + storage.type.numeric.bigint.ts + + 5 + + name + meta.delimiter.decimal.period.ts + + 6 + + name + storage.type.numeric.bigint.ts + + 7 + + name + storage.type.numeric.bigint.ts + + 8 + + name + meta.delimiter.decimal.period.ts + + 9 + + name + storage.type.numeric.bigint.ts + + 10 + + name + meta.delimiter.decimal.period.ts + + 11 + + name + storage.type.numeric.bigint.ts + + 12 + + name + meta.delimiter.decimal.period.ts + + 13 + + name + storage.type.numeric.bigint.ts + + 14 + + name + storage.type.numeric.bigint.ts + + + + + + boolean-literal + + patterns + + + name + constant.language.boolean.true.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))true(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + name + constant.language.boolean.false.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))false(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + + null-literal + + name + constant.language.null.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))null(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + this-literal + + name + variable.language.this.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))this\b(?!\$) + + super-literal + + name + variable.language.super.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))super\b(?!\$) + + undefined-literal + + name + constant.language.undefined.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))undefined(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + numericConstant-literal + + patterns + + + name + constant.language.nan.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))NaN(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + name + constant.language.infinity.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Infinity(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + + support-objects + + patterns + + + name + variable.language.arguments.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(arguments)\b(?!\$) + + + name + support.class.builtin.ts + match + (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(Array|ArrayBuffer|Atomics|BigInt|BigInt64Array|BigUint64Array|Boolean|DataView|Date|Float32Array + |Float64Array|Function|Generator|GeneratorFunction|Int8Array|Int16Array|Int32Array|Intl|Map|Number|Object|Proxy + |Reflect|RegExp|Set|SharedArrayBuffer|SIMD|String|Symbol|TypedArray + |Uint8Array|Uint16Array|Uint32Array|Uint8ClampedArray|WeakMap|WeakSet)\b(?!\$) + + + name + support.class.error.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))((Eval|Internal|Range|Reference|Syntax|Type|URI)?Error)\b(?!\$) + + + name + support.class.promise.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(Promise)\b(?!\$) + + + name + support.function.ts + match + (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(clear(Interval|Timeout)|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|eval| + isFinite|isNaN|parseFloat|parseInt|require|set(Interval|Timeout)|super|unescape|uneval)(?=\s*\() + + + match + (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(Math)(?:\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(?: + (abs|acos|acosh|asin|asinh|atan|atan2|atanh|cbrt|ceil|clz32|cos|cosh|exp| + expm1|floor|fround|hypot|imul|log|log10|log1p|log2|max|min|pow|random| + round|sign|sin|sinh|sqrt|tan|tanh|trunc) + | + (E|LN10|LN2|LOG10E|LOG2E|PI|SQRT1_2|SQRT2)))?\b(?!\$) + captures + + 1 + + name + support.constant.math.ts + + 2 + + name + punctuation.accessor.ts + + 3 + + name + punctuation.accessor.optional.ts + + 4 + + name + support.function.math.ts + + 5 + + name + support.constant.property.math.ts + + + + + match + (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(console)(?:\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*( + assert|clear|count|debug|dir|error|group|groupCollapsed|groupEnd|info|log + |profile|profileEnd|table|time|timeEnd|timeStamp|trace|warn))?\b(?!\$) + captures + + 1 + + name + support.class.console.ts + + 2 + + name + punctuation.accessor.ts + + 3 + + name + punctuation.accessor.optional.ts + + 4 + + name + support.function.console.ts + + + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(JSON)(?:\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(parse|stringify))?\b(?!\$) + captures + + 1 + + name + support.constant.json.ts + + 2 + + name + punctuation.accessor.ts + + 3 + + name + punctuation.accessor.optional.ts + + 4 + + name + support.function.json.ts + + + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(import)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(meta)\b(?!\$) + captures + + 1 + + name + keyword.control.import.ts + + 2 + + name + punctuation.accessor.ts + + 3 + + name + punctuation.accessor.optional.ts + + 4 + + name + support.variable.property.importmeta.ts + + + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(new)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(target)\b(?!\$) + captures + + 1 + + name + keyword.operator.new.ts + + 2 + + name + punctuation.accessor.ts + + 3 + + name + punctuation.accessor.optional.ts + + 4 + + name + support.variable.property.target.ts + + + + + match + (?x) (?:(\.)|(\?\.(?!\s*[[:digit:]]))) \s* (?: + (?:(constructor|length|prototype|__proto__)\b(?!\$|\s*(<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?\()) + | + (?:(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\b(?!\$))) + captures + + 1 + + name + punctuation.accessor.ts + + 2 + + name + punctuation.accessor.optional.ts + + 3 + + name + support.variable.property.ts + + 4 + + name + support.constant.ts + + + + + match + (?x) (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.)) \b (?: + (document|event|navigator|performance|screen|window) + | + (AnalyserNode|ArrayBufferView|Attr|AudioBuffer|AudioBufferSourceNode|AudioContext|AudioDestinationNode|AudioListener + |AudioNode|AudioParam|BatteryManager|BeforeUnloadEvent|BiquadFilterNode|Blob|BufferSource|ByteString|CSS|CSSConditionRule + |CSSCounterStyleRule|CSSGroupingRule|CSSMatrix|CSSMediaRule|CSSPageRule|CSSPrimitiveValue|CSSRule|CSSRuleList|CSSStyleDeclaration + |CSSStyleRule|CSSStyleSheet|CSSSupportsRule|CSSValue|CSSValueList|CanvasGradient|CanvasImageSource|CanvasPattern + |CanvasRenderingContext2D|ChannelMergerNode|ChannelSplitterNode|CharacterData|ChromeWorker|CloseEvent|Comment|CompositionEvent + |Console|ConvolverNode|Coordinates|Credential|CredentialsContainer|Crypto|CryptoKey|CustomEvent|DOMError|DOMException + |DOMHighResTimeStamp|DOMImplementation|DOMString|DOMStringList|DOMStringMap|DOMTimeStamp|DOMTokenList|DataTransfer + |DataTransferItem|DataTransferItemList|DedicatedWorkerGlobalScope|DelayNode|DeviceProximityEvent|DirectoryEntry + |DirectoryEntrySync|DirectoryReader|DirectoryReaderSync|Document|DocumentFragment|DocumentTouch|DocumentType|DragEvent + |DynamicsCompressorNode|Element|Entry|EntrySync|ErrorEvent|Event|EventListener|EventSource|EventTarget|FederatedCredential + |FetchEvent|File|FileEntry|FileEntrySync|FileException|FileList|FileReader|FileReaderSync|FileSystem|FileSystemSync + |FontFace|FormData|GainNode|Gamepad|GamepadButton|GamepadEvent|Geolocation|GlobalEventHandlers|HTMLAnchorElement + |HTMLAreaElement|HTMLAudioElement|HTMLBRElement|HTMLBaseElement|HTMLBodyElement|HTMLButtonElement|HTMLCanvasElement + |HTMLCollection|HTMLContentElement|HTMLDListElement|HTMLDataElement|HTMLDataListElement|HTMLDialogElement|HTMLDivElement + |HTMLDocument|HTMLElement|HTMLEmbedElement|HTMLFieldSetElement|HTMLFontElement|HTMLFormControlsCollection|HTMLFormElement + |HTMLHRElement|HTMLHeadElement|HTMLHeadingElement|HTMLHtmlElement|HTMLIFrameElement|HTMLImageElement|HTMLInputElement + |HTMLKeygenElement|HTMLLIElement|HTMLLabelElement|HTMLLegendElement|HTMLLinkElement|HTMLMapElement|HTMLMediaElement + |HTMLMetaElement|HTMLMeterElement|HTMLModElement|HTMLOListElement|HTMLObjectElement|HTMLOptGroupElement|HTMLOptionElement + |HTMLOptionsCollection|HTMLOutputElement|HTMLParagraphElement|HTMLParamElement|HTMLPreElement|HTMLProgressElement + |HTMLQuoteElement|HTMLScriptElement|HTMLSelectElement|HTMLShadowElement|HTMLSourceElement|HTMLSpanElement|HTMLStyleElement + |HTMLTableCaptionElement|HTMLTableCellElement|HTMLTableColElement|HTMLTableDataCellElement|HTMLTableElement|HTMLTableHeaderCellElement + |HTMLTableRowElement|HTMLTableSectionElement|HTMLTextAreaElement|HTMLTimeElement|HTMLTitleElement|HTMLTrackElement + |HTMLUListElement|HTMLUnknownElement|HTMLVideoElement|HashChangeEvent|History|IDBCursor|IDBCursorWithValue|IDBDatabase + |IDBEnvironment|IDBFactory|IDBIndex|IDBKeyRange|IDBMutableFile|IDBObjectStore|IDBOpenDBRequest|IDBRequest|IDBTransaction + |IDBVersionChangeEvent|IIRFilterNode|IdentityManager|ImageBitmap|ImageBitmapFactories|ImageData|Index|InputDeviceCapabilities + |InputEvent|InstallEvent|InstallTrigger|KeyboardEvent|LinkStyle|LocalFileSystem|LocalFileSystemSync|Location|MIDIAccess + |MIDIConnectionEvent|MIDIInput|MIDIInputMap|MIDIOutputMap|MediaElementAudioSourceNode|MediaError|MediaKeyMessageEvent + |MediaKeySession|MediaKeyStatusMap|MediaKeySystemAccess|MediaKeySystemConfiguration|MediaKeys|MediaRecorder|MediaStream + |MediaStreamAudioDestinationNode|MediaStreamAudioSourceNode|MessageChannel|MessageEvent|MessagePort|MouseEvent + |MutationObserver|MutationRecord|NamedNodeMap|Navigator|NavigatorConcurrentHardware|NavigatorGeolocation|NavigatorID + |NavigatorLanguage|NavigatorOnLine|Node|NodeFilter|NodeIterator|NodeList|NonDocumentTypeChildNode|Notification + |OfflineAudioCompletionEvent|OfflineAudioContext|OscillatorNode|PageTransitionEvent|PannerNode|ParentNode|PasswordCredential + |Path2D|PaymentAddress|PaymentRequest|PaymentResponse|Performance|PerformanceEntry|PerformanceFrameTiming|PerformanceMark + |PerformanceMeasure|PerformanceNavigation|PerformanceNavigationTiming|PerformanceObserver|PerformanceObserverEntryList + |PerformanceResourceTiming|PerformanceTiming|PeriodicSyncEvent|PeriodicWave|Plugin|Point|PointerEvent|PopStateEvent + |PortCollection|Position|PositionError|PositionOptions|PresentationConnectionClosedEvent|PresentationConnectionList + |PresentationReceiver|ProcessingInstruction|ProgressEvent|PromiseRejectionEvent|PushEvent|PushRegistrationManager + |RTCCertificate|RTCConfiguration|RTCPeerConnection|RTCSessionDescriptionCallback|RTCStatsReport|RadioNodeList|RandomSource + |Range|ReadableByteStream|RenderingContext|SVGAElement|SVGAngle|SVGAnimateColorElement|SVGAnimateElement|SVGAnimateMotionElement + |SVGAnimateTransformElement|SVGAnimatedAngle|SVGAnimatedBoolean|SVGAnimatedEnumeration|SVGAnimatedInteger|SVGAnimatedLength + |SVGAnimatedLengthList|SVGAnimatedNumber|SVGAnimatedNumberList|SVGAnimatedPoints|SVGAnimatedPreserveAspectRatio + |SVGAnimatedRect|SVGAnimatedString|SVGAnimatedTransformList|SVGAnimationElement|SVGCircleElement|SVGClipPathElement + |SVGCursorElement|SVGDefsElement|SVGDescElement|SVGElement|SVGEllipseElement|SVGEvent|SVGFilterElement|SVGFontElement + |SVGFontFaceElement|SVGFontFaceFormatElement|SVGFontFaceNameElement|SVGFontFaceSrcElement|SVGFontFaceUriElement + |SVGForeignObjectElement|SVGGElement|SVGGlyphElement|SVGGradientElement|SVGHKernElement|SVGImageElement|SVGLength + |SVGLengthList|SVGLineElement|SVGLinearGradientElement|SVGMPathElement|SVGMaskElement|SVGMatrix|SVGMissingGlyphElement + |SVGNumber|SVGNumberList|SVGPathElement|SVGPatternElement|SVGPoint|SVGPolygonElement|SVGPolylineElement|SVGPreserveAspectRatio + |SVGRadialGradientElement|SVGRect|SVGRectElement|SVGSVGElement|SVGScriptElement|SVGSetElement|SVGStopElement|SVGStringList + |SVGStylable|SVGStyleElement|SVGSwitchElement|SVGSymbolElement|SVGTRefElement|SVGTSpanElement|SVGTests|SVGTextElement + |SVGTextPositioningElement|SVGTitleElement|SVGTransform|SVGTransformList|SVGTransformable|SVGUseElement|SVGVKernElement + |SVGViewElement|ServiceWorker|ServiceWorkerContainer|ServiceWorkerGlobalScope|ServiceWorkerRegistration|ServiceWorkerState + |ShadowRoot|SharedWorker|SharedWorkerGlobalScope|SourceBufferList|StereoPannerNode|Storage|StorageEvent|StyleSheet + |StyleSheetList|SubtleCrypto|SyncEvent|Text|TextMetrics|TimeEvent|TimeRanges|Touch|TouchEvent|TouchList|Transferable + |TreeWalker|UIEvent|USVString|VRDisplayCapabilities|ValidityState|WaveShaperNode|WebGL|WebGLActiveInfo|WebGLBuffer + |WebGLContextEvent|WebGLFramebuffer|WebGLProgram|WebGLRenderbuffer|WebGLRenderingContext|WebGLShader|WebGLShaderPrecisionFormat + |WebGLTexture|WebGLTimerQueryEXT|WebGLTransformFeedback|WebGLUniformLocation|WebGLVertexArrayObject|WebGLVertexArrayObjectOES + |WebSocket|WebSockets|WebVTT|WheelEvent|Window|WindowBase64|WindowEventHandlers|WindowTimers|Worker|WorkerGlobalScope + |WorkerLocation|WorkerNavigator|XMLHttpRequest|XMLHttpRequestEventTarget|XMLSerializer|XPathExpression|XPathResult + |XSLTProcessor))\b(?!\$) + captures + + 1 + + name + support.variable.dom.ts + + 2 + + name + support.class.dom.ts + + + + + match + (?x) (?:(\.)|(\?\.(?!\s*[[:digit:]]))) \s* (?: + (ATTRIBUTE_NODE|CDATA_SECTION_NODE|COMMENT_NODE|DOCUMENT_FRAGMENT_NODE|DOCUMENT_NODE|DOCUMENT_TYPE_NODE + |DOMSTRING_SIZE_ERR|ELEMENT_NODE|ENTITY_NODE|ENTITY_REFERENCE_NODE|HIERARCHY_REQUEST_ERR|INDEX_SIZE_ERR + |INUSE_ATTRIBUTE_ERR|INVALID_CHARACTER_ERR|NO_DATA_ALLOWED_ERR|NO_MODIFICATION_ALLOWED_ERR|NOT_FOUND_ERR + |NOT_SUPPORTED_ERR|NOTATION_NODE|PROCESSING_INSTRUCTION_NODE|TEXT_NODE|WRONG_DOCUMENT_ERR) + | + (_content|[xyz]|abbr|above|accept|acceptCharset|accessKey|action|align|[av]Link(?:color)?|all|alt|anchors|appCodeName + |appCore|applets|appMinorVersion|appName|appVersion|archive|areas|arguments|attributes|availHeight|availLeft|availTop + |availWidth|axis|background|backgroundColor|backgroundImage|below|bgColor|body|border|borderBottomWidth|borderColor + |borderLeftWidth|borderRightWidth|borderStyle|borderTopWidth|borderWidth|bottom|bufferDepth|callee|caller|caption + |cellPadding|cells|cellSpacing|ch|characterSet|charset|checked|childNodes|chOff|cite|classes|className|clear + |clientInformation|clip|clipBoardData|closed|code|codeBase|codeType|color|colorDepth|cols|colSpan|compact|complete + |components|content|controllers|cookie|cookieEnabled|cords|cpuClass|crypto|current|data|dateTime|declare|defaultCharset + |defaultChecked|defaultSelected|defaultStatus|defaultValue|defaultView|defer|description|dialogArguments|dialogHeight + |dialogLeft|dialogTop|dialogWidth|dir|directories|disabled|display|docmain|doctype|documentElement|elements|embeds + |enabledPlugin|encoding|enctype|entities|event|expando|external|face|fgColor|filename|firstChild|fontFamily|fontSize + |fontWeight|form|formName|forms|frame|frameBorder|frameElement|frames|hasFocus|hash|headers|height|history|host + |hostname|href|hreflang|hspace|htmlFor|httpEquiv|id|ids|ignoreCase|images|implementation|index|innerHeight|innerWidth + |input|isMap|label|lang|language|lastChild|lastIndex|lastMatch|lastModified|lastParen|layer[sXY]|left|leftContext + |lineHeight|link|linkColor|links|listStyleType|localName|location|locationbar|longDesc|lowsrc|lowSrc|marginBottom + |marginHeight|marginLeft|marginRight|marginTop|marginWidth|maxLength|media|menubar|method|mimeTypes|multiline|multiple + |name|nameProp|namespaces|namespaceURI|next|nextSibling|nodeName|nodeType|nodeValue|noHref|noResize|noShade|notationName + |notations|noWrap|object|offscreenBuffering|onLine|onreadystatechange|opener|opsProfile|options|oscpu|outerHeight + |outerWidth|ownerDocument|paddingBottom|paddingLeft|paddingRight|paddingTop|page[XY]|page[XY]Offset|parent|parentLayer + |parentNode|parentWindow|pathname|personalbar|pixelDepth|pkcs11|platform|plugins|port|prefix|previous|previousDibling + |product|productSub|profile|profileend|prompt|prompter|protocol|publicId|readOnly|readyState|referrer|rel|responseText + |responseXML|rev|right|rightContext|rowIndex|rows|rowSpan|rules|scheme|scope|screen[XY]|screenLeft|screenTop|scripts + |scrollbars|scrolling|sectionRowIndex|security|securityPolicy|selected|selectedIndex|selection|self|shape|siblingAbove + |siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary + |systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead + |title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile + |vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\b(?!\$|\s*(<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?\() + captures + + 1 + + name + punctuation.accessor.ts + + 2 + + name + punctuation.accessor.optional.ts + + 3 + + name + support.constant.dom.ts + + 4 + + name + support.variable.property.dom.ts + + + + + name + support.class.node.ts + match + (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(Buffer|EventEmitter|Server|Pipe|Socket|REPLServer|ReadStream|WriteStream|Stream + |Inflate|Deflate|InflateRaw|DeflateRaw|GZip|GUnzip|Unzip|Zip)\b(?!\$) + + + match + (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(process)(?:(?:(\.)|(\?\.(?!\s*[[:digit:]])))(?: + (arch|argv|config|connected|env|execArgv|execPath|exitCode|mainModule|pid|platform|release|stderr|stdin|stdout|title|version|versions) + | + (abort|chdir|cwd|disconnect|exit|[sg]ete?[gu]id|send|[sg]etgroups|initgroups|kill|memoryUsage|nextTick|umask|uptime|hrtime) +))?\b(?!\$) + captures + + 1 + + name + support.variable.object.process.ts + + 2 + + name + punctuation.accessor.ts + + 3 + + name + punctuation.accessor.optional.ts + + 4 + + name + support.variable.property.process.ts + + 5 + + name + support.function.process.ts + + + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(exports)|(module)(?:(?:(\.)|(\?\.(?!\s*[[:digit:]])))(exports|id|filename|loaded|parent|children))?)\b(?!\$) + captures + + 1 + + name + support.type.object.module.ts + + 2 + + name + support.type.object.module.ts + + 3 + + name + punctuation.accessor.ts + + 4 + + name + punctuation.accessor.optional.ts + + 5 + + name + support.type.object.module.ts + + + + + name + support.variable.object.node.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(global|GLOBAL|root|__dirname|__filename)\b(?!\$) + + + match + (?x) (?:(\.)|(\?\.(?!\s*[[:digit:]]))) \s* +(?: + (on(?:Rowsinserted|Rowsdelete|Rowenter|Rowexit|Resize|Resizestart|Resizeend|Reset| + Readystatechange|Mouseout|Mouseover|Mousedown|Mouseup|Mousemove| + Before(?:cut|deactivate|unload|update|paste|print|editfocus|activate)| + Blur|Scrolltop|Submit|Select|Selectstart|Selectionchange|Hover|Help| + Change|Contextmenu|Controlselect|Cut|Cellchange|Clock|Close|Deactivate| + Datasetchanged|Datasetcomplete|Dataavailable|Drop|Drag|Dragstart|Dragover| + Dragdrop|Dragenter|Dragend|Dragleave|Dblclick|Unload|Paste|Propertychange|Error| + Errorupdate|Keydown|Keyup|Keypress|Focus|Load|Activate|Afterupdate|Afterprint|Abort) + ) | + (shift|showModelessDialog|showModalDialog|showHelp|scroll|scrollX|scrollByPages| + scrollByLines|scrollY|scrollTo|stop|strike|sizeToContent|sidebar|signText|sort| + sup|sub|substr|substring|splice|split|send|set(?:Milliseconds|Seconds|Minutes|Hours| + Month|Year|FullYear|Date|UTC(?:Milliseconds|Seconds|Minutes|Hours|Month|FullYear|Date)| + Time|Hotkeys|Cursor|ZOptions|Active|Resizable|RequestHeader)|search|slice| + savePreferences|small|home|handleEvent|navigate|char|charCodeAt|charAt|concat| + contextual|confirm|compile|clear|captureEvents|call|createStyleSheet|createPopup| + createEventObject|to(?:GMTString|UTCString|String|Source|UpperCase|LowerCase|LocaleString)| + test|taint|taintEnabled|indexOf|italics|disableExternalCapture|dump|detachEvent|unshift| + untaint|unwatch|updateCommands|join|javaEnabled|pop|push|plugins.refresh|paddings|parse| + print|prompt|preference|enableExternalCapture|exec|execScript|valueOf|UTC|find|file| + fileModifiedDate|fileSize|fileCreatedDate|fileUpdatedDate|fixed|fontsize|fontcolor| + forward|fromCharCode|watch|link|load|lastIndexOf|anchor|attachEvent|atob|apply|alert| + abort|routeEvents|resize|resizeBy|resizeTo|recalc|returnValue|replace|reverse|reload| + releaseCapture|releaseEvents|go|get(?:Milliseconds|Seconds|Minutes|Hours|Month|Day|Year|FullYear| + Time|Date|TimezoneOffset|UTC(?:Milliseconds|Seconds|Minutes|Hours|Day|Month|FullYear|Date)| + Attention|Selection|ResponseHeader|AllResponseHeaders)|moveBy|moveBelow|moveTo| + moveToAbsolute|moveAbove|mergeAttributes|match|margins|btoa|big|bold|borderWidths|blink|back + ) | + (acceptNode|add|addEventListener|addTextTrack|adoptNode|after|animate|append| + appendChild|appendData|before|blur|canPlayType|captureStream| + caretPositionFromPoint|caretRangeFromPoint|checkValidity|clear|click| + cloneContents|cloneNode|cloneRange|close|closest|collapse| + compareBoundaryPoints|compareDocumentPosition|comparePoint|contains| + convertPointFromNode|convertQuadFromNode|convertRectFromNode|createAttribute| + createAttributeNS|createCaption|createCDATASection|createComment| + createContextualFragment|createDocument|createDocumentFragment| + createDocumentType|createElement|createElementNS|createEntityReference| + createEvent|createExpression|createHTMLDocument|createNodeIterator| + createNSResolver|createProcessingInstruction|createRange|createShadowRoot| + createTBody|createTextNode|createTFoot|createTHead|createTreeWalker|delete| + deleteCaption|deleteCell|deleteContents|deleteData|deleteRow|deleteTFoot| + deleteTHead|detach|disconnect|dispatchEvent|elementFromPoint|elementsFromPoint| + enableStyleSheetsForSet|entries|evaluate|execCommand|exitFullscreen| + exitPointerLock|expand|extractContents|fastSeek|firstChild|focus|forEach|get| + getAll|getAnimations|getAttribute|getAttributeNames|getAttributeNode| + getAttributeNodeNS|getAttributeNS|getBoundingClientRect|getBoxQuads| + getClientRects|getContext|getDestinationInsertionPoints|getElementById| + getElementsByClassName|getElementsByName|getElementsByTagName| + getElementsByTagNameNS|getItem|getNamedItem|getSelection|getStartDate| + getVideoPlaybackQuality|has|hasAttribute|hasAttributeNS|hasAttributes| + hasChildNodes|hasFeature|hasFocus|importNode|initEvent|insertAdjacentElement| + insertAdjacentHTML|insertAdjacentText|insertBefore|insertCell|insertData| + insertNode|insertRow|intersectsNode|isDefaultNamespace|isEqualNode| + isPointInRange|isSameNode|item|key|keys|lastChild|load|lookupNamespaceURI| + lookupPrefix|matches|move|moveAttribute|moveAttributeNode|moveChild| + moveNamedItem|namedItem|nextNode|nextSibling|normalize|observe|open| + parentNode|pause|play|postMessage|prepend|preventDefault|previousNode| + previousSibling|probablySupportsContext|queryCommandEnabled| + queryCommandIndeterm|queryCommandState|queryCommandSupported|queryCommandValue| + querySelector|querySelectorAll|registerContentHandler|registerElement| + registerProtocolHandler|releaseCapture|releaseEvents|remove|removeAttribute| + removeAttributeNode|removeAttributeNS|removeChild|removeEventListener| + removeItem|replace|replaceChild|replaceData|replaceWith|reportValidity| + requestFullscreen|requestPointerLock|reset|scroll|scrollBy|scrollIntoView| + scrollTo|seekToNextFrame|select|selectNode|selectNodeContents|set|setAttribute| + setAttributeNode|setAttributeNodeNS|setAttributeNS|setCapture| + setCustomValidity|setEnd|setEndAfter|setEndBefore|setItem|setNamedItem| + setRangeText|setSelectionRange|setSinkId|setStart|setStartAfter|setStartBefore| + slice|splitText|stepDown|stepUp|stopImmediatePropagation|stopPropagation| + submit|substringData|supports|surroundContents|takeRecords|terminate|toBlob| + toDataURL|toggle|toString|values|write|writeln + ) | + (all|catch|finally|race|reject|resolve|then + ) +)(?=\s*\() + captures + + 1 + + name + punctuation.accessor.ts + + 2 + + name + punctuation.accessor.optional.ts + + 3 + + name + support.function.event-handler.ts + + 4 + + name + support.function.ts + + 5 + + name + support.function.dom.ts + + 6 + + name + support.function.promise.ts + + + + + + identifiers + + patterns + + + include + #object-identifiers + + + match + (?x)(?:(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\s*=\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|((<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) +) | + +# arrow function possible to detect only with => on same line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator +) + )) +)) + captures + + 1 + + name + punctuation.accessor.ts + + 2 + + name + punctuation.accessor.optional.ts + + 3 + + name + entity.name.function.ts + + + + + match + (?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(\#?[[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]]) + captures + + 1 + + name + punctuation.accessor.ts + + 2 + + name + punctuation.accessor.optional.ts + + 3 + + name + variable.other.constant.property.ts + + + + + match + (?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(\#?[_$[:alpha:]][_$[:alnum:]]*) + captures + + 1 + + name + punctuation.accessor.ts + + 2 + + name + punctuation.accessor.optional.ts + + 3 + + name + variable.other.property.ts + + + + + name + variable.other.constant.ts + match + ([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]]) + + + name + variable.other.readwrite.ts + match + [_$[:alpha:]][_$[:alnum:]]* + + + + object-identifiers + + patterns + + + name + support.class.ts + match + ([_$[:alpha:]][_$[:alnum:]]*)(?=\s*\??\.\s*prototype\b(?!\$)) + + + match + (?x)(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(?: + (\#?[[:upper:]][_$[:digit:][:upper:]]*) | + (\#?[_$[:alpha:]][_$[:alnum:]]*) +)(?=\s*\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*) + captures + + 1 + + name + punctuation.accessor.ts + + 2 + + name + punctuation.accessor.optional.ts + + 3 + + name + variable.other.constant.object.property.ts + + 4 + + name + variable.other.object.property.ts + + + + + match + (?x)(?: + ([[:upper:]][_$[:digit:][:upper:]]*) | + ([_$[:alpha:]][_$[:alnum:]]*) +)(?=\s*\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*) + captures + + 1 + + name + variable.other.constant.object.ts + + 2 + + name + variable.other.object.ts + + + + + + type-annotation + + patterns + + + name + meta.type.annotation.ts + begin + (:)(?=\s*\S) + beginCaptures + + 1 + + name + keyword.operator.type.annotation.ts + + + end + (?<![:|&])(?!\s*[|&]\s+)((?=^|[,);\}\]]|//)|(?==[^>])|((?<=[\}>\]\)]|[_$[:alpha:]])\s*(?=\{))) + patterns + + + include + #type + + + + + name + meta.type.annotation.ts + begin + (:) + beginCaptures + + 1 + + name + keyword.operator.type.annotation.ts + + + end + (?<![:|&])((?=[,);\}\]]|\/\/)|(?==[^>])|(?=^\s*$)|((?<=[\}>\]\)]|[_$[:alpha:]])\s*(?=\{))) + patterns + + + include + #type + + + + + + parameter-type-annotation + + patterns + + + name + meta.type.annotation.ts + begin + (:) + beginCaptures + + 1 + + name + keyword.operator.type.annotation.ts + + + end + (?=[,)])|(?==[^>]) + patterns + + + include + #type + + + + + + return-type + + patterns + + + name + meta.return.type.ts + begin + (?<=\))\s*(:)(?=\s*\S) + beginCaptures + + 1 + + name + keyword.operator.type.annotation.ts + + + end + (?<![:|&])(?=$|^|[{};,]|//) + patterns + + + include + #return-type-core + + + + + name + meta.return.type.ts + begin + (?<=\))\s*(:) + beginCaptures + + 1 + + name + keyword.operator.type.annotation.ts + + + end + (?<![:|&])((?=[{};,]|//|^\s*$)|((?<=\S)(?=\s*$))) + patterns + + + include + #return-type-core + + + + + + return-type-core + + patterns + + + include + #comment + + + begin + (?<=[:|&])(?=\s*\{) + end + (?<=\}) + patterns + + + include + #type-object + + + + + include + #type-predicate-operator + + + include + #type + + + + arrow-return-type + + name + meta.return.type.arrow.ts + begin + (?<=\))\s*(:) + beginCaptures + + 1 + + name + keyword.operator.type.annotation.ts + + + end + (?==>|\{|(^\s*(export|function|class|interface|let|var|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|const|import|enum|namespace|module|type|abstract|declare)\s+)) + patterns + + + include + #arrow-return-type-body + + + + possibly-arrow-return-type + + begin + (?<=\)|^)\s*(:)(?=\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*=>) + beginCaptures + + 1 + + name + meta.arrow.ts meta.return.type.arrow.ts keyword.operator.type.annotation.ts + + + end + (?==>|\{|(^\s*(export|function|class|interface|let|var|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|const|import|enum|namespace|module|type|abstract|declare)\s+)) + contentName + meta.arrow.ts meta.return.type.arrow.ts + patterns + + + include + #arrow-return-type-body + + + + arrow-return-type-body + + patterns + + + begin + (?<=[:])(?=\s*\{) + end + (?<=\}) + patterns + + + include + #type-object + + + + + include + #type-predicate-operator + + + include + #type + + + + type-parameters + + name + meta.type.parameters.ts + begin + (<) + beginCaptures + + 1 + + name + punctuation.definition.typeparameters.begin.ts + + + end + (>) + endCaptures + + 1 + + name + punctuation.definition.typeparameters.end.ts + + + patterns + + + include + #comment + + + name + storage.modifier.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(extends|in|out|const)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + include + #type + + + include + #punctuation-comma + + + name + keyword.operator.assignment.ts + match + (=)(?!>) + + + + type-arguments + + name + meta.type.parameters.ts + begin + \< + beginCaptures + + 0 + + name + punctuation.definition.typeparameters.begin.ts + + + end + \> + endCaptures + + 0 + + name + punctuation.definition.typeparameters.end.ts + + + patterns + + + include + #type-arguments-body + + + + type-arguments-body + + patterns + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(_)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + captures + + 0 + + name + keyword.operator.type.ts + + + + + include + #type + + + include + #punctuation-comma + + + + type + + patterns + + + include + #comment + + + include + #type-string + + + include + #numeric-literal + + + include + #type-primitive + + + include + #type-builtin-literals + + + include + #type-parameters + + + include + #type-tuple + + + include + #type-object + + + include + #type-operators + + + include + #type-conditional + + + include + #type-fn-type-parameters + + + include + #type-paren-or-function-parameters + + + include + #type-function-return-type + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(readonly)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s* + captures + + 1 + + name + storage.modifier.ts + + + + + include + #type-name + + + + type-primitive + + name + support.type.primitive.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(string|number|bigint|boolean|symbol|any|void|never|unknown)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + type-builtin-literals + + name + support.type.builtin.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(this|true|false|undefined|null|object)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + type-tuple + + name + meta.type.tuple.ts + begin + \[ + beginCaptures + + 0 + + name + meta.brace.square.ts + + + end + \] + endCaptures + + 0 + + name + meta.brace.square.ts + + + patterns + + + name + keyword.operator.rest.ts + match + \.\.\. + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))([_$[:alpha:]][_$[:alnum:]]*)\s*(\?)?\s*(:) + captures + + 1 + + name + entity.name.label.ts + + 2 + + name + keyword.operator.optional.ts + + 3 + + name + punctuation.separator.label.ts + + + + + include + #type + + + include + #punctuation-comma + + + + type-object + + name + meta.object.type.ts + begin + \{ + beginCaptures + + 0 + + name + punctuation.definition.block.ts + + + end + \} + endCaptures + + 0 + + name + punctuation.definition.block.ts + + + patterns + + + include + #comment + + + include + #method-declaration + + + include + #indexer-declaration + + + include + #indexer-mapped-type-declaration + + + include + #field-declaration + + + include + #type-annotation + + + begin + \.\.\. + beginCaptures + + 0 + + name + keyword.operator.spread.ts + + + end + (?=\}|;|,|$)|(?<=\}) + patterns + + + include + #type + + + + + include + #punctuation-comma + + + include + #punctuation-semicolon + + + include + #type + + + + type-conditional + + patterns + + + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(extends)\s+ + beginCaptures + + 1 + + name + storage.modifier.ts + + + end + (?<=:) + patterns + + + begin + \? + beginCaptures + + 0 + + name + keyword.operator.ternary.ts + + + end + : + endCaptures + + 0 + + name + keyword.operator.ternary.ts + + + patterns + + + include + #type + + + + + include + #type + + + + + + type-paren-or-function-parameters + + name + meta.type.paren.cover.ts + begin + \( + beginCaptures + + 0 + + name + meta.brace.round.ts + + + end + \) + endCaptures + + 0 + + name + meta.brace.round.ts + + + patterns + + + match + (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\s*(\??)(?=\s*(:\s*( + (<) | + ([(]\s*( + ([)]) | + (\.\.\.) | + ([_$[:alnum:]]+\s*( + ([:,?=])| + ([)]\s*=>) + )) + )) +)) | +(:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) | +(:\s*((<\s*$)|((<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))))) + captures + + 1 + + name + storage.modifier.ts + + 2 + + name + keyword.operator.rest.ts + + 3 + + name + entity.name.function.ts variable.language.this.ts + + 4 + + name + entity.name.function.ts + + 5 + + name + keyword.operator.optional.ts + + + + + match + (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\s*(\??)(?=:) + captures + + 1 + + name + storage.modifier.ts + + 2 + + name + keyword.operator.rest.ts + + 3 + + name + variable.parameter.ts variable.language.this.ts + + 4 + + name + variable.parameter.ts + + 5 + + name + keyword.operator.optional.ts + + + + + include + #type-annotation + + + name + punctuation.separator.parameter.ts + match + , + + + include + #type + + + + type-fn-type-parameters + + patterns + + + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(abstract)\s+)?(new)\b(?=\s*\<) + beginCaptures + + 1 + + name + meta.type.constructor.ts storage.modifier.ts + + 2 + + name + meta.type.constructor.ts keyword.control.new.ts + + + end + (?<=>) + patterns + + + include + #comment + + + include + #type-parameters + + + + + name + meta.type.constructor.ts + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(abstract)\s+)?(new)\b\s*(?=\() + beginCaptures + + 1 + + name + storage.modifier.ts + + 2 + + name + keyword.control.new.ts + + + end + (?<=\)) + patterns + + + include + #function-parameters + + + + + name + meta.type.function.ts + begin + (?x)( + (?= + [(]\s*( + ([)]) | + (\.\.\.) | + ([_$[:alnum:]]+\s*( + ([:,?=])| + ([)]\s*=>) + )) + ) + ) +) + end + (?<=\)) + patterns + + + include + #function-parameters + + + + + + type-function-return-type + + patterns + + + name + meta.type.function.return.ts + begin + (=>)(?=\s*\S) + beginCaptures + + 1 + + name + storage.type.function.arrow.ts + + + end + (?<!=>)(?<![|&])(?=[,\]\)\{\}=;>:\?]|//|$) + patterns + + + include + #type-function-return-type-core + + + + + name + meta.type.function.return.ts + begin + => + beginCaptures + + 0 + + name + storage.type.function.arrow.ts + + + end + (?<!=>)(?<![|&])((?=[,\]\)\{\}=;:\?>]|//|^\s*$)|((?<=\S)(?=\s*$))) + patterns + + + include + #type-function-return-type-core + + + + + + type-function-return-type-core + + patterns + + + include + #comment + + + begin + (?<==>)(?=\s*\{) + end + (?<=\}) + patterns + + + include + #type-object + + + + + include + #type-predicate-operator + + + include + #type + + + + type-operators + + patterns + + + include + #typeof-operator + + + include + #type-infer + + + begin + ([&|])(?=\s*\{) + beginCaptures + + 0 + + name + keyword.operator.type.ts + + + end + (?<=\}) + patterns + + + include + #type-object + + + + + begin + [&|] + beginCaptures + + 0 + + name + keyword.operator.type.ts + + + end + (?=\S) + + + name + keyword.operator.expression.keyof.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))keyof(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + name + keyword.operator.ternary.ts + match + (\?|\:) + + + name + keyword.operator.expression.import.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))import(?=\s*\() + + + + type-infer + + patterns + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(infer)\s+([_$[:alpha:]][_$[:alnum:]]*)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))(?:\s+(extends)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))? + name + meta.type.infer.ts + captures + + 1 + + name + keyword.operator.expression.infer.ts + + 2 + + name + entity.name.type.ts + + 3 + + name + keyword.operator.expression.extends.ts + + + + + + type-predicate-operator + + patterns + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(asserts)\s+)?(?!asserts)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\s(is)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + captures + + 1 + + name + keyword.operator.type.asserts.ts + + 2 + + name + variable.parameter.ts variable.language.this.ts + + 3 + + name + variable.parameter.ts + + 4 + + name + keyword.operator.expression.is.ts + + + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(asserts)\s+(?!is)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + captures + + 1 + + name + keyword.operator.type.asserts.ts + + 2 + + name + variable.parameter.ts variable.language.this.ts + + 3 + + name + variable.parameter.ts + + + + + name + keyword.operator.type.asserts.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))asserts(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + name + keyword.operator.expression.is.ts + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))is(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + + type-name + + patterns + + + begin + ([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(<) + captures + + 1 + + name + entity.name.type.module.ts + + 2 + + name + punctuation.accessor.ts + + 3 + + name + punctuation.accessor.optional.ts + + 4 + + name + meta.type.parameters.ts punctuation.definition.typeparameters.begin.ts + + + end + (>) + endCaptures + + 1 + + name + meta.type.parameters.ts punctuation.definition.typeparameters.end.ts + + + contentName + meta.type.parameters.ts + patterns + + + include + #type-arguments-body + + + + + begin + ([_$[:alpha:]][_$[:alnum:]]*)\s*(<) + beginCaptures + + 1 + + name + entity.name.type.ts + + 2 + + name + meta.type.parameters.ts punctuation.definition.typeparameters.begin.ts + + + end + (>) + endCaptures + + 1 + + name + meta.type.parameters.ts punctuation.definition.typeparameters.end.ts + + + contentName + meta.type.parameters.ts + patterns + + + include + #type-arguments-body + + + + + match + ([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]]))) + captures + + 1 + + name + entity.name.type.module.ts + + 2 + + name + punctuation.accessor.ts + + 3 + + name + punctuation.accessor.optional.ts + + + + + name + entity.name.type.ts + match + [_$[:alpha:]][_$[:alnum:]]* + + + + punctuation-comma + + name + punctuation.separator.comma.ts + match + , + + punctuation-semicolon + + name + punctuation.terminator.statement.ts + match + ; + + punctuation-accessor + + match + (?:(\.)|(\?\.(?!\s*[[:digit:]]))) + captures + + 1 + + name + punctuation.accessor.ts + + 2 + + name + punctuation.accessor.optional.ts + + + + string + + patterns + + + include + #qstring-single + + + include + #qstring-double + + + include + #template + + + + qstring-double + + name + string.quoted.double.ts + begin + " + beginCaptures + + 0 + + name + punctuation.definition.string.begin.ts + + + end + (")|((?:[^\\\n])$) + endCaptures + + 1 + + name + punctuation.definition.string.end.ts + + 2 + + name + invalid.illegal.newline.ts + + + patterns + + + include + #string-character-escape + + + + qstring-single + + name + string.quoted.single.ts + begin + ' + beginCaptures + + 0 + + name + punctuation.definition.string.begin.ts + + + end + (\')|((?:[^\\\n])$) + endCaptures + + 1 + + name + punctuation.definition.string.end.ts + + 2 + + name + invalid.illegal.newline.ts + + + patterns + + + include + #string-character-escape + + + + string-character-escape + + name + constant.character.escape.ts + match + \\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|u\{[0-9A-Fa-f]+\}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$) + + template + + patterns + + + include + #template-call + + + contentName + string.template.ts + begin + ([_$[:alpha:]][_$[:alnum:]]*)?(`) + beginCaptures + + 1 + + name + entity.name.function.tagged-template.ts + + 2 + + name + string.template.ts punctuation.definition.string.template.begin.ts + + + end + ` + endCaptures + + 0 + + name + string.template.ts punctuation.definition.string.template.end.ts + + + patterns + + + include + #template-substitution-element + + + include + #string-character-escape + + + + + + template-call + + patterns + + + begin + (?=(([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*)(<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)?`) + end + (?=`) + patterns + + + begin + (?=(([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*)) + end + (?=(<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)?`) + patterns + + + include + #support-function-call-identifiers + + + name + entity.name.function.tagged-template.ts + match + ([_$[:alpha:]][_$[:alnum:]]*) + + + + + include + #type-arguments + + + + + begin + ([_$[:alpha:]][_$[:alnum:]]*)?\s*(?=(<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)`) + beginCaptures + + 1 + + name + entity.name.function.tagged-template.ts + + + end + (?=`) + patterns + + + include + #type-arguments + + + + + + template-substitution-element + + name + meta.template.expression.ts + begin + \$\{ + beginCaptures + + 0 + + name + punctuation.definition.template-expression.begin.ts + + + end + \} + endCaptures + + 0 + + name + punctuation.definition.template-expression.end.ts + + + patterns + + + include + #expression + + + contentName + meta.embedded.line.ts + + type-string + + patterns + + + include + #qstring-single + + + include + #qstring-double + + + include + #template-type + + + + template-type + + patterns + + + include + #template-call + + + contentName + string.template.ts + begin + ([_$[:alpha:]][_$[:alnum:]]*)?(`) + beginCaptures + + 1 + + name + entity.name.function.tagged-template.ts + + 2 + + name + string.template.ts punctuation.definition.string.template.begin.ts + + + end + ` + endCaptures + + 0 + + name + string.template.ts punctuation.definition.string.template.end.ts + + + patterns + + + include + #template-type-substitution-element + + + include + #string-character-escape + + + + + + template-type-substitution-element + + name + meta.template.expression.ts + begin + \$\{ + beginCaptures + + 0 + + name + punctuation.definition.template-expression.begin.ts + + + end + \} + endCaptures + + 0 + + name + punctuation.definition.template-expression.end.ts + + + patterns + + + include + #type + + + contentName + meta.embedded.line.ts + + regex + + patterns + + + name + string.regexp.ts + begin + (?<!\+\+|--|})(?<=[=(:,\[?+!]|^return|[^\._$[:alnum:]]return|^case|[^\._$[:alnum:]]case|=>|&&|\|\||\*\/)\s*(\/)(?![\/*])(?=(?:[^\/\\\[\()]|\\.|\[([^\]\\]|\\.)+\]|\(([^\)\\]|\\.)+\))+\/([dgimsuvy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$])) + beginCaptures + + 1 + + name + punctuation.definition.string.begin.ts + + + end + (/)([dgimsuvy]*) + endCaptures + + 1 + + name + punctuation.definition.string.end.ts + + 2 + + name + keyword.other.ts + + + patterns + + + include + #regexp + + + + + name + string.regexp.ts + begin + ((?<![_$[:alnum:])\]]|\+\+|--|}|\*\/)|((?<=^return|[^\._$[:alnum:]]return|^case|[^\._$[:alnum:]]case))\s*)\/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)*\])+\/([dgimsuvy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$])) + beginCaptures + + 0 + + name + punctuation.definition.string.begin.ts + + + end + (/)([dgimsuvy]*) + endCaptures + + 1 + + name + punctuation.definition.string.end.ts + + 2 + + name + keyword.other.ts + + + patterns + + + include + #regexp + + + + + + regexp + + patterns + + + name + keyword.control.anchor.regexp + match + \\[bB]|\^|\$ + + + match + \\[1-9]\d*|\\k<([a-zA-Z_$][\w$]*)> + captures + + 0 + + name + keyword.other.back-reference.regexp + + 1 + + name + variable.other.regexp + + + + + name + keyword.operator.quantifier.regexp + match + [?+*]|\{(\d+,\d+|\d+,|,\d+|\d+)\}\?? + + + name + keyword.operator.or.regexp + match + \| + + + name + meta.group.assertion.regexp + begin + (\()((\?=)|(\?!)|(\?<=)|(\?<!)) + beginCaptures + + 1 + + name + punctuation.definition.group.regexp + + 2 + + name + punctuation.definition.group.assertion.regexp + + 3 + + name + meta.assertion.look-ahead.regexp + + 4 + + name + meta.assertion.negative-look-ahead.regexp + + 5 + + name + meta.assertion.look-behind.regexp + + 6 + + name + meta.assertion.negative-look-behind.regexp + + + end + (\)) + endCaptures + + 1 + + name + punctuation.definition.group.regexp + + + patterns + + + include + #regexp + + + + + name + meta.group.regexp + begin + \((?:(\?:)|(?:\?<([a-zA-Z_$][\w$]*)>))? + beginCaptures + + 0 + + name + punctuation.definition.group.regexp + + 1 + + name + punctuation.definition.group.no-capture.regexp + + 2 + + name + variable.other.regexp + + + end + \) + endCaptures + + 0 + + name + punctuation.definition.group.regexp + + + patterns + + + include + #regexp + + + + + name + constant.other.character-class.set.regexp + begin + (\[)(\^)? + beginCaptures + + 1 + + name + punctuation.definition.character-class.regexp + + 2 + + name + keyword.operator.negation.regexp + + + end + (\]) + endCaptures + + 1 + + name + punctuation.definition.character-class.regexp + + + patterns + + + name + constant.other.character-class.range.regexp + match + (?:.|(\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\c[A-Z])|(\\.))\-(?:[^\]\\]|(\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\c[A-Z])|(\\.)) + captures + + 1 + + name + constant.character.numeric.regexp + + 2 + + name + constant.character.control.regexp + + 3 + + name + constant.character.escape.backslash.regexp + + 4 + + name + constant.character.numeric.regexp + + 5 + + name + constant.character.control.regexp + + 6 + + name + constant.character.escape.backslash.regexp + + + + + include + #regex-character-class + + + + + include + #regex-character-class + + + + regex-character-class + + patterns + + + name + constant.other.character-class.regexp + match + \\[wWsSdDtrnvf]|\. + + + name + constant.character.numeric.regexp + match + \\([0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}) + + + name + constant.character.control.regexp + match + \\c[A-Z] + + + name + constant.character.escape.backslash.regexp + match + \\. + + + + comment + + patterns + + + name + comment.block.documentation.ts + begin + /\*\*(?!/) + beginCaptures + + 0 + + name + punctuation.definition.comment.ts + + + end + \*/ + endCaptures + + 0 + + name + punctuation.definition.comment.ts + + + patterns + + + include + #docblock + + + + + name + comment.block.ts + begin + (/\*)(?:\s*((@)internal)(?=\s|(\*/)))? + beginCaptures + + 1 + + name + punctuation.definition.comment.ts + + 2 + + name + storage.type.internaldeclaration.ts + + 3 + + name + punctuation.decorator.internaldeclaration.ts + + + end + \*/ + endCaptures + + 0 + + name + punctuation.definition.comment.ts + + + + + begin + (^[ \t]+)?((//)(?:\s*((@)internal)(?=\s|$))?) + beginCaptures + + 1 + + name + punctuation.whitespace.comment.leading.ts + + 2 + + name + comment.line.double-slash.ts + + 3 + + name + punctuation.definition.comment.ts + + 4 + + name + storage.type.internaldeclaration.ts + + 5 + + name + punctuation.decorator.internaldeclaration.ts + + + end + (?=$) + contentName + comment.line.double-slash.ts + + + + single-line-comment-consuming-line-ending + + begin + (^[ \t]+)?((//)(?:\s*((@)internal)(?=\s|$))?) + beginCaptures + + 1 + + name + punctuation.whitespace.comment.leading.ts + + 2 + + name + comment.line.double-slash.ts + + 3 + + name + punctuation.definition.comment.ts + + 4 + + name + storage.type.internaldeclaration.ts + + 5 + + name + punctuation.decorator.internaldeclaration.ts + + + end + (?=^) + contentName + comment.line.double-slash.ts + + directives + + name + comment.line.triple-slash.directive.ts + begin + ^(///)\s*(?=<(reference|amd-dependency|amd-module)(\s+(path|types|no-default-lib|lib|name|resolution-mode)\s*=\s*((\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)))+\s*/>\s*$) + beginCaptures + + 1 + + name + punctuation.definition.comment.ts + + + end + (?=$) + patterns + + + name + meta.tag.ts + begin + (<)(reference|amd-dependency|amd-module) + beginCaptures + + 1 + + name + punctuation.definition.tag.directive.ts + + 2 + + name + entity.name.tag.directive.ts + + + end + /> + endCaptures + + 0 + + name + punctuation.definition.tag.directive.ts + + + patterns + + + name + entity.other.attribute-name.directive.ts + match + path|types|no-default-lib|lib|name|resolution-mode + + + name + keyword.operator.assignment.ts + match + = + + + include + #string + + + + + + docblock + + patterns + + + match + (?x) +((@)(?:access|api)) +\s+ +(private|protected|public) +\b + captures + + 1 + + name + storage.type.class.jsdoc + + 2 + + name + punctuation.definition.block.tag.jsdoc + + 3 + + name + constant.language.access-type.jsdoc + + + + + match + (?x) +((@)author) +\s+ +( + [^@\s<>*/] + (?:[^@<>*/]|\*[^/])* +) +(?: + \s* + (<) + ([^>\s]+) + (>) +)? + captures + + 1 + + name + storage.type.class.jsdoc + + 2 + + name + punctuation.definition.block.tag.jsdoc + + 3 + + name + entity.name.type.instance.jsdoc + + 4 + + name + punctuation.definition.bracket.angle.begin.jsdoc + + 5 + + name + constant.other.email.link.underline.jsdoc + + 6 + + name + punctuation.definition.bracket.angle.end.jsdoc + + + + + match + (?x) +((@)borrows) \s+ +((?:[^@\s*/]|\*[^/])+) # <that namepath> +\s+ (as) \s+ # as +((?:[^@\s*/]|\*[^/])+) # <this namepath> + captures + + 1 + + name + storage.type.class.jsdoc + + 2 + + name + punctuation.definition.block.tag.jsdoc + + 3 + + name + entity.name.type.instance.jsdoc + + 4 + + name + keyword.operator.control.jsdoc + + 5 + + name + entity.name.type.instance.jsdoc + + + + + name + meta.example.jsdoc + begin + ((@)example)\s+ + end + (?=@|\*/) + beginCaptures + + 1 + + name + storage.type.class.jsdoc + + 2 + + name + punctuation.definition.block.tag.jsdoc + + + patterns + + + match + ^\s\*\s+ + + + contentName + constant.other.description.jsdoc + begin + \G(<)caption(>) + beginCaptures + + 0 + + name + entity.name.tag.inline.jsdoc + + 1 + + name + punctuation.definition.bracket.angle.begin.jsdoc + + 2 + + name + punctuation.definition.bracket.angle.end.jsdoc + + + end + (</)caption(>)|(?=\*/) + endCaptures + + 0 + + name + entity.name.tag.inline.jsdoc + + 1 + + name + punctuation.definition.bracket.angle.begin.jsdoc + + 2 + + name + punctuation.definition.bracket.angle.end.jsdoc + + + + + match + [^\s@*](?:[^*]|\*[^/])* + captures + + 0 + + name + source.embedded.ts + + + + + + + match + (?x) ((@)kind) \s+ (class|constant|event|external|file|function|member|mixin|module|namespace|typedef) \b + captures + + 1 + + name + storage.type.class.jsdoc + + 2 + + name + punctuation.definition.block.tag.jsdoc + + 3 + + name + constant.language.symbol-type.jsdoc + + + + + match + (?x) +((@)see) +\s+ +(?: + # URL + ( + (?=https?://) + (?:[^\s*]|\*[^/])+ + ) + | + # JSDoc namepath + ( + (?! + # Avoid matching bare URIs (also acceptable as links) + https?:// + | + # Avoid matching {@inline tags}; we match those below + (?:\[[^\[\]]*\])? # Possible description [preceding]{@tag} + {@(?:link|linkcode|linkplain|tutorial)\b + ) + # Matched namepath + (?:[^@\s*/]|\*[^/])+ + ) +) + captures + + 1 + + name + storage.type.class.jsdoc + + 2 + + name + punctuation.definition.block.tag.jsdoc + + 3 + + name + variable.other.link.underline.jsdoc + + 4 + + name + entity.name.type.instance.jsdoc + + + + + match + (?x) +((@)template) +\s+ +# One or more valid identifiers +( + [A-Za-z_$] # First character: non-numeric word character + [\w$.\[\]]* # Rest of identifier + (?: # Possible list of additional identifiers + \s* , \s* + [A-Za-z_$] + [\w$.\[\]]* + )* +) + captures + + 1 + + name + storage.type.class.jsdoc + + 2 + + name + punctuation.definition.block.tag.jsdoc + + 3 + + name + variable.other.jsdoc + + + + + begin + (?x)((@)template)\s+(?={) + beginCaptures + + 1 + + name + storage.type.class.jsdoc + + 2 + + name + punctuation.definition.block.tag.jsdoc + + + end + (?=\s|\*/|[^{}\[\]A-Za-z_$]) + patterns + + + include + #jsdoctype + + + name + variable.other.jsdoc + match + ([A-Za-z_$][\w$.\[\]]*) + + + + + match + (?x) +( + (@) + (?:arg|argument|const|constant|member|namespace|param|var) +) +\s+ +( + [A-Za-z_$] + [\w$.\[\]]* +) + captures + + 1 + + name + storage.type.class.jsdoc + + 2 + + name + punctuation.definition.block.tag.jsdoc + + 3 + + name + variable.other.jsdoc + + + + + begin + ((@)typedef)\s+(?={) + beginCaptures + + 1 + + name + storage.type.class.jsdoc + + 2 + + name + punctuation.definition.block.tag.jsdoc + + + end + (?=\s|\*/|[^{}\[\]A-Za-z_$]) + patterns + + + include + #jsdoctype + + + name + entity.name.type.instance.jsdoc + match + (?:[^@\s*/]|\*[^/])+ + + + + + begin + ((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\s+(?={) + beginCaptures + + 1 + + name + storage.type.class.jsdoc + + 2 + + name + punctuation.definition.block.tag.jsdoc + + + end + (?=\s|\*/|[^{}\[\]A-Za-z_$]) + patterns + + + include + #jsdoctype + + + name + variable.other.jsdoc + match + ([A-Za-z_$][\w$.\[\]]*) + + + name + variable.other.jsdoc + match + (?x) +(\[)\s* +[\w$]+ +(?: + (?:\[\])? # Foo[ ].bar properties within an array + \. # Foo.Bar namespaced parameter + [\w$]+ +)* +(?: + \s* + (=) # [foo=bar] Default parameter value + \s* + ( + # The inner regexes are to stop the match early at */ and to not stop at escaped quotes + (?> + "(?:(?:\*(?!/))|(?:\\(?!"))|[^*\\])*?" | # [foo="bar"] Double-quoted + '(?:(?:\*(?!/))|(?:\\(?!'))|[^*\\])*?' | # [foo='bar'] Single-quoted + \[ (?:(?:\*(?!/))|[^*])*? \] | # [foo=[1,2]] Array literal + (?:(?:\*(?!/))|\s(?!\s*\])|\[.*?(?:\]|(?=\*/))|[^*\s\[\]])* # Everything else + )* + ) +)? +\s*(?:(\])((?:[^*\s]|\*[^\s/])+)?|(?=\*/)) + captures + + 1 + + name + punctuation.definition.optional-value.begin.bracket.square.jsdoc + + 2 + + name + keyword.operator.assignment.jsdoc + + 3 + + name + source.embedded.ts + + 4 + + name + punctuation.definition.optional-value.end.bracket.square.jsdoc + + 5 + + name + invalid.illegal.syntax.jsdoc + + + + + + + begin + (?x) +( + (@) + (?:define|enum|exception|export|extends|lends|implements|modifies + |namespace|private|protected|returns?|satisfies|suppress|this|throws|type + |yields?) +) +\s+(?={) + beginCaptures + + 1 + + name + storage.type.class.jsdoc + + 2 + + name + punctuation.definition.block.tag.jsdoc + + + end + (?=\s|\*/|[^{}\[\]A-Za-z_$]) + patterns + + + include + #jsdoctype + + + + + match + (?x) +( + (@) + (?:alias|augments|callback|constructs|emits|event|fires|exports? + |extends|external|function|func|host|lends|listens|interface|memberof!? + |method|module|mixes|mixin|name|requires|see|this|typedef|uses) +) +\s+ +( + (?: + [^{}@\s*] | \*[^/] + )+ +) + captures + + 1 + + name + storage.type.class.jsdoc + + 2 + + name + punctuation.definition.block.tag.jsdoc + + 3 + + name + entity.name.type.instance.jsdoc + + + + + contentName + variable.other.jsdoc + begin + ((@)(?:default(?:value)?|license|version))\s+(([''"])) + beginCaptures + + 1 + + name + storage.type.class.jsdoc + + 2 + + name + punctuation.definition.block.tag.jsdoc + + 3 + + name + variable.other.jsdoc + + 4 + + name + punctuation.definition.string.begin.jsdoc + + + end + (\3)|(?=$|\*/) + endCaptures + + 0 + + name + variable.other.jsdoc + + 1 + + name + punctuation.definition.string.end.jsdoc + + + + + match + ((@)(?:default(?:value)?|license|tutorial|variation|version))\s+([^\s*]+) + captures + + 1 + + name + storage.type.class.jsdoc + + 2 + + name + punctuation.definition.block.tag.jsdoc + + 3 + + name + variable.other.jsdoc + + + + + name + storage.type.class.jsdoc + match + (?x) (@) (?:abstract|access|alias|api|arg|argument|async|attribute|augments|author|beta|borrows|bubbles |callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright |default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exception |exports?|extends|extension(?:_?for)?|external|externs|file|fileoverview|final|fires|for|func |function|generator|global|hideconstructor|host|ignore|implements|implicitCast|inherit[Dd]oc |inner|instance|interface|internal|kind|lends|license|listens|main|member|memberof!?|method |mixes|mixins?|modifies|module|name|namespace|noalias|nocollapse|nocompile|nosideeffects |override|overview|package|param|polymer(?:Behavior)?|preserve|private|prop|property|protected |public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary |suppress|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation |version|virtual|writeOnce|yields?) \b + captures + + 1 + + name + punctuation.definition.block.tag.jsdoc + + + + + include + #inline-tags + + + match + ((@)(?:[_$[:alpha:]][_$[:alnum:]]*))(?=\s+) + captures + + 1 + + name + storage.type.class.jsdoc + + 2 + + name + punctuation.definition.block.tag.jsdoc + + + + + + brackets + + patterns + + + begin + { + end + }|(?=\*/) + patterns + + + include + #brackets + + + + + begin + \[ + end + \]|(?=\*/) + patterns + + + include + #brackets + + + + + + inline-tags + + patterns + + + name + constant.other.description.jsdoc + match + (\[)[^\]]+(\])(?={@(?:link|linkcode|linkplain|tutorial)) + captures + + 1 + + name + punctuation.definition.bracket.square.begin.jsdoc + + 2 + + name + punctuation.definition.bracket.square.end.jsdoc + + + + + name + entity.name.type.instance.jsdoc + begin + ({)((@)(?:link(?:code|plain)?|tutorial))\s* + beginCaptures + + 1 + + name + punctuation.definition.bracket.curly.begin.jsdoc + + 2 + + name + storage.type.class.jsdoc + + 3 + + name + punctuation.definition.inline.tag.jsdoc + + + end + }|(?=\*/) + endCaptures + + 0 + + name + punctuation.definition.bracket.curly.end.jsdoc + + + patterns + + + match + \G((?=https?://)(?:[^|}\s*]|\*[/])+)(\|)? + captures + + 1 + + name + variable.other.link.underline.jsdoc + + 2 + + name + punctuation.separator.pipe.jsdoc + + + + + match + \G((?:[^{}@\s|*]|\*[^/])+)(\|)? + captures + + 1 + + name + variable.other.description.jsdoc + + 2 + + name + punctuation.separator.pipe.jsdoc + + + + + + + + jsdoctype + + patterns + + + name + invalid.illegal.type.jsdoc + match + \G{(?:[^}*]|\*[^/}])+$ + + + contentName + entity.name.type.instance.jsdoc + begin + \G({) + beginCaptures + + 0 + + name + entity.name.type.instance.jsdoc + + 1 + + name + punctuation.definition.bracket.curly.begin.jsdoc + + + end + ((}))\s*|(?=\*/) + endCaptures + + 1 + + name + entity.name.type.instance.jsdoc + + 2 + + name + punctuation.definition.bracket.curly.end.jsdoc + + + patterns + + + include + #brackets + + + + + + + + \ No newline at end of file diff --git a/src/file-viewer/highlight-grammar/tsx.plist b/src/file-viewer/highlight-grammar/tsx.plist new file mode 100644 index 0000000..a7aec5d --- /dev/null +++ b/src/file-viewer/highlight-grammar/tsx.plist @@ -0,0 +1,10281 @@ + + + + + name + TypeScriptReact + scopeName + source.tsx + fileTypes + + tsx + + uuid + 805375ec-d614-41f5-8993-5843fe63ea82 + patterns + + + include + #directives + + + include + #statements + + + include + #shebang + + + repository + + shebang + + name + comment.line.shebang.tsx + match + \A(#!).*(?=$) + captures + + 1 + + name + punctuation.definition.comment.tsx + + + + statements + + patterns + + + include + #declaration + + + include + #control-statement + + + include + #after-operator-block-as-object-literal + + + include + #decl-block + + + include + #label + + + include + #expression + + + include + #punctuation-semicolon + + + include + #string + + + include + #comment + + + + declaration + + patterns + + + include + #decorator + + + include + #var-expr + + + include + #function-declaration + + + include + #class-declaration + + + include + #interface-declaration + + + include + #enum-declaration + + + include + #namespace-declaration + + + include + #type-alias-declaration + + + include + #import-equals-declaration + + + include + #import-declaration + + + include + #export-declaration + + + name + storage.modifier.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(declare|export)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + + control-statement + + patterns + + + include + #switch-statement + + + include + #for-loop + + + name + keyword.control.trycatch.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(catch|finally|throw|try)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(break|continue|goto)\s+([_$[:alpha:]][_$[:alnum:]]*)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + captures + + 1 + + name + keyword.control.loop.tsx + + 2 + + name + entity.name.label.tsx + + + + + name + keyword.control.loop.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(break|continue|do|goto|while)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(return)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + beginCaptures + + 0 + + name + keyword.control.flow.tsx + + + end + (?=[;}]|$|;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b)) + patterns + + + include + #expression + + + + + name + keyword.control.switch.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(case|default|switch)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + include + #if-statement + + + name + keyword.control.conditional.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(else|if)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + name + keyword.control.with.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(with)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + name + keyword.control.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(package)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + name + keyword.other.debugger.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(debugger)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + + label + + patterns + + + begin + ([_$[:alpha:]][_$[:alnum:]]*)\s*(:)(?=\s*\{) + beginCaptures + + 1 + + name + entity.name.label.tsx + + 2 + + name + punctuation.separator.label.tsx + + + end + (?<=\}) + patterns + + + include + #decl-block + + + + + match + ([_$[:alpha:]][_$[:alnum:]]*)\s*(:) + captures + + 1 + + name + entity.name.label.tsx + + 2 + + name + punctuation.separator.label.tsx + + + + + + expression + + patterns + + + include + #expressionWithoutIdentifiers + + + include + #identifiers + + + include + #expressionPunctuations + + + + expressionWithoutIdentifiers + + patterns + + + include + #jsx + + + include + #string + + + include + #regex + + + include + #comment + + + include + #function-expression + + + include + #class-expression + + + include + #arrow-function + + + include + #paren-expression-possibly-arrow + + + include + #cast + + + include + #ternary-expression + + + include + #new-expr + + + include + #instanceof-expr + + + include + #object-literal + + + include + #expression-operators + + + include + #function-call + + + include + #literal + + + include + #support-objects + + + include + #paren-expression + + + + expressionPunctuations + + patterns + + + include + #punctuation-comma + + + include + #punctuation-accessor + + + + decorator + + name + meta.decorator.tsx + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))\@ + beginCaptures + + 0 + + name + punctuation.decorator.tsx + + + end + (?=\s) + patterns + + + include + #expression + + + + var-expr + + patterns + + + name + meta.var.expr.tsx + begin + (?=(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(var|let)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) + end + (?!(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(var|let)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))((?=^|;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b))|((?<!^let|[^\._$[:alnum:]]let|^var|[^\._$[:alnum:]]var)(?=\s*$))) + patterns + + + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(var|let)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s* + beginCaptures + + 1 + + name + keyword.control.export.tsx + + 2 + + name + storage.modifier.tsx + + 3 + + name + storage.type.tsx + + + end + (?=\S) + + + include + #destructuring-variable + + + include + #var-single-variable + + + include + #variable-initializer + + + include + #comment + + + begin + (,)\s*(?=$|\/\/) + beginCaptures + + 1 + + name + punctuation.separator.comma.tsx + + + end + (?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$))) + patterns + + + include + #single-line-comment-consuming-line-ending + + + include + #comment + + + include + #destructuring-variable + + + include + #var-single-variable + + + include + #punctuation-comma + + + + + include + #punctuation-comma + + + + + name + meta.var.expr.tsx + begin + (?=(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(const(?!\s+enum\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) + beginCaptures + + 1 + + name + keyword.control.export.tsx + + 2 + + name + storage.modifier.tsx + + 3 + + name + storage.type.tsx + + + end + (?!(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(const(?!\s+enum\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))((?=^|;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b))|((?<!^const|[^\._$[:alnum:]]const)(?=\s*$))) + patterns + + + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(const(?!\s+enum\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s* + beginCaptures + + 1 + + name + keyword.control.export.tsx + + 2 + + name + storage.modifier.tsx + + 3 + + name + storage.type.tsx + + + end + (?=\S) + + + include + #destructuring-const + + + include + #var-single-const + + + include + #variable-initializer + + + include + #comment + + + begin + (,)\s*(?=$|\/\/) + beginCaptures + + 1 + + name + punctuation.separator.comma.tsx + + + end + (?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$))) + patterns + + + include + #single-line-comment-consuming-line-ending + + + include + #comment + + + include + #destructuring-const + + + include + #var-single-const + + + include + #punctuation-comma + + + + + include + #punctuation-comma + + + + + name + meta.var.expr.tsx + begin + (?=(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b((?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) + beginCaptures + + 1 + + name + keyword.control.export.tsx + + 2 + + name + storage.modifier.tsx + + 3 + + name + storage.type.tsx + + + end + (?!(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b((?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))((?=;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b))|((?<!^using|[^\._$[:alnum:]]using|^await\s+using|[^\._$[:alnum:]]await\s+using)(?=\s*$))) + patterns + + + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b((?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s* + beginCaptures + + 1 + + name + keyword.control.export.tsx + + 2 + + name + storage.modifier.tsx + + 3 + + name + storage.type.tsx + + + end + (?=\S) + + + include + #var-single-const + + + include + #variable-initializer + + + include + #comment + + + begin + (,)\s*((?!\S)|(?=\/\/)) + beginCaptures + + 1 + + name + punctuation.separator.comma.tsx + + + end + (?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$))) + patterns + + + include + #single-line-comment-consuming-line-ending + + + include + #comment + + + include + #var-single-const + + + include + #punctuation-comma + + + + + include + #punctuation-comma + + + + + + var-single-variable + + patterns + + + name + meta.var-single-variable.expr.tsx + begin + (?x)([_$[:alpha:]][_$[:alnum:]]*)(\!)?(?=\s* +# function assignment | +(=\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) +) | +( + [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends +) | +# arrow function possible to detect only with => on same line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator +) + )) +)) | +# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) => +(:\s*( + (<) | + ([(]\s*( + ([)]) | + (\.\.\.) | + ([_$[:alnum:]]+\s*( + ([:,?=])| + ([)]\s*=>) + )) + )) +)) | +(:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) | +(:\s*((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) | +(:\s*(=>|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) +) | +( + [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends +) | +# arrow function possible to detect only with => on same line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator +) + )) +))) + beginCaptures + + 1 + + name + meta.definition.variable.tsx entity.name.function.tsx + + 2 + + name + keyword.operator.definiteassignment.tsx + + + end + (?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|(;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b))) + patterns + + + include + #var-single-variable-type-annotation + + + + + name + meta.var-single-variable.expr.tsx + begin + ([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])(\!)? + beginCaptures + + 1 + + name + meta.definition.variable.tsx variable.other.constant.tsx + + 2 + + name + keyword.operator.definiteassignment.tsx + + + end + (?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|(;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b))) + patterns + + + include + #var-single-variable-type-annotation + + + + + name + meta.var-single-variable.expr.tsx + begin + ([_$[:alpha:]][_$[:alnum:]]*)(\!)? + beginCaptures + + 1 + + name + meta.definition.variable.tsx variable.other.readwrite.tsx + + 2 + + name + keyword.operator.definiteassignment.tsx + + + end + (?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|(;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b))) + patterns + + + include + #var-single-variable-type-annotation + + + + + + var-single-const + + patterns + + + name + meta.var-single-variable.expr.tsx + begin + (?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\s* +# function assignment | +(=\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) +) | +( + [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends +) | +# arrow function possible to detect only with => on same line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator +) + )) +)) | +# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) => +(:\s*( + (<) | + ([(]\s*( + ([)]) | + (\.\.\.) | + ([_$[:alnum:]]+\s*( + ([:,?=])| + ([)]\s*=>) + )) + )) +)) | +(:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) | +(:\s*((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) | +(:\s*(=>|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) +) | +( + [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends +) | +# arrow function possible to detect only with => on same line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator +) + )) +))) + beginCaptures + + 1 + + name + meta.definition.variable.tsx variable.other.constant.tsx entity.name.function.tsx + + + end + (?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|(;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b))) + patterns + + + include + #var-single-variable-type-annotation + + + + + name + meta.var-single-variable.expr.tsx + begin + ([_$[:alpha:]][_$[:alnum:]]*) + beginCaptures + + 1 + + name + meta.definition.variable.tsx variable.other.constant.tsx + + + end + (?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|(;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b))) + patterns + + + include + #var-single-variable-type-annotation + + + + + + var-single-variable-type-annotation + + patterns + + + include + #type-annotation + + + include + #string + + + include + #comment + + + + destructuring-variable + + patterns + + + name + meta.object-binding-pattern-variable.tsx + begin + (?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\{) + end + (?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)) + patterns + + + include + #object-binding-pattern + + + include + #type-annotation + + + include + #comment + + + + + name + meta.array-binding-pattern-variable.tsx + begin + (?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\[) + end + (?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)) + patterns + + + include + #array-binding-pattern + + + include + #type-annotation + + + include + #comment + + + + + + destructuring-const + + patterns + + + name + meta.object-binding-pattern-variable.tsx + begin + (?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\{) + end + (?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)) + patterns + + + include + #object-binding-pattern-const + + + include + #type-annotation + + + include + #comment + + + + + name + meta.array-binding-pattern-variable.tsx + begin + (?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\[) + end + (?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)) + patterns + + + include + #array-binding-pattern-const + + + include + #type-annotation + + + include + #comment + + + + + + object-binding-element + + patterns + + + include + #comment + + + begin + (?x)(?=((\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?: + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3 + (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3 + (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3 + (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3 + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1 + (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1. + (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1 + (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1 +)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:)) + end + (?=,|\}) + patterns + + + include + #object-binding-element-propertyName + + + include + #binding-element + + + + + include + #object-binding-pattern + + + include + #destructuring-variable-rest + + + include + #variable-initializer + + + include + #punctuation-comma + + + + object-binding-element-const + + patterns + + + include + #comment + + + begin + (?x)(?=((\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?: + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3 + (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3 + (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3 + (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3 + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1 + (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1. + (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1 + (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1 +)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:)) + end + (?=,|\}) + patterns + + + include + #object-binding-element-propertyName + + + include + #binding-element-const + + + + + include + #object-binding-pattern-const + + + include + #destructuring-variable-rest-const + + + include + #variable-initializer + + + include + #punctuation-comma + + + + object-binding-element-propertyName + + begin + (?x)(?=((\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?: + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3 + (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3 + (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3 + (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3 + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1 + (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1. + (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1 + (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1 +)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:)) + end + (:) + endCaptures + + 0 + + name + punctuation.destructuring.tsx + + + patterns + + + include + #string + + + include + #array-literal + + + include + #numeric-literal + + + name + variable.object.property.tsx + match + ([_$[:alpha:]][_$[:alnum:]]*) + + + + binding-element + + patterns + + + include + #comment + + + include + #string + + + include + #numeric-literal + + + include + #regex + + + include + #object-binding-pattern + + + include + #array-binding-pattern + + + include + #destructuring-variable-rest + + + include + #variable-initializer + + + + binding-element-const + + patterns + + + include + #comment + + + include + #string + + + include + #numeric-literal + + + include + #regex + + + include + #object-binding-pattern-const + + + include + #array-binding-pattern-const + + + include + #destructuring-variable-rest-const + + + include + #variable-initializer + + + + destructuring-variable-rest + + match + (?:(\.\.\.)\s*)?([_$[:alpha:]][_$[:alnum:]]*) + captures + + 1 + + name + keyword.operator.rest.tsx + + 2 + + name + meta.definition.variable.tsx variable.other.readwrite.tsx + + + + destructuring-variable-rest-const + + match + (?:(\.\.\.)\s*)?([_$[:alpha:]][_$[:alnum:]]*) + captures + + 1 + + name + keyword.operator.rest.tsx + + 2 + + name + meta.definition.variable.tsx variable.other.constant.tsx + + + + object-binding-pattern + + begin + (?:(\.\.\.)\s*)?(\{) + beginCaptures + + 1 + + name + keyword.operator.rest.tsx + + 2 + + name + punctuation.definition.binding-pattern.object.tsx + + + end + \} + endCaptures + + 0 + + name + punctuation.definition.binding-pattern.object.tsx + + + patterns + + + include + #object-binding-element + + + + object-binding-pattern-const + + begin + (?:(\.\.\.)\s*)?(\{) + beginCaptures + + 1 + + name + keyword.operator.rest.tsx + + 2 + + name + punctuation.definition.binding-pattern.object.tsx + + + end + \} + endCaptures + + 0 + + name + punctuation.definition.binding-pattern.object.tsx + + + patterns + + + include + #object-binding-element-const + + + + array-binding-pattern + + begin + (?:(\.\.\.)\s*)?(\[) + beginCaptures + + 1 + + name + keyword.operator.rest.tsx + + 2 + + name + punctuation.definition.binding-pattern.array.tsx + + + end + \] + endCaptures + + 0 + + name + punctuation.definition.binding-pattern.array.tsx + + + patterns + + + include + #binding-element + + + include + #punctuation-comma + + + + array-binding-pattern-const + + begin + (?:(\.\.\.)\s*)?(\[) + beginCaptures + + 1 + + name + keyword.operator.rest.tsx + + 2 + + name + punctuation.definition.binding-pattern.array.tsx + + + end + \] + endCaptures + + 0 + + name + punctuation.definition.binding-pattern.array.tsx + + + patterns + + + include + #binding-element-const + + + include + #punctuation-comma + + + + parameter-name + + patterns + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(override|public|protected|private|readonly)\s+(?=(override|public|protected|private|readonly)\s+) + captures + + 1 + + name + storage.modifier.tsx + + + + + match + (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(override|public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)(?=\s* +# function assignment | +(=\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) +) | +( + [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends +) | +# arrow function possible to detect only with => on same line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator +) + )) +)) | +# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) => +(:\s*( + (<) | + ([(]\s*( + ([)]) | + (\.\.\.) | + ([_$[:alnum:]]+\s*( + ([:,?=])| + ([)]\s*=>) + )) + )) +)) | +(:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) | +(:\s*((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) | +(:\s*(=>|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) +) | +( + [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends +) | +# arrow function possible to detect only with => on same line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator +) + )) +))) + captures + + 1 + + name + storage.modifier.tsx + + 2 + + name + keyword.operator.rest.tsx + + 3 + + name + entity.name.function.tsx variable.language.this.tsx + + 4 + + name + entity.name.function.tsx + + 5 + + name + keyword.operator.optional.tsx + + + + + match + (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(override|public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??) + captures + + 1 + + name + storage.modifier.tsx + + 2 + + name + keyword.operator.rest.tsx + + 3 + + name + variable.parameter.tsx variable.language.this.tsx + + 4 + + name + variable.parameter.tsx + + 5 + + name + keyword.operator.optional.tsx + + + + + + destructuring-parameter + + patterns + + + name + meta.parameter.object-binding-pattern.tsx + begin + (?<!=|:)\s*(?:(\.\.\.)\s*)?(\{) + beginCaptures + + 1 + + name + keyword.operator.rest.tsx + + 2 + + name + punctuation.definition.binding-pattern.object.tsx + + + end + \} + endCaptures + + 0 + + name + punctuation.definition.binding-pattern.object.tsx + + + patterns + + + include + #parameter-object-binding-element + + + + + name + meta.paramter.array-binding-pattern.tsx + begin + (?<!=|:)\s*(?:(\.\.\.)\s*)?(\[) + beginCaptures + + 1 + + name + keyword.operator.rest.tsx + + 2 + + name + punctuation.definition.binding-pattern.array.tsx + + + end + \] + endCaptures + + 0 + + name + punctuation.definition.binding-pattern.array.tsx + + + patterns + + + include + #parameter-binding-element + + + include + #punctuation-comma + + + + + + parameter-object-binding-element + + patterns + + + include + #comment + + + begin + (?x)(?=((\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?: + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3 + (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3 + (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3 + (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3 + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1 + (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1. + (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1 + (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1 +)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:)) + end + (?=,|\}) + patterns + + + include + #object-binding-element-propertyName + + + include + #parameter-binding-element + + + include + #paren-expression + + + + + include + #parameter-object-binding-pattern + + + include + #destructuring-parameter-rest + + + include + #variable-initializer + + + include + #punctuation-comma + + + + parameter-binding-element + + patterns + + + include + #comment + + + include + #string + + + include + #numeric-literal + + + include + #regex + + + include + #parameter-object-binding-pattern + + + include + #parameter-array-binding-pattern + + + include + #destructuring-parameter-rest + + + include + #variable-initializer + + + + destructuring-parameter-rest + + match + (?:(\.\.\.)\s*)?([_$[:alpha:]][_$[:alnum:]]*) + captures + + 1 + + name + keyword.operator.rest.tsx + + 2 + + name + variable.parameter.tsx + + + + parameter-object-binding-pattern + + begin + (?:(\.\.\.)\s*)?(\{) + beginCaptures + + 1 + + name + keyword.operator.rest.tsx + + 2 + + name + punctuation.definition.binding-pattern.object.tsx + + + end + \} + endCaptures + + 0 + + name + punctuation.definition.binding-pattern.object.tsx + + + patterns + + + include + #parameter-object-binding-element + + + + parameter-array-binding-pattern + + begin + (?:(\.\.\.)\s*)?(\[) + beginCaptures + + 1 + + name + keyword.operator.rest.tsx + + 2 + + name + punctuation.definition.binding-pattern.array.tsx + + + end + \] + endCaptures + + 0 + + name + punctuation.definition.binding-pattern.array.tsx + + + patterns + + + include + #parameter-binding-element + + + include + #punctuation-comma + + + + field-declaration + + name + meta.field.declaration.tsx + begin + (?x)(?<!\()(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(readonly)\s+)?(?=\s*((\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?: + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3 + (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3 + (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3 + (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3 + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1 + (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1. + (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1 + (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1 +)(?!\$))|(\#?[_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(?:(?:(\?)|(\!))\s*)?(=|:|;|,|\}|$)) + beginCaptures + + 1 + + name + storage.modifier.tsx + + + end + (?x)(?=\}|;|,|$|(^(?!\s*((\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?: + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3 + (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3 + (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3 + (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3 + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1 + (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1. + (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1 + (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1 +)(?!\$))|(\#?[_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(?:(?:(\?)|(\!))\s*)?(=|:|;|,|$))))|(?<=\}) + patterns + + + include + #variable-initializer + + + include + #type-annotation + + + include + #string + + + include + #array-literal + + + include + #numeric-literal + + + include + #comment + + + match + (?x)(\#?[_$[:alpha:]][_$[:alnum:]]*)(?:(\?)|(\!))?(?=\s*\s* +# function assignment | +(=\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) +) | +( + [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends +) | +# arrow function possible to detect only with => on same line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator +) + )) +)) | +# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) => +(:\s*( + (<) | + ([(]\s*( + ([)]) | + (\.\.\.) | + ([_$[:alnum:]]+\s*( + ([:,?=])| + ([)]\s*=>) + )) + )) +)) | +(:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) | +(:\s*((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) | +(:\s*(=>|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) +) | +( + [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends +) | +# arrow function possible to detect only with => on same line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator +) + )) +))) + captures + + 1 + + name + meta.definition.property.tsx entity.name.function.tsx + + 2 + + name + keyword.operator.optional.tsx + + 3 + + name + keyword.operator.definiteassignment.tsx + + + + + name + meta.definition.property.tsx variable.object.property.tsx + match + \#?[_$[:alpha:]][_$[:alnum:]]* + + + name + keyword.operator.optional.tsx + match + \? + + + name + keyword.operator.definiteassignment.tsx + match + \! + + + + variable-initializer + + patterns + + + begin + (?<!=|!)(=)(?!=)(?=\s*\S)(?!\s*.*=>\s*$) + beginCaptures + + 1 + + name + keyword.operator.assignment.tsx + + + end + (?=$|^|[,);}\]]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)) + patterns + + + include + #expression + + + + + begin + (?<!=|!)(=)(?!=) + beginCaptures + + 1 + + name + keyword.operator.assignment.tsx + + + end + (?=[,);}\]]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))|(?=^\s*$)|(?<![\|\&\+\-\*\/])(?<=\S)(?<!=)(?=\s*$) + patterns + + + include + #expression + + + + + + function-declaration + + name + meta.function.tsx + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?(?:(async)\s+)?(function\b)(?:\s*(\*))?(?:(?:\s+|(?<=\*))([_$[:alpha:]][_$[:alnum:]]*))?\s* + beginCaptures + + 1 + + name + keyword.control.export.tsx + + 2 + + name + storage.modifier.tsx + + 3 + + name + storage.modifier.async.tsx + + 4 + + name + storage.type.function.tsx + + 5 + + name + keyword.generator.asterisk.tsx + + 6 + + name + meta.definition.function.tsx entity.name.function.tsx + + + end + (?=;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b))|(?<=\}) + patterns + + + include + #function-name + + + include + #function-body + + + + function-expression + + name + meta.function.expression.tsx + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(async)\s+)?(function\b)(?:\s*(\*))?(?:(?:\s+|(?<=\*))([_$[:alpha:]][_$[:alnum:]]*))?\s* + beginCaptures + + 1 + + name + storage.modifier.async.tsx + + 2 + + name + storage.type.function.tsx + + 3 + + name + keyword.generator.asterisk.tsx + + 4 + + name + meta.definition.function.tsx entity.name.function.tsx + + + end + (?=;)|(?<=\}) + patterns + + + include + #function-name + + + include + #single-line-comment-consuming-line-ending + + + include + #function-body + + + + function-name + + name + meta.definition.function.tsx entity.name.function.tsx + match + [_$[:alpha:]][_$[:alnum:]]* + + function-body + + patterns + + + include + #comment + + + include + #type-parameters + + + include + #function-parameters + + + include + #return-type + + + include + #type-function-return-type + + + include + #decl-block + + + name + keyword.generator.asterisk.tsx + match + \* + + + + method-declaration + + patterns + + + name + meta.method.declaration.tsx + begin + (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(override)\s+)?(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?\s*\b(constructor)\b(?!:)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + beginCaptures + + 1 + + name + storage.modifier.tsx + + 2 + + name + storage.modifier.tsx + + 3 + + name + storage.modifier.tsx + + 4 + + name + storage.modifier.async.tsx + + 5 + + name + storage.type.tsx + + + end + (?=\}|;|,|$)|(?<=\}) + patterns + + + include + #method-declaration-name + + + include + #function-body + + + + + name + meta.method.declaration.tsx + begin + (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(override)\s+)?(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?(?:(?:\s*\b(new)\b(?!:)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|(?:(\*)\s*)?)(?=\s*((<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(]) + beginCaptures + + 1 + + name + storage.modifier.tsx + + 2 + + name + storage.modifier.tsx + + 3 + + name + storage.modifier.tsx + + 4 + + name + storage.modifier.async.tsx + + 5 + + name + keyword.operator.new.tsx + + 6 + + name + keyword.generator.asterisk.tsx + + + end + (?=\}|;|,|$)|(?<=\}) + patterns + + + include + #method-declaration-name + + + include + #function-body + + + + + name + meta.method.declaration.tsx + begin + (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(override)\s+)?(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?(?:\b(get|set)\s+)?(?:(\*)\s*)?(?=\s*(((\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?: + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3 + (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3 + (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3 + (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3 + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1 + (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1. + (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1 + (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1 +)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*((<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(]) + beginCaptures + + 1 + + name + storage.modifier.tsx + + 2 + + name + storage.modifier.tsx + + 3 + + name + storage.modifier.tsx + + 4 + + name + storage.modifier.async.tsx + + 5 + + name + storage.type.property.tsx + + 6 + + name + keyword.generator.asterisk.tsx + + + end + (?=\}|;|,|$)|(?<=\}) + patterns + + + include + #method-declaration-name + + + include + #function-body + + + + + + object-literal-method-declaration + + name + meta.method.declaration.tsx + begin + (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(async)\s+)?(?:\b(get|set)\s+)?(?:(\*)\s*)?(?=\s*(((\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?: + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3 + (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3 + (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3 + (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3 + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1 + (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1. + (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1 + (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1 +)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*((<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(]) + beginCaptures + + 1 + + name + storage.modifier.async.tsx + + 2 + + name + storage.type.property.tsx + + 3 + + name + keyword.generator.asterisk.tsx + + + end + (?=\}|;|,)|(?<=\}) + patterns + + + include + #method-declaration-name + + + include + #function-body + + + begin + (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(async)\s+)?(?:\b(get|set)\s+)?(?:(\*)\s*)?(?=\s*(((\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?: + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3 + (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3 + (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3 + (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3 + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1 + (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1. + (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1 + (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1 +)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*((<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(]) + beginCaptures + + 1 + + name + storage.modifier.async.tsx + + 2 + + name + storage.type.property.tsx + + 3 + + name + keyword.generator.asterisk.tsx + + + end + (?=\(|\<) + patterns + + + include + #method-declaration-name + + + + + + method-declaration-name + + begin + (?x)(?=((\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?: + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3 + (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3 + (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3 + (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3 + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1 + (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1. + (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1 + (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1 +)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??)\s*[\(\<]) + end + (?=\(|\<) + patterns + + + include + #string + + + include + #array-literal + + + include + #numeric-literal + + + name + meta.definition.method.tsx entity.name.function.tsx + match + [_$[:alpha:]][_$[:alnum:]]* + + + name + keyword.operator.optional.tsx + match + \? + + + + arrow-function + + patterns + + + name + meta.arrow.tsx + match + (?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(\basync)\s+)?([_$[:alpha:]][_$[:alnum:]]*)\s*(?==>) + captures + + 1 + + name + storage.modifier.async.tsx + + 2 + + name + variable.parameter.tsx + + + + + name + meta.arrow.tsx + begin + (?x) (?: + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(\basync) +)? ((?<![})!\]])\s* + (?= + # sure shot arrow functions even if => is on new line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) +) | +( + [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends +) | +# arrow function possible to detect only with => on same line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator +) + ) +) + beginCaptures + + 1 + + name + storage.modifier.async.tsx + + + end + (?==>|\{|(^\s*(export|function|class|interface|let|var|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|const|import|enum|namespace|module|type|abstract|declare)\s+)) + patterns + + + include + #comment + + + include + #type-parameters + + + include + #function-parameters + + + include + #arrow-return-type + + + include + #possibly-arrow-return-type + + + + + name + meta.arrow.tsx + begin + => + beginCaptures + + 0 + + name + storage.type.function.arrow.tsx + + + end + ((?<=\}|\S)(?<!=>)|((?!\{)(?=\S)))(?!\/[\/\*]) + patterns + + + include + #single-line-comment-consuming-line-ending + + + include + #decl-block + + + include + #expression + + + + + + indexer-declaration + + name + meta.indexer.declaration.tsx + begin + (?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(readonly)\s*)?\s*(\[)\s*([_$[:alpha:]][_$[:alnum:]]*)\s*(?=:) + beginCaptures + + 1 + + name + storage.modifier.tsx + + 2 + + name + meta.brace.square.tsx + + 3 + + name + variable.parameter.tsx + + + end + (\])\s*(\?\s*)?|$ + endCaptures + + 1 + + name + meta.brace.square.tsx + + 2 + + name + keyword.operator.optional.tsx + + + patterns + + + include + #type-annotation + + + + indexer-mapped-type-declaration + + name + meta.indexer.mappedtype.declaration.tsx + begin + (?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))([+-])?(readonly)\s*)?\s*(\[)\s*([_$[:alpha:]][_$[:alnum:]]*)\s+(in)\s+ + beginCaptures + + 1 + + name + keyword.operator.type.modifier.tsx + + 2 + + name + storage.modifier.tsx + + 3 + + name + meta.brace.square.tsx + + 4 + + name + entity.name.type.tsx + + 5 + + name + keyword.operator.expression.in.tsx + + + end + (\])([+-])?\s*(\?\s*)?|$ + endCaptures + + 1 + + name + meta.brace.square.tsx + + 2 + + name + keyword.operator.type.modifier.tsx + + 3 + + name + keyword.operator.optional.tsx + + + patterns + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+ + captures + + 1 + + name + keyword.control.as.tsx + + + + + include + #type + + + + function-parameters + + name + meta.parameters.tsx + begin + \( + beginCaptures + + 0 + + name + punctuation.definition.parameters.begin.tsx + + + end + \) + endCaptures + + 0 + + name + punctuation.definition.parameters.end.tsx + + + patterns + + + include + #function-parameters-body + + + + function-parameters-body + + patterns + + + include + #comment + + + include + #string + + + include + #decorator + + + include + #destructuring-parameter + + + include + #parameter-name + + + include + #parameter-type-annotation + + + include + #variable-initializer + + + name + punctuation.separator.parameter.tsx + match + , + + + + class-declaration + + name + meta.class.tsx + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(?:(abstract)\s+)?\b(class)\b(?=\s+|/[/*]) + beginCaptures + + 1 + + name + keyword.control.export.tsx + + 2 + + name + storage.modifier.tsx + + 3 + + name + storage.modifier.tsx + + 4 + + name + storage.type.class.tsx + + + end + (?<=\}) + patterns + + + include + #class-declaration-or-expression-patterns + + + + class-expression + + name + meta.class.tsx + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(abstract)\s+)?(class)\b(?=\s+|[<{]|\/[\/*]) + beginCaptures + + 1 + + name + storage.modifier.tsx + + 2 + + name + storage.type.class.tsx + + + end + (?<=\}) + patterns + + + include + #class-declaration-or-expression-patterns + + + + class-declaration-or-expression-patterns + + patterns + + + include + #comment + + + include + #class-or-interface-heritage + + + match + [_$[:alpha:]][_$[:alnum:]]* + captures + + 0 + + name + entity.name.type.class.tsx + + + + + include + #type-parameters + + + include + #class-or-interface-body + + + + interface-declaration + + name + meta.interface.tsx + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(?:(abstract)\s+)?\b(interface)\b(?=\s+|/[/*]) + beginCaptures + + 1 + + name + keyword.control.export.tsx + + 2 + + name + storage.modifier.tsx + + 3 + + name + storage.modifier.tsx + + 4 + + name + storage.type.interface.tsx + + + end + (?<=\}) + patterns + + + include + #comment + + + include + #class-or-interface-heritage + + + match + [_$[:alpha:]][_$[:alnum:]]* + captures + + 0 + + name + entity.name.type.interface.tsx + + + + + include + #type-parameters + + + include + #class-or-interface-body + + + + class-or-interface-heritage + + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(extends|implements)\b)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + beginCaptures + + 1 + + name + storage.modifier.tsx + + + end + (?=\{) + patterns + + + include + #comment + + + include + #class-or-interface-heritage + + + include + #type-parameters + + + include + #expressionWithoutIdentifiers + + + match + ([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))(?=\s*[_$[:alpha:]][_$[:alnum:]]*(\s*\??\.\s*[_$[:alpha:]][_$[:alnum:]]*)*\s*) + captures + + 1 + + name + entity.name.type.module.tsx + + 2 + + name + punctuation.accessor.tsx + + 3 + + name + punctuation.accessor.optional.tsx + + + + + match + ([_$[:alpha:]][_$[:alnum:]]*) + captures + + 1 + + name + entity.other.inherited-class.tsx + + + + + include + #expressionPunctuations + + + + class-or-interface-body + + begin + \{ + beginCaptures + + 0 + + name + punctuation.definition.block.tsx + + + end + \} + endCaptures + + 0 + + name + punctuation.definition.block.tsx + + + patterns + + + include + #comment + + + include + #decorator + + + begin + (?<=:)\s* + end + (?=\s|[;),}\]:\-\+]|;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b)) + patterns + + + include + #expression + + + + + include + #method-declaration + + + include + #indexer-declaration + + + include + #field-declaration + + + include + #string + + + include + #type-annotation + + + include + #variable-initializer + + + include + #access-modifier + + + include + #property-accessor + + + include + #async-modifier + + + include + #after-operator-block-as-object-literal + + + include + #decl-block + + + include + #expression + + + include + #punctuation-comma + + + include + #punctuation-semicolon + + + + access-modifier + + name + storage.modifier.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(abstract|declare|override|public|protected|private|readonly|static)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + property-accessor + + name + storage.type.property.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(accessor|get|set)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + async-modifier + + name + storage.modifier.async.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(async)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + enum-declaration + + name + meta.enum.declaration.tsx + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?(?:\b(const)\s+)?\b(enum)\s+([_$[:alpha:]][_$[:alnum:]]*) + beginCaptures + + 1 + + name + keyword.control.export.tsx + + 2 + + name + storage.modifier.tsx + + 3 + + name + storage.modifier.tsx + + 4 + + name + storage.type.enum.tsx + + 5 + + name + entity.name.type.enum.tsx + + + end + (?<=\}) + patterns + + + include + #comment + + + begin + \{ + beginCaptures + + 0 + + name + punctuation.definition.block.tsx + + + end + \} + endCaptures + + 0 + + name + punctuation.definition.block.tsx + + + patterns + + + include + #comment + + + begin + ([_$[:alpha:]][_$[:alnum:]]*) + beginCaptures + + 0 + + name + variable.other.enummember.tsx + + + end + (?=,|\}|$) + patterns + + + include + #comment + + + include + #variable-initializer + + + + + begin + (?=((\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))) + end + (?=,|\}|$) + patterns + + + include + #string + + + include + #array-literal + + + include + #comment + + + include + #variable-initializer + + + + + include + #punctuation-comma + + + + + + namespace-declaration + + name + meta.namespace.declaration.tsx + begin + (?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(namespace|module)\s+(?=[_$[:alpha:]"'`])) + beginCaptures + + 1 + + name + keyword.control.export.tsx + + 2 + + name + storage.modifier.tsx + + 3 + + name + storage.type.namespace.tsx + + + end + (?<=\})|(?=;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b)) + patterns + + + include + #comment + + + include + #string + + + name + entity.name.type.module.tsx + match + ([_$[:alpha:]][_$[:alnum:]]*) + + + include + #punctuation-accessor + + + include + #decl-block + + + + type-alias-declaration + + name + meta.type.declaration.tsx + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(type)\b\s+([_$[:alpha:]][_$[:alnum:]]*)\s* + beginCaptures + + 1 + + name + keyword.control.export.tsx + + 2 + + name + storage.modifier.tsx + + 3 + + name + storage.type.type.tsx + + 4 + + name + entity.name.type.alias.tsx + + + end + (?=\}|;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b)) + patterns + + + include + #comment + + + include + #type-parameters + + + begin + (=)\s*(intrinsic)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + beginCaptures + + 1 + + name + keyword.operator.assignment.tsx + + 2 + + name + keyword.control.intrinsic.tsx + + + end + (?=\}|;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b)) + patterns + + + include + #type + + + + + begin + (=)\s* + beginCaptures + + 1 + + name + keyword.operator.assignment.tsx + + + end + (?=\}|;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b)) + patterns + + + include + #type + + + + + + import-equals-declaration + + patterns + + + name + meta.import-equals.external.tsx + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(import)(?:\s+(type))?\s+([_$[:alpha:]][_$[:alnum:]]*)\s*(=)\s*(require)\s*(\() + beginCaptures + + 1 + + name + keyword.control.export.tsx + + 2 + + name + storage.modifier.tsx + + 3 + + name + keyword.control.import.tsx + + 4 + + name + keyword.control.type.tsx + + 5 + + name + variable.other.readwrite.alias.tsx + + 6 + + name + keyword.operator.assignment.tsx + + 7 + + name + keyword.control.require.tsx + + 8 + + name + meta.brace.round.tsx + + + end + \) + endCaptures + + 0 + + name + meta.brace.round.tsx + + + patterns + + + include + #comment + + + include + #string + + + + + name + meta.import-equals.internal.tsx + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(import)(?:\s+(type))?\s+([_$[:alpha:]][_$[:alnum:]]*)\s*(=)\s*(?!require\b) + beginCaptures + + 1 + + name + keyword.control.export.tsx + + 2 + + name + storage.modifier.tsx + + 3 + + name + keyword.control.import.tsx + + 4 + + name + keyword.control.type.tsx + + 5 + + name + variable.other.readwrite.alias.tsx + + 6 + + name + keyword.operator.assignment.tsx + + + end + (?=;|$|^) + patterns + + + include + #single-line-comment-consuming-line-ending + + + include + #comment + + + match + ([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]]))) + captures + + 1 + + name + entity.name.type.module.tsx + + 2 + + name + punctuation.accessor.tsx + + 3 + + name + punctuation.accessor.optional.tsx + + + + + name + variable.other.readwrite.tsx + match + ([_$[:alpha:]][_$[:alnum:]]*) + + + + + + import-declaration + + name + meta.import.tsx + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(import)(?:\s+(type)(?!\s+from))?(?!\s*[:\(])(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + beginCaptures + + 1 + + name + keyword.control.export.tsx + + 2 + + name + storage.modifier.tsx + + 3 + + name + keyword.control.import.tsx + + 4 + + name + keyword.control.type.tsx + + + end + (?<!^import|[^\._$[:alnum:]]import)(?=;|$|^) + patterns + + + include + #single-line-comment-consuming-line-ending + + + include + #comment + + + include + #string + + + begin + (?<=^import|[^\._$[:alnum:]]import)(?!\s*["']) + end + \bfrom\b + endCaptures + + 0 + + name + keyword.control.from.tsx + + + patterns + + + include + #import-export-declaration + + + + + include + #import-export-declaration + + + + export-declaration + + patterns + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(export)\s+(as)\s+(namespace)\s+([_$[:alpha:]][_$[:alnum:]]*) + captures + + 1 + + name + keyword.control.export.tsx + + 2 + + name + keyword.control.as.tsx + + 3 + + name + storage.type.namespace.tsx + + 4 + + name + entity.name.type.module.tsx + + + + + name + meta.export.default.tsx + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(export)(?:\s+(type))?(?:(?:\s*(=))|(?:\s+(default)(?=\s+))) + beginCaptures + + 1 + + name + keyword.control.export.tsx + + 2 + + name + keyword.control.type.tsx + + 3 + + name + keyword.operator.assignment.tsx + + 4 + + name + keyword.control.default.tsx + + + end + (?=$|;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b)) + patterns + + + include + #interface-declaration + + + include + #expression + + + + + name + meta.export.tsx + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(export)(?:\s+(type))?\b(?!(\$)|(\s*:))((?=\s*[\{*])|((?=\s*[_$[:alpha:]][_$[:alnum:]]*(\s|,))(?!\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b))) + beginCaptures + + 1 + + name + keyword.control.export.tsx + + 2 + + name + keyword.control.type.tsx + + + end + (?=$|;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b)) + patterns + + + include + #import-export-declaration + + + + + + import-export-declaration + + patterns + + + include + #comment + + + include + #string + + + include + #import-export-block + + + name + keyword.control.from.tsx + match + \bfrom\b + + + include + #import-export-assert-clause + + + include + #import-export-clause + + + + import-export-assert-clause + + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(with)|(assert))\s*(\{) + beginCaptures + + 1 + + name + keyword.control.with.tsx + + 2 + + name + keyword.control.assert.tsx + + 3 + + name + punctuation.definition.block.tsx + + + end + \} + endCaptures + + 0 + + name + punctuation.definition.block.tsx + + + patterns + + + include + #comment + + + include + #string + + + name + meta.object-literal.key.tsx + match + (?:[_$[:alpha:]][_$[:alnum:]]*)\s*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*:) + + + name + punctuation.separator.key-value.tsx + match + : + + + + import-export-block + + name + meta.block.tsx + begin + \{ + beginCaptures + + 0 + + name + punctuation.definition.block.tsx + + + end + \} + endCaptures + + 0 + + name + punctuation.definition.block.tsx + + + patterns + + + include + #import-export-clause + + + + import-export-clause + + patterns + + + include + #comment + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(?:(\btype)\s+)?(?:(\bdefault)|(\*)|(\b[_$[:alpha:]][_$[:alnum:]]*)|((\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))))\s+(as)\s+(?:(default(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|([_$[:alpha:]][_$[:alnum:]]*)|((\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))) + captures + + 1 + + name + keyword.control.type.tsx + + 2 + + name + keyword.control.default.tsx + + 3 + + name + constant.language.import-export-all.tsx + + 4 + + name + variable.other.readwrite.tsx + + 5 + + name + string.quoted.alias.tsx + + 12 + + name + keyword.control.as.tsx + + 13 + + name + keyword.control.default.tsx + + 14 + + name + variable.other.readwrite.alias.tsx + + 15 + + name + string.quoted.alias.tsx + + + + + include + #punctuation-comma + + + name + constant.language.import-export-all.tsx + match + \* + + + name + keyword.control.default.tsx + match + \b(default)\b + + + match + (?:(\btype)\s+)?(?:([_$[:alpha:]][_$[:alnum:]]*)|((\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))) + captures + + 1 + + name + keyword.control.type.tsx + + 2 + + name + variable.other.readwrite.alias.tsx + + 3 + + name + string.quoted.alias.tsx + + + + + + switch-statement + + name + switch-statement.expr.tsx + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?=\bswitch\s*\() + end + \} + endCaptures + + 0 + + name + punctuation.definition.block.tsx + + + patterns + + + include + #comment + + + name + switch-expression.expr.tsx + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(switch)\s*(\() + beginCaptures + + 1 + + name + keyword.control.switch.tsx + + 2 + + name + meta.brace.round.tsx + + + end + \) + endCaptures + + 0 + + name + meta.brace.round.tsx + + + patterns + + + include + #expression + + + + + name + switch-block.expr.tsx + begin + \{ + beginCaptures + + 0 + + name + punctuation.definition.block.tsx + + + end + (?=\}) + patterns + + + name + case-clause.expr.tsx + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(case|default(?=:))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + beginCaptures + + 1 + + name + keyword.control.switch.tsx + + + end + (?=:) + patterns + + + include + #expression + + + + + begin + (:)\s*(\{) + beginCaptures + + 1 + + name + case-clause.expr.tsx punctuation.definition.section.case-statement.tsx + + 2 + + name + meta.block.tsx punctuation.definition.block.tsx + + + end + \} + endCaptures + + 0 + + name + meta.block.tsx punctuation.definition.block.tsx + + + contentName + meta.block.tsx + patterns + + + include + #statements + + + + + match + (:) + captures + + 0 + + name + case-clause.expr.tsx punctuation.definition.section.case-statement.tsx + + + + + include + #statements + + + + + + for-loop + + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))for(?=((\s+|(\s*\/\*([^\*]|(\*[^\/]))*\*\/\s*))await)?\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)?(\()) + beginCaptures + + 0 + + name + keyword.control.loop.tsx + + + end + (?<=\)) + patterns + + + include + #comment + + + name + keyword.control.loop.tsx + match + await + + + begin + \( + beginCaptures + + 0 + + name + meta.brace.round.tsx + + + end + \) + endCaptures + + 0 + + name + meta.brace.round.tsx + + + patterns + + + include + #var-expr + + + include + #expression + + + include + #punctuation-semicolon + + + + + + if-statement + + patterns + + + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?=\bif\s*(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))\s*(?!\{)) + end + (?=;|$|\}) + patterns + + + include + #comment + + + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(if)\s*(\() + beginCaptures + + 1 + + name + keyword.control.conditional.tsx + + 2 + + name + meta.brace.round.tsx + + + end + \) + endCaptures + + 0 + + name + meta.brace.round.tsx + + + patterns + + + include + #expression + + + + + name + string.regexp.tsx + begin + (?<=\))\s*\/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)*\])+\/([dgimsuvy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$])) + beginCaptures + + 0 + + name + punctuation.definition.string.begin.tsx + + + end + (/)([dgimsuvy]*) + endCaptures + + 1 + + name + punctuation.definition.string.end.tsx + + 2 + + name + keyword.other.tsx + + + patterns + + + include + #regexp + + + + + include + #statements + + + + + + decl-block + + name + meta.block.tsx + begin + \{ + beginCaptures + + 0 + + name + punctuation.definition.block.tsx + + + end + \} + endCaptures + + 0 + + name + punctuation.definition.block.tsx + + + patterns + + + include + #statements + + + + after-operator-block-as-object-literal + + name + meta.objectliteral.tsx + begin + (?<!\+\+|--)(?<=[:=(,\[?+!>]|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^yield|[^\._$[:alnum:]]yield|^throw|[^\._$[:alnum:]]throw|^in|[^\._$[:alnum:]]in|^of|[^\._$[:alnum:]]of|^typeof|[^\._$[:alnum:]]typeof|&&|\|\||\*)\s*(\{) + beginCaptures + + 1 + + name + punctuation.definition.block.tsx + + + end + \} + endCaptures + + 0 + + name + punctuation.definition.block.tsx + + + patterns + + + include + #object-member + + + + object-literal + + name + meta.objectliteral.tsx + begin + \{ + beginCaptures + + 0 + + name + punctuation.definition.block.tsx + + + end + \} + endCaptures + + 0 + + name + punctuation.definition.block.tsx + + + patterns + + + include + #object-member + + + + object-member + + patterns + + + include + #comment + + + include + #object-literal-method-declaration + + + name + meta.object.member.tsx meta.object-literal.key.tsx + begin + (?=\[) + end + (?=:)|((?<=[\]])(?=\s*[\(\<])) + patterns + + + include + #comment + + + include + #array-literal + + + + + name + meta.object.member.tsx meta.object-literal.key.tsx + begin + (?=[\'\"\`]) + end + (?=:)|((?<=[\'\"\`])(?=((\s*[\(\<,}])|(\s+(as|satisifies)\s+)))) + patterns + + + include + #comment + + + include + #string + + + + + name + meta.object.member.tsx meta.object-literal.key.tsx + begin + (?x)(?=(\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?: + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3 + (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3 + (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3 + (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3 + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1 + (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1. + (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1 + (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1 +)(?!\$))) + end + (?=:)|(?=\s*([\(\<,}])|(\s+as|satisifies\s+)) + patterns + + + include + #comment + + + include + #numeric-literal + + + + + name + meta.method.declaration.tsx + begin + (?<=[\]\'\"\`])(?=\s*[\(\<]) + end + (?=\}|;|,)|(?<=\}) + patterns + + + include + #function-body + + + + + name + meta.object.member.tsx + match + (?![_$[:alpha:]])([[:digit:]]+)\s*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*:) + captures + + 0 + + name + meta.object-literal.key.tsx + + 1 + + name + constant.numeric.decimal.tsx + + + + + name + meta.object.member.tsx + match + (?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\s*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*:(\s*\/\*([^\*]|(\*[^\/]))*\*\/)*\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) +) | +( + [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends +) | +# arrow function possible to detect only with => on same line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator +) + )) +))) + captures + + 0 + + name + meta.object-literal.key.tsx + + 1 + + name + entity.name.function.tsx + + + + + name + meta.object.member.tsx + match + (?:[_$[:alpha:]][_$[:alnum:]]*)\s*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*:) + captures + + 0 + + name + meta.object-literal.key.tsx + + + + + name + meta.object.member.tsx + begin + \.\.\. + beginCaptures + + 0 + + name + keyword.operator.spread.tsx + + + end + (?=,|\}) + patterns + + + include + #expression + + + + + name + meta.object.member.tsx + match + ([_$[:alpha:]][_$[:alnum:]]*)\s*(?=,|\}|$|\/\/|\/\*) + captures + + 1 + + name + variable.other.readwrite.tsx + + + + + name + meta.object.member.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+(const)(?=\s*([,}]|$)) + captures + + 1 + + name + keyword.control.as.tsx + + 2 + + name + storage.modifier.tsx + + + + + name + meta.object.member.tsx + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(as)|(satisfies))\s+ + beginCaptures + + 1 + + name + keyword.control.as.tsx + + 2 + + name + keyword.control.satisfies.tsx + + + end + (?=[;),}\]:?\-\+\>]|\|\||\&\&|\!\=\=|$|^|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as|satisifies)\s+)) + patterns + + + include + #type + + + + + name + meta.object.member.tsx + begin + (?=[_$[:alpha:]][_$[:alnum:]]*\s*=) + end + (?=,|\}|$|\/\/|\/\*) + patterns + + + include + #expression + + + + + name + meta.object.member.tsx + begin + : + beginCaptures + + 0 + + name + meta.object-literal.key.tsx punctuation.separator.key-value.tsx + + + end + (?=,|\}) + patterns + + + begin + (?<=:)\s*(async)?(?=\s*(<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)\(\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))) + beginCaptures + + 1 + + name + storage.modifier.async.tsx + + + end + (?<=\)) + patterns + + + include + #type-parameters + + + begin + \( + beginCaptures + + 0 + + name + meta.brace.round.tsx + + + end + \) + endCaptures + + 0 + + name + meta.brace.round.tsx + + + patterns + + + include + #expression-inside-possibly-arrow-parens + + + + + + + begin + (?<=:)\s*(async)?\s*(\()(?=\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))) + beginCaptures + + 1 + + name + storage.modifier.async.tsx + + 2 + + name + meta.brace.round.tsx + + + end + \) + endCaptures + + 0 + + name + meta.brace.round.tsx + + + patterns + + + include + #expression-inside-possibly-arrow-parens + + + + + begin + (?<=:)\s*(async)?\s*(?=\<\s*$) + beginCaptures + + 1 + + name + storage.modifier.async.tsx + + + end + (?<=\>) + patterns + + + include + #type-parameters + + + + + begin + (?<=\>)\s*(\()(?=\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))) + beginCaptures + + 1 + + name + meta.brace.round.tsx + + + end + \) + endCaptures + + 0 + + name + meta.brace.round.tsx + + + patterns + + + include + #expression-inside-possibly-arrow-parens + + + + + include + #possibly-arrow-return-type + + + include + #expression + + + + + include + #punctuation-comma + + + include + #decl-block + + + + ternary-expression + + begin + (?!\?\.\s*[^[:digit:]])(\?)(?!\?) + beginCaptures + + 1 + + name + keyword.operator.ternary.tsx + + + end + \s*(:) + endCaptures + + 1 + + name + keyword.operator.ternary.tsx + + + patterns + + + include + #expression + + + + function-call + + patterns + + + begin + (?=(((([_$[:alpha:]][_$[:alnum:]]*)(\s*\??\.\s*(\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\)]))\s*(?:(\?\.\s*)|(\!))?((<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)?\()) + end + (?<=\))(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\s*\??\.\s*(\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\)]))\s*(?:(\?\.\s*)|(\!))?((<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)?\()) + patterns + + + name + meta.function-call.tsx + begin + (?=(([_$[:alpha:]][_$[:alnum:]]*)(\s*\??\.\s*(\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*)) + end + (?=\s*(?:(\?\.\s*)|(\!))?((<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)?\()) + patterns + + + include + #function-call-target + + + + + include + #comment + + + include + #function-call-optionals + + + include + #type-arguments + + + include + #paren-expression + + + + + begin + (?=(((([_$[:alpha:]][_$[:alnum:]]*)(\s*\??\.\s*(\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\)]))(<\s*[\{\[\(]\s*$)) + end + (?<=\>)(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\s*\??\.\s*(\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\)]))(<\s*[\{\[\(]\s*$)) + patterns + + + name + meta.function-call.tsx + begin + (?=(([_$[:alpha:]][_$[:alnum:]]*)(\s*\??\.\s*(\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*)) + end + (?=(<\s*[\{\[\(]\s*$)) + patterns + + + include + #function-call-target + + + + + include + #comment + + + include + #function-call-optionals + + + include + #type-arguments + + + + + + function-call-target + + patterns + + + include + #support-function-call-identifiers + + + name + entity.name.function.tsx + match + (\#?[_$[:alpha:]][_$[:alnum:]]*) + + + + function-call-optionals + + patterns + + + name + meta.function-call.tsx punctuation.accessor.optional.tsx + match + \?\. + + + name + meta.function-call.tsx keyword.operator.definiteassignment.tsx + match + \! + + + + support-function-call-identifiers + + patterns + + + include + #literal + + + include + #support-objects + + + include + #object-identifiers + + + include + #punctuation-accessor + + + name + keyword.operator.expression.import.tsx + match + (?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))import(?=\s*[\(]\s*[\"\'\`])) + + + + new-expr + + name + new.expr.tsx + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(new)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + beginCaptures + + 1 + + name + keyword.operator.new.tsx + + + end + (?<=\))|(?=[;),}\]:?\-\+\>]|\|\||\&\&|\!\=\=|$|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))new(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))function((\s+[_$[:alpha:]][_$[:alnum:]]*)|(\s*[\(])))) + patterns + + + include + #expression + + + + instanceof-expr + + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(instanceof)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + beginCaptures + + 1 + + name + keyword.operator.expression.instanceof.tsx + + + end + (?<=\))|(?=[;),}\]:?\-\+\>]|\|\||\&\&|\!\=\=|$|(===|!==|==|!=)|(([\&\~\^\|]\s*)?[_$[:alpha:]][_$[:alnum:]]*\s+instanceof(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))function((\s+[_$[:alpha:]][_$[:alnum:]]*)|(\s*[\(])))) + patterns + + + include + #type + + + + paren-expression-possibly-arrow + + patterns + + + begin + (?<=[(=,])\s*(async)?(?=\s*((<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?\(\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))) + beginCaptures + + 1 + + name + storage.modifier.async.tsx + + + end + (?<=\)) + patterns + + + include + #paren-expression-possibly-arrow-with-typeparameters + + + + + begin + (?<=[(=,]|=>|^return|[^\._$[:alnum:]]return)\s*(async)?(?=\s*((((<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?\()|(<)|((<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)))\s*$) + beginCaptures + + 1 + + name + storage.modifier.async.tsx + + + end + (?<=\)) + patterns + + + include + #paren-expression-possibly-arrow-with-typeparameters + + + + + include + #possibly-arrow-return-type + + + + paren-expression-possibly-arrow-with-typeparameters + + patterns + + + include + #type-parameters + + + begin + \( + beginCaptures + + 0 + + name + meta.brace.round.tsx + + + end + \) + endCaptures + + 0 + + name + meta.brace.round.tsx + + + patterns + + + include + #expression-inside-possibly-arrow-parens + + + + + + expression-inside-possibly-arrow-parens + + patterns + + + include + #expressionWithoutIdentifiers + + + include + #comment + + + include + #string + + + include + #decorator + + + include + #destructuring-parameter + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(override|public|protected|private|readonly)\s+(?=(override|public|protected|private|readonly)\s+) + captures + + 1 + + name + storage.modifier.tsx + + + + + match + (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(override|public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)(?=\s* +# function assignment | +(=\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) +) | +( + [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends +) | +# arrow function possible to detect only with => on same line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator +) + )) +)) | +# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) => +(:\s*( + (<) | + ([(]\s*( + ([)]) | + (\.\.\.) | + ([_$[:alnum:]]+\s*( + ([:,?=])| + ([)]\s*=>) + )) + )) +)) | +(:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) | +(:\s*((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) | +(:\s*(=>|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) +) | +( + [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends +) | +# arrow function possible to detect only with => on same line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator +) + )) +))) + captures + + 1 + + name + storage.modifier.tsx + + 2 + + name + keyword.operator.rest.tsx + + 3 + + name + entity.name.function.tsx variable.language.this.tsx + + 4 + + name + entity.name.function.tsx + + 5 + + name + keyword.operator.optional.tsx + + + + + match + (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(override|public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)(?=\s*[:,]|$) + captures + + 1 + + name + storage.modifier.tsx + + 2 + + name + keyword.operator.rest.tsx + + 3 + + name + variable.parameter.tsx variable.language.this.tsx + + 4 + + name + variable.parameter.tsx + + 5 + + name + keyword.operator.optional.tsx + + + + + include + #type-annotation + + + include + #variable-initializer + + + name + punctuation.separator.parameter.tsx + match + , + + + include + #identifiers + + + include + #expressionPunctuations + + + + paren-expression + + begin + \( + beginCaptures + + 0 + + name + meta.brace.round.tsx + + + end + \) + endCaptures + + 0 + + name + meta.brace.round.tsx + + + patterns + + + include + #expression + + + + cast + + patterns + + + include + #jsx + + + + expression-operators + + patterns + + + name + keyword.control.flow.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(await)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(yield)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))(?=\s*\/\*([^\*]|(\*[^\/]))*\*\/\s*\*) + beginCaptures + + 1 + + name + keyword.control.flow.tsx + + + end + \* + endCaptures + + 0 + + name + keyword.generator.asterisk.tsx + + + patterns + + + include + #comment + + + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(yield)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))(?:\s*(\*))? + captures + + 1 + + name + keyword.control.flow.tsx + + 2 + + name + keyword.generator.asterisk.tsx + + + + + name + keyword.operator.expression.delete.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))delete(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + name + keyword.operator.expression.in.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))in(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))(?!\() + + + name + keyword.operator.expression.of.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))of(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))(?!\() + + + name + keyword.operator.expression.instanceof.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))instanceof(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + name + keyword.operator.new.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))new(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + include + #typeof-operator + + + name + keyword.operator.expression.void.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))void(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+(const)(?=\s*($|[;,:})\]])) + captures + + 1 + + name + keyword.control.as.tsx + + 2 + + name + storage.modifier.tsx + + + + + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(as)|(satisfies))\s+ + beginCaptures + + 1 + + name + keyword.control.as.tsx + + 2 + + name + keyword.control.satisfies.tsx + + + end + (?=^|[;),}\]:?\-\+\>]|\|\||\&\&|\!\=\=|$|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as|satisfies)\s+)|(\s+\<)) + patterns + + + include + #type + + + + + name + keyword.operator.spread.tsx + match + \.\.\. + + + name + keyword.operator.assignment.compound.tsx + match + \*=|(?<!\()/=|%=|\+=|\-= + + + name + keyword.operator.assignment.compound.bitwise.tsx + match + \&=|\^=|<<=|>>=|>>>=|\|= + + + name + keyword.operator.bitwise.shift.tsx + match + <<|>>>|>> + + + name + keyword.operator.comparison.tsx + match + ===|!==|==|!= + + + name + keyword.operator.relational.tsx + match + <=|>=|<>|<|> + + + match + (?<=[_$[:alnum:]])(\!)\s*(?:(/=)|(?:(/)(?![/*]))) + captures + + 1 + + name + keyword.operator.logical.tsx + + 2 + + name + keyword.operator.assignment.compound.tsx + + 3 + + name + keyword.operator.arithmetic.tsx + + + + + name + keyword.operator.logical.tsx + match + \!|&&|\|\||\?\? + + + name + keyword.operator.bitwise.tsx + match + \&|~|\^|\| + + + name + keyword.operator.assignment.tsx + match + \= + + + name + keyword.operator.decrement.tsx + match + -- + + + name + keyword.operator.increment.tsx + match + \+\+ + + + name + keyword.operator.arithmetic.tsx + match + %|\*|/|-|\+ + + + begin + (?<=[_$[:alnum:])\]])\s*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\s*)+(?:(/=)|(?:(/)(?![/*])))) + end + (?:(/=)|(?:(/)(?!\*([^\*]|(\*[^\/]))*\*\/))) + endCaptures + + 1 + + name + keyword.operator.assignment.compound.tsx + + 2 + + name + keyword.operator.arithmetic.tsx + + + patterns + + + include + #comment + + + + + match + (?<=[_$[:alnum:])\]])\s*(?:(/=)|(?:(/)(?![/*]))) + captures + + 1 + + name + keyword.operator.assignment.compound.tsx + + 2 + + name + keyword.operator.arithmetic.tsx + + + + + + typeof-operator + + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))typeof(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + beginCaptures + + 0 + + name + keyword.operator.expression.typeof.tsx + + + end + (?=[,);}\]=>:&|{\?]|(extends\s+)|$|;|^\s*$|(?:^\s*(?:abstract|async|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|var|while)\b)) + patterns + + + include + #type-arguments + + + include + #expression + + + + literal + + patterns + + + include + #numeric-literal + + + include + #boolean-literal + + + include + #null-literal + + + include + #undefined-literal + + + include + #numericConstant-literal + + + include + #array-literal + + + include + #this-literal + + + include + #super-literal + + + + array-literal + + name + meta.array.literal.tsx + begin + \s*(\[) + beginCaptures + + 1 + + name + meta.brace.square.tsx + + + end + \] + endCaptures + + 0 + + name + meta.brace.square.tsx + + + patterns + + + include + #expression + + + include + #punctuation-comma + + + + numeric-literal + + patterns + + + name + constant.numeric.hex.tsx + match + \b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$) + captures + + 1 + + name + storage.type.numeric.bigint.tsx + + + + + name + constant.numeric.binary.tsx + match + \b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$) + captures + + 1 + + name + storage.type.numeric.bigint.tsx + + + + + name + constant.numeric.octal.tsx + match + \b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$) + captures + + 1 + + name + storage.type.numeric.bigint.tsx + + + + + match + (?x) +(?<!\$)(?: + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3 + (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3 + (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3 + (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3 + (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1 + (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1. + (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1 + (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1 +)(?!\$) + captures + + 0 + + name + constant.numeric.decimal.tsx + + 1 + + name + meta.delimiter.decimal.period.tsx + + 2 + + name + storage.type.numeric.bigint.tsx + + 3 + + name + meta.delimiter.decimal.period.tsx + + 4 + + name + storage.type.numeric.bigint.tsx + + 5 + + name + meta.delimiter.decimal.period.tsx + + 6 + + name + storage.type.numeric.bigint.tsx + + 7 + + name + storage.type.numeric.bigint.tsx + + 8 + + name + meta.delimiter.decimal.period.tsx + + 9 + + name + storage.type.numeric.bigint.tsx + + 10 + + name + meta.delimiter.decimal.period.tsx + + 11 + + name + storage.type.numeric.bigint.tsx + + 12 + + name + meta.delimiter.decimal.period.tsx + + 13 + + name + storage.type.numeric.bigint.tsx + + 14 + + name + storage.type.numeric.bigint.tsx + + + + + + boolean-literal + + patterns + + + name + constant.language.boolean.true.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))true(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + name + constant.language.boolean.false.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))false(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + + null-literal + + name + constant.language.null.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))null(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + this-literal + + name + variable.language.this.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))this\b(?!\$) + + super-literal + + name + variable.language.super.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))super\b(?!\$) + + undefined-literal + + name + constant.language.undefined.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))undefined(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + numericConstant-literal + + patterns + + + name + constant.language.nan.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))NaN(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + name + constant.language.infinity.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Infinity(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + + support-objects + + patterns + + + name + variable.language.arguments.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(arguments)\b(?!\$) + + + name + support.class.builtin.tsx + match + (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(Array|ArrayBuffer|Atomics|BigInt|BigInt64Array|BigUint64Array|Boolean|DataView|Date|Float32Array + |Float64Array|Function|Generator|GeneratorFunction|Int8Array|Int16Array|Int32Array|Intl|Map|Number|Object|Proxy + |Reflect|RegExp|Set|SharedArrayBuffer|SIMD|String|Symbol|TypedArray + |Uint8Array|Uint16Array|Uint32Array|Uint8ClampedArray|WeakMap|WeakSet)\b(?!\$) + + + name + support.class.error.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))((Eval|Internal|Range|Reference|Syntax|Type|URI)?Error)\b(?!\$) + + + name + support.class.promise.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(Promise)\b(?!\$) + + + name + support.function.tsx + match + (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(clear(Interval|Timeout)|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|eval| + isFinite|isNaN|parseFloat|parseInt|require|set(Interval|Timeout)|super|unescape|uneval)(?=\s*\() + + + match + (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(Math)(?:\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(?: + (abs|acos|acosh|asin|asinh|atan|atan2|atanh|cbrt|ceil|clz32|cos|cosh|exp| + expm1|floor|fround|hypot|imul|log|log10|log1p|log2|max|min|pow|random| + round|sign|sin|sinh|sqrt|tan|tanh|trunc) + | + (E|LN10|LN2|LOG10E|LOG2E|PI|SQRT1_2|SQRT2)))?\b(?!\$) + captures + + 1 + + name + support.constant.math.tsx + + 2 + + name + punctuation.accessor.tsx + + 3 + + name + punctuation.accessor.optional.tsx + + 4 + + name + support.function.math.tsx + + 5 + + name + support.constant.property.math.tsx + + + + + match + (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(console)(?:\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*( + assert|clear|count|debug|dir|error|group|groupCollapsed|groupEnd|info|log + |profile|profileEnd|table|time|timeEnd|timeStamp|trace|warn))?\b(?!\$) + captures + + 1 + + name + support.class.console.tsx + + 2 + + name + punctuation.accessor.tsx + + 3 + + name + punctuation.accessor.optional.tsx + + 4 + + name + support.function.console.tsx + + + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(JSON)(?:\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(parse|stringify))?\b(?!\$) + captures + + 1 + + name + support.constant.json.tsx + + 2 + + name + punctuation.accessor.tsx + + 3 + + name + punctuation.accessor.optional.tsx + + 4 + + name + support.function.json.tsx + + + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(import)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(meta)\b(?!\$) + captures + + 1 + + name + keyword.control.import.tsx + + 2 + + name + punctuation.accessor.tsx + + 3 + + name + punctuation.accessor.optional.tsx + + 4 + + name + support.variable.property.importmeta.tsx + + + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(new)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(target)\b(?!\$) + captures + + 1 + + name + keyword.operator.new.tsx + + 2 + + name + punctuation.accessor.tsx + + 3 + + name + punctuation.accessor.optional.tsx + + 4 + + name + support.variable.property.target.tsx + + + + + match + (?x) (?:(\.)|(\?\.(?!\s*[[:digit:]]))) \s* (?: + (?:(constructor|length|prototype|__proto__)\b(?!\$|\s*(<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?\()) + | + (?:(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\b(?!\$))) + captures + + 1 + + name + punctuation.accessor.tsx + + 2 + + name + punctuation.accessor.optional.tsx + + 3 + + name + support.variable.property.tsx + + 4 + + name + support.constant.tsx + + + + + match + (?x) (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.)) \b (?: + (document|event|navigator|performance|screen|window) + | + (AnalyserNode|ArrayBufferView|Attr|AudioBuffer|AudioBufferSourceNode|AudioContext|AudioDestinationNode|AudioListener + |AudioNode|AudioParam|BatteryManager|BeforeUnloadEvent|BiquadFilterNode|Blob|BufferSource|ByteString|CSS|CSSConditionRule + |CSSCounterStyleRule|CSSGroupingRule|CSSMatrix|CSSMediaRule|CSSPageRule|CSSPrimitiveValue|CSSRule|CSSRuleList|CSSStyleDeclaration + |CSSStyleRule|CSSStyleSheet|CSSSupportsRule|CSSValue|CSSValueList|CanvasGradient|CanvasImageSource|CanvasPattern + |CanvasRenderingContext2D|ChannelMergerNode|ChannelSplitterNode|CharacterData|ChromeWorker|CloseEvent|Comment|CompositionEvent + |Console|ConvolverNode|Coordinates|Credential|CredentialsContainer|Crypto|CryptoKey|CustomEvent|DOMError|DOMException + |DOMHighResTimeStamp|DOMImplementation|DOMString|DOMStringList|DOMStringMap|DOMTimeStamp|DOMTokenList|DataTransfer + |DataTransferItem|DataTransferItemList|DedicatedWorkerGlobalScope|DelayNode|DeviceProximityEvent|DirectoryEntry + |DirectoryEntrySync|DirectoryReader|DirectoryReaderSync|Document|DocumentFragment|DocumentTouch|DocumentType|DragEvent + |DynamicsCompressorNode|Element|Entry|EntrySync|ErrorEvent|Event|EventListener|EventSource|EventTarget|FederatedCredential + |FetchEvent|File|FileEntry|FileEntrySync|FileException|FileList|FileReader|FileReaderSync|FileSystem|FileSystemSync + |FontFace|FormData|GainNode|Gamepad|GamepadButton|GamepadEvent|Geolocation|GlobalEventHandlers|HTMLAnchorElement + |HTMLAreaElement|HTMLAudioElement|HTMLBRElement|HTMLBaseElement|HTMLBodyElement|HTMLButtonElement|HTMLCanvasElement + |HTMLCollection|HTMLContentElement|HTMLDListElement|HTMLDataElement|HTMLDataListElement|HTMLDialogElement|HTMLDivElement + |HTMLDocument|HTMLElement|HTMLEmbedElement|HTMLFieldSetElement|HTMLFontElement|HTMLFormControlsCollection|HTMLFormElement + |HTMLHRElement|HTMLHeadElement|HTMLHeadingElement|HTMLHtmlElement|HTMLIFrameElement|HTMLImageElement|HTMLInputElement + |HTMLKeygenElement|HTMLLIElement|HTMLLabelElement|HTMLLegendElement|HTMLLinkElement|HTMLMapElement|HTMLMediaElement + |HTMLMetaElement|HTMLMeterElement|HTMLModElement|HTMLOListElement|HTMLObjectElement|HTMLOptGroupElement|HTMLOptionElement + |HTMLOptionsCollection|HTMLOutputElement|HTMLParagraphElement|HTMLParamElement|HTMLPreElement|HTMLProgressElement + |HTMLQuoteElement|HTMLScriptElement|HTMLSelectElement|HTMLShadowElement|HTMLSourceElement|HTMLSpanElement|HTMLStyleElement + |HTMLTableCaptionElement|HTMLTableCellElement|HTMLTableColElement|HTMLTableDataCellElement|HTMLTableElement|HTMLTableHeaderCellElement + |HTMLTableRowElement|HTMLTableSectionElement|HTMLTextAreaElement|HTMLTimeElement|HTMLTitleElement|HTMLTrackElement + |HTMLUListElement|HTMLUnknownElement|HTMLVideoElement|HashChangeEvent|History|IDBCursor|IDBCursorWithValue|IDBDatabase + |IDBEnvironment|IDBFactory|IDBIndex|IDBKeyRange|IDBMutableFile|IDBObjectStore|IDBOpenDBRequest|IDBRequest|IDBTransaction + |IDBVersionChangeEvent|IIRFilterNode|IdentityManager|ImageBitmap|ImageBitmapFactories|ImageData|Index|InputDeviceCapabilities + |InputEvent|InstallEvent|InstallTrigger|KeyboardEvent|LinkStyle|LocalFileSystem|LocalFileSystemSync|Location|MIDIAccess + |MIDIConnectionEvent|MIDIInput|MIDIInputMap|MIDIOutputMap|MediaElementAudioSourceNode|MediaError|MediaKeyMessageEvent + |MediaKeySession|MediaKeyStatusMap|MediaKeySystemAccess|MediaKeySystemConfiguration|MediaKeys|MediaRecorder|MediaStream + |MediaStreamAudioDestinationNode|MediaStreamAudioSourceNode|MessageChannel|MessageEvent|MessagePort|MouseEvent + |MutationObserver|MutationRecord|NamedNodeMap|Navigator|NavigatorConcurrentHardware|NavigatorGeolocation|NavigatorID + |NavigatorLanguage|NavigatorOnLine|Node|NodeFilter|NodeIterator|NodeList|NonDocumentTypeChildNode|Notification + |OfflineAudioCompletionEvent|OfflineAudioContext|OscillatorNode|PageTransitionEvent|PannerNode|ParentNode|PasswordCredential + |Path2D|PaymentAddress|PaymentRequest|PaymentResponse|Performance|PerformanceEntry|PerformanceFrameTiming|PerformanceMark + |PerformanceMeasure|PerformanceNavigation|PerformanceNavigationTiming|PerformanceObserver|PerformanceObserverEntryList + |PerformanceResourceTiming|PerformanceTiming|PeriodicSyncEvent|PeriodicWave|Plugin|Point|PointerEvent|PopStateEvent + |PortCollection|Position|PositionError|PositionOptions|PresentationConnectionClosedEvent|PresentationConnectionList + |PresentationReceiver|ProcessingInstruction|ProgressEvent|PromiseRejectionEvent|PushEvent|PushRegistrationManager + |RTCCertificate|RTCConfiguration|RTCPeerConnection|RTCSessionDescriptionCallback|RTCStatsReport|RadioNodeList|RandomSource + |Range|ReadableByteStream|RenderingContext|SVGAElement|SVGAngle|SVGAnimateColorElement|SVGAnimateElement|SVGAnimateMotionElement + |SVGAnimateTransformElement|SVGAnimatedAngle|SVGAnimatedBoolean|SVGAnimatedEnumeration|SVGAnimatedInteger|SVGAnimatedLength + |SVGAnimatedLengthList|SVGAnimatedNumber|SVGAnimatedNumberList|SVGAnimatedPoints|SVGAnimatedPreserveAspectRatio + |SVGAnimatedRect|SVGAnimatedString|SVGAnimatedTransformList|SVGAnimationElement|SVGCircleElement|SVGClipPathElement + |SVGCursorElement|SVGDefsElement|SVGDescElement|SVGElement|SVGEllipseElement|SVGEvent|SVGFilterElement|SVGFontElement + |SVGFontFaceElement|SVGFontFaceFormatElement|SVGFontFaceNameElement|SVGFontFaceSrcElement|SVGFontFaceUriElement + |SVGForeignObjectElement|SVGGElement|SVGGlyphElement|SVGGradientElement|SVGHKernElement|SVGImageElement|SVGLength + |SVGLengthList|SVGLineElement|SVGLinearGradientElement|SVGMPathElement|SVGMaskElement|SVGMatrix|SVGMissingGlyphElement + |SVGNumber|SVGNumberList|SVGPathElement|SVGPatternElement|SVGPoint|SVGPolygonElement|SVGPolylineElement|SVGPreserveAspectRatio + |SVGRadialGradientElement|SVGRect|SVGRectElement|SVGSVGElement|SVGScriptElement|SVGSetElement|SVGStopElement|SVGStringList + |SVGStylable|SVGStyleElement|SVGSwitchElement|SVGSymbolElement|SVGTRefElement|SVGTSpanElement|SVGTests|SVGTextElement + |SVGTextPositioningElement|SVGTitleElement|SVGTransform|SVGTransformList|SVGTransformable|SVGUseElement|SVGVKernElement + |SVGViewElement|ServiceWorker|ServiceWorkerContainer|ServiceWorkerGlobalScope|ServiceWorkerRegistration|ServiceWorkerState + |ShadowRoot|SharedWorker|SharedWorkerGlobalScope|SourceBufferList|StereoPannerNode|Storage|StorageEvent|StyleSheet + |StyleSheetList|SubtleCrypto|SyncEvent|Text|TextMetrics|TimeEvent|TimeRanges|Touch|TouchEvent|TouchList|Transferable + |TreeWalker|UIEvent|USVString|VRDisplayCapabilities|ValidityState|WaveShaperNode|WebGL|WebGLActiveInfo|WebGLBuffer + |WebGLContextEvent|WebGLFramebuffer|WebGLProgram|WebGLRenderbuffer|WebGLRenderingContext|WebGLShader|WebGLShaderPrecisionFormat + |WebGLTexture|WebGLTimerQueryEXT|WebGLTransformFeedback|WebGLUniformLocation|WebGLVertexArrayObject|WebGLVertexArrayObjectOES + |WebSocket|WebSockets|WebVTT|WheelEvent|Window|WindowBase64|WindowEventHandlers|WindowTimers|Worker|WorkerGlobalScope + |WorkerLocation|WorkerNavigator|XMLHttpRequest|XMLHttpRequestEventTarget|XMLSerializer|XPathExpression|XPathResult + |XSLTProcessor))\b(?!\$) + captures + + 1 + + name + support.variable.dom.tsx + + 2 + + name + support.class.dom.tsx + + + + + match + (?x) (?:(\.)|(\?\.(?!\s*[[:digit:]]))) \s* (?: + (ATTRIBUTE_NODE|CDATA_SECTION_NODE|COMMENT_NODE|DOCUMENT_FRAGMENT_NODE|DOCUMENT_NODE|DOCUMENT_TYPE_NODE + |DOMSTRING_SIZE_ERR|ELEMENT_NODE|ENTITY_NODE|ENTITY_REFERENCE_NODE|HIERARCHY_REQUEST_ERR|INDEX_SIZE_ERR + |INUSE_ATTRIBUTE_ERR|INVALID_CHARACTER_ERR|NO_DATA_ALLOWED_ERR|NO_MODIFICATION_ALLOWED_ERR|NOT_FOUND_ERR + |NOT_SUPPORTED_ERR|NOTATION_NODE|PROCESSING_INSTRUCTION_NODE|TEXT_NODE|WRONG_DOCUMENT_ERR) + | + (_content|[xyz]|abbr|above|accept|acceptCharset|accessKey|action|align|[av]Link(?:color)?|all|alt|anchors|appCodeName + |appCore|applets|appMinorVersion|appName|appVersion|archive|areas|arguments|attributes|availHeight|availLeft|availTop + |availWidth|axis|background|backgroundColor|backgroundImage|below|bgColor|body|border|borderBottomWidth|borderColor + |borderLeftWidth|borderRightWidth|borderStyle|borderTopWidth|borderWidth|bottom|bufferDepth|callee|caller|caption + |cellPadding|cells|cellSpacing|ch|characterSet|charset|checked|childNodes|chOff|cite|classes|className|clear + |clientInformation|clip|clipBoardData|closed|code|codeBase|codeType|color|colorDepth|cols|colSpan|compact|complete + |components|content|controllers|cookie|cookieEnabled|cords|cpuClass|crypto|current|data|dateTime|declare|defaultCharset + |defaultChecked|defaultSelected|defaultStatus|defaultValue|defaultView|defer|description|dialogArguments|dialogHeight + |dialogLeft|dialogTop|dialogWidth|dir|directories|disabled|display|docmain|doctype|documentElement|elements|embeds + |enabledPlugin|encoding|enctype|entities|event|expando|external|face|fgColor|filename|firstChild|fontFamily|fontSize + |fontWeight|form|formName|forms|frame|frameBorder|frameElement|frames|hasFocus|hash|headers|height|history|host + |hostname|href|hreflang|hspace|htmlFor|httpEquiv|id|ids|ignoreCase|images|implementation|index|innerHeight|innerWidth + |input|isMap|label|lang|language|lastChild|lastIndex|lastMatch|lastModified|lastParen|layer[sXY]|left|leftContext + |lineHeight|link|linkColor|links|listStyleType|localName|location|locationbar|longDesc|lowsrc|lowSrc|marginBottom + |marginHeight|marginLeft|marginRight|marginTop|marginWidth|maxLength|media|menubar|method|mimeTypes|multiline|multiple + |name|nameProp|namespaces|namespaceURI|next|nextSibling|nodeName|nodeType|nodeValue|noHref|noResize|noShade|notationName + |notations|noWrap|object|offscreenBuffering|onLine|onreadystatechange|opener|opsProfile|options|oscpu|outerHeight + |outerWidth|ownerDocument|paddingBottom|paddingLeft|paddingRight|paddingTop|page[XY]|page[XY]Offset|parent|parentLayer + |parentNode|parentWindow|pathname|personalbar|pixelDepth|pkcs11|platform|plugins|port|prefix|previous|previousDibling + |product|productSub|profile|profileend|prompt|prompter|protocol|publicId|readOnly|readyState|referrer|rel|responseText + |responseXML|rev|right|rightContext|rowIndex|rows|rowSpan|rules|scheme|scope|screen[XY]|screenLeft|screenTop|scripts + |scrollbars|scrolling|sectionRowIndex|security|securityPolicy|selected|selectedIndex|selection|self|shape|siblingAbove + |siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary + |systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead + |title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile + |vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\b(?!\$|\s*(<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?\() + captures + + 1 + + name + punctuation.accessor.tsx + + 2 + + name + punctuation.accessor.optional.tsx + + 3 + + name + support.constant.dom.tsx + + 4 + + name + support.variable.property.dom.tsx + + + + + name + support.class.node.tsx + match + (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(Buffer|EventEmitter|Server|Pipe|Socket|REPLServer|ReadStream|WriteStream|Stream + |Inflate|Deflate|InflateRaw|DeflateRaw|GZip|GUnzip|Unzip|Zip)\b(?!\$) + + + match + (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(process)(?:(?:(\.)|(\?\.(?!\s*[[:digit:]])))(?: + (arch|argv|config|connected|env|execArgv|execPath|exitCode|mainModule|pid|platform|release|stderr|stdin|stdout|title|version|versions) + | + (abort|chdir|cwd|disconnect|exit|[sg]ete?[gu]id|send|[sg]etgroups|initgroups|kill|memoryUsage|nextTick|umask|uptime|hrtime) +))?\b(?!\$) + captures + + 1 + + name + support.variable.object.process.tsx + + 2 + + name + punctuation.accessor.tsx + + 3 + + name + punctuation.accessor.optional.tsx + + 4 + + name + support.variable.property.process.tsx + + 5 + + name + support.function.process.tsx + + + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(exports)|(module)(?:(?:(\.)|(\?\.(?!\s*[[:digit:]])))(exports|id|filename|loaded|parent|children))?)\b(?!\$) + captures + + 1 + + name + support.type.object.module.tsx + + 2 + + name + support.type.object.module.tsx + + 3 + + name + punctuation.accessor.tsx + + 4 + + name + punctuation.accessor.optional.tsx + + 5 + + name + support.type.object.module.tsx + + + + + name + support.variable.object.node.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(global|GLOBAL|root|__dirname|__filename)\b(?!\$) + + + match + (?x) (?:(\.)|(\?\.(?!\s*[[:digit:]]))) \s* +(?: + (on(?:Rowsinserted|Rowsdelete|Rowenter|Rowexit|Resize|Resizestart|Resizeend|Reset| + Readystatechange|Mouseout|Mouseover|Mousedown|Mouseup|Mousemove| + Before(?:cut|deactivate|unload|update|paste|print|editfocus|activate)| + Blur|Scrolltop|Submit|Select|Selectstart|Selectionchange|Hover|Help| + Change|Contextmenu|Controlselect|Cut|Cellchange|Clock|Close|Deactivate| + Datasetchanged|Datasetcomplete|Dataavailable|Drop|Drag|Dragstart|Dragover| + Dragdrop|Dragenter|Dragend|Dragleave|Dblclick|Unload|Paste|Propertychange|Error| + Errorupdate|Keydown|Keyup|Keypress|Focus|Load|Activate|Afterupdate|Afterprint|Abort) + ) | + (shift|showModelessDialog|showModalDialog|showHelp|scroll|scrollX|scrollByPages| + scrollByLines|scrollY|scrollTo|stop|strike|sizeToContent|sidebar|signText|sort| + sup|sub|substr|substring|splice|split|send|set(?:Milliseconds|Seconds|Minutes|Hours| + Month|Year|FullYear|Date|UTC(?:Milliseconds|Seconds|Minutes|Hours|Month|FullYear|Date)| + Time|Hotkeys|Cursor|ZOptions|Active|Resizable|RequestHeader)|search|slice| + savePreferences|small|home|handleEvent|navigate|char|charCodeAt|charAt|concat| + contextual|confirm|compile|clear|captureEvents|call|createStyleSheet|createPopup| + createEventObject|to(?:GMTString|UTCString|String|Source|UpperCase|LowerCase|LocaleString)| + test|taint|taintEnabled|indexOf|italics|disableExternalCapture|dump|detachEvent|unshift| + untaint|unwatch|updateCommands|join|javaEnabled|pop|push|plugins.refresh|paddings|parse| + print|prompt|preference|enableExternalCapture|exec|execScript|valueOf|UTC|find|file| + fileModifiedDate|fileSize|fileCreatedDate|fileUpdatedDate|fixed|fontsize|fontcolor| + forward|fromCharCode|watch|link|load|lastIndexOf|anchor|attachEvent|atob|apply|alert| + abort|routeEvents|resize|resizeBy|resizeTo|recalc|returnValue|replace|reverse|reload| + releaseCapture|releaseEvents|go|get(?:Milliseconds|Seconds|Minutes|Hours|Month|Day|Year|FullYear| + Time|Date|TimezoneOffset|UTC(?:Milliseconds|Seconds|Minutes|Hours|Day|Month|FullYear|Date)| + Attention|Selection|ResponseHeader|AllResponseHeaders)|moveBy|moveBelow|moveTo| + moveToAbsolute|moveAbove|mergeAttributes|match|margins|btoa|big|bold|borderWidths|blink|back + ) | + (acceptNode|add|addEventListener|addTextTrack|adoptNode|after|animate|append| + appendChild|appendData|before|blur|canPlayType|captureStream| + caretPositionFromPoint|caretRangeFromPoint|checkValidity|clear|click| + cloneContents|cloneNode|cloneRange|close|closest|collapse| + compareBoundaryPoints|compareDocumentPosition|comparePoint|contains| + convertPointFromNode|convertQuadFromNode|convertRectFromNode|createAttribute| + createAttributeNS|createCaption|createCDATASection|createComment| + createContextualFragment|createDocument|createDocumentFragment| + createDocumentType|createElement|createElementNS|createEntityReference| + createEvent|createExpression|createHTMLDocument|createNodeIterator| + createNSResolver|createProcessingInstruction|createRange|createShadowRoot| + createTBody|createTextNode|createTFoot|createTHead|createTreeWalker|delete| + deleteCaption|deleteCell|deleteContents|deleteData|deleteRow|deleteTFoot| + deleteTHead|detach|disconnect|dispatchEvent|elementFromPoint|elementsFromPoint| + enableStyleSheetsForSet|entries|evaluate|execCommand|exitFullscreen| + exitPointerLock|expand|extractContents|fastSeek|firstChild|focus|forEach|get| + getAll|getAnimations|getAttribute|getAttributeNames|getAttributeNode| + getAttributeNodeNS|getAttributeNS|getBoundingClientRect|getBoxQuads| + getClientRects|getContext|getDestinationInsertionPoints|getElementById| + getElementsByClassName|getElementsByName|getElementsByTagName| + getElementsByTagNameNS|getItem|getNamedItem|getSelection|getStartDate| + getVideoPlaybackQuality|has|hasAttribute|hasAttributeNS|hasAttributes| + hasChildNodes|hasFeature|hasFocus|importNode|initEvent|insertAdjacentElement| + insertAdjacentHTML|insertAdjacentText|insertBefore|insertCell|insertData| + insertNode|insertRow|intersectsNode|isDefaultNamespace|isEqualNode| + isPointInRange|isSameNode|item|key|keys|lastChild|load|lookupNamespaceURI| + lookupPrefix|matches|move|moveAttribute|moveAttributeNode|moveChild| + moveNamedItem|namedItem|nextNode|nextSibling|normalize|observe|open| + parentNode|pause|play|postMessage|prepend|preventDefault|previousNode| + previousSibling|probablySupportsContext|queryCommandEnabled| + queryCommandIndeterm|queryCommandState|queryCommandSupported|queryCommandValue| + querySelector|querySelectorAll|registerContentHandler|registerElement| + registerProtocolHandler|releaseCapture|releaseEvents|remove|removeAttribute| + removeAttributeNode|removeAttributeNS|removeChild|removeEventListener| + removeItem|replace|replaceChild|replaceData|replaceWith|reportValidity| + requestFullscreen|requestPointerLock|reset|scroll|scrollBy|scrollIntoView| + scrollTo|seekToNextFrame|select|selectNode|selectNodeContents|set|setAttribute| + setAttributeNode|setAttributeNodeNS|setAttributeNS|setCapture| + setCustomValidity|setEnd|setEndAfter|setEndBefore|setItem|setNamedItem| + setRangeText|setSelectionRange|setSinkId|setStart|setStartAfter|setStartBefore| + slice|splitText|stepDown|stepUp|stopImmediatePropagation|stopPropagation| + submit|substringData|supports|surroundContents|takeRecords|terminate|toBlob| + toDataURL|toggle|toString|values|write|writeln + ) | + (all|catch|finally|race|reject|resolve|then + ) +)(?=\s*\() + captures + + 1 + + name + punctuation.accessor.tsx + + 2 + + name + punctuation.accessor.optional.tsx + + 3 + + name + support.function.event-handler.tsx + + 4 + + name + support.function.tsx + + 5 + + name + support.function.dom.tsx + + 6 + + name + support.function.promise.tsx + + + + + + identifiers + + patterns + + + include + #object-identifiers + + + match + (?x)(?:(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\s*=\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) +) | +( + [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends +) | +# arrow function possible to detect only with => on same line +( + (<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*(((const\s+)?[_$[:alpha:]])|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator +) + )) +)) + captures + + 1 + + name + punctuation.accessor.tsx + + 2 + + name + punctuation.accessor.optional.tsx + + 3 + + name + entity.name.function.tsx + + + + + match + (?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(\#?[[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]]) + captures + + 1 + + name + punctuation.accessor.tsx + + 2 + + name + punctuation.accessor.optional.tsx + + 3 + + name + variable.other.constant.property.tsx + + + + + match + (?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(\#?[_$[:alpha:]][_$[:alnum:]]*) + captures + + 1 + + name + punctuation.accessor.tsx + + 2 + + name + punctuation.accessor.optional.tsx + + 3 + + name + variable.other.property.tsx + + + + + name + variable.other.constant.tsx + match + ([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]]) + + + name + variable.other.readwrite.tsx + match + [_$[:alpha:]][_$[:alnum:]]* + + + + object-identifiers + + patterns + + + name + support.class.tsx + match + ([_$[:alpha:]][_$[:alnum:]]*)(?=\s*\??\.\s*prototype\b(?!\$)) + + + match + (?x)(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(?: + (\#?[[:upper:]][_$[:digit:][:upper:]]*) | + (\#?[_$[:alpha:]][_$[:alnum:]]*) +)(?=\s*\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*) + captures + + 1 + + name + punctuation.accessor.tsx + + 2 + + name + punctuation.accessor.optional.tsx + + 3 + + name + variable.other.constant.object.property.tsx + + 4 + + name + variable.other.object.property.tsx + + + + + match + (?x)(?: + ([[:upper:]][_$[:digit:][:upper:]]*) | + ([_$[:alpha:]][_$[:alnum:]]*) +)(?=\s*\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*) + captures + + 1 + + name + variable.other.constant.object.tsx + + 2 + + name + variable.other.object.tsx + + + + + + type-annotation + + patterns + + + name + meta.type.annotation.tsx + begin + (:)(?=\s*\S) + beginCaptures + + 1 + + name + keyword.operator.type.annotation.tsx + + + end + (?<![:|&])(?!\s*[|&]\s+)((?=^|[,);\}\]]|//)|(?==[^>])|((?<=[\}>\]\)]|[_$[:alpha:]])\s*(?=\{))) + patterns + + + include + #type + + + + + name + meta.type.annotation.tsx + begin + (:) + beginCaptures + + 1 + + name + keyword.operator.type.annotation.tsx + + + end + (?<![:|&])((?=[,);\}\]]|\/\/)|(?==[^>])|(?=^\s*$)|((?<=[\}>\]\)]|[_$[:alpha:]])\s*(?=\{))) + patterns + + + include + #type + + + + + + parameter-type-annotation + + patterns + + + name + meta.type.annotation.tsx + begin + (:) + beginCaptures + + 1 + + name + keyword.operator.type.annotation.tsx + + + end + (?=[,)])|(?==[^>]) + patterns + + + include + #type + + + + + + return-type + + patterns + + + name + meta.return.type.tsx + begin + (?<=\))\s*(:)(?=\s*\S) + beginCaptures + + 1 + + name + keyword.operator.type.annotation.tsx + + + end + (?<![:|&])(?=$|^|[{};,]|//) + patterns + + + include + #return-type-core + + + + + name + meta.return.type.tsx + begin + (?<=\))\s*(:) + beginCaptures + + 1 + + name + keyword.operator.type.annotation.tsx + + + end + (?<![:|&])((?=[{};,]|//|^\s*$)|((?<=\S)(?=\s*$))) + patterns + + + include + #return-type-core + + + + + + return-type-core + + patterns + + + include + #comment + + + begin + (?<=[:|&])(?=\s*\{) + end + (?<=\}) + patterns + + + include + #type-object + + + + + include + #type-predicate-operator + + + include + #type + + + + arrow-return-type + + name + meta.return.type.arrow.tsx + begin + (?<=\))\s*(:) + beginCaptures + + 1 + + name + keyword.operator.type.annotation.tsx + + + end + (?==>|\{|(^\s*(export|function|class|interface|let|var|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|const|import|enum|namespace|module|type|abstract|declare)\s+)) + patterns + + + include + #arrow-return-type-body + + + + possibly-arrow-return-type + + begin + (?<=\)|^)\s*(:)(?=\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*=>) + beginCaptures + + 1 + + name + meta.arrow.tsx meta.return.type.arrow.tsx keyword.operator.type.annotation.tsx + + + end + (?==>|\{|(^\s*(export|function|class|interface|let|var|(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)|(?:\bawait\s+(?:\busing(?=\s+(?!in\b|of\b(?!\s*(?:of\b|=)))[_$[:alpha:]])\b)\b)|const|import|enum|namespace|module|type|abstract|declare)\s+)) + contentName + meta.arrow.tsx meta.return.type.arrow.tsx + patterns + + + include + #arrow-return-type-body + + + + arrow-return-type-body + + patterns + + + begin + (?<=[:])(?=\s*\{) + end + (?<=\}) + patterns + + + include + #type-object + + + + + include + #type-predicate-operator + + + include + #type + + + + type-parameters + + name + meta.type.parameters.tsx + begin + (<) + beginCaptures + + 1 + + name + punctuation.definition.typeparameters.begin.tsx + + + end + (>) + endCaptures + + 1 + + name + punctuation.definition.typeparameters.end.tsx + + + patterns + + + include + #comment + + + name + storage.modifier.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(extends|in|out|const)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + include + #type + + + include + #punctuation-comma + + + name + keyword.operator.assignment.tsx + match + (=)(?!>) + + + + type-arguments + + name + meta.type.parameters.tsx + begin + \< + beginCaptures + + 0 + + name + punctuation.definition.typeparameters.begin.tsx + + + end + \> + endCaptures + + 0 + + name + punctuation.definition.typeparameters.end.tsx + + + patterns + + + include + #type-arguments-body + + + + type-arguments-body + + patterns + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(_)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + captures + + 0 + + name + keyword.operator.type.tsx + + + + + include + #type + + + include + #punctuation-comma + + + + type + + patterns + + + include + #comment + + + include + #type-string + + + include + #numeric-literal + + + include + #type-primitive + + + include + #type-builtin-literals + + + include + #type-parameters + + + include + #type-tuple + + + include + #type-object + + + include + #type-operators + + + include + #type-conditional + + + include + #type-fn-type-parameters + + + include + #type-paren-or-function-parameters + + + include + #type-function-return-type + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(readonly)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s* + captures + + 1 + + name + storage.modifier.tsx + + + + + include + #type-name + + + + type-primitive + + name + support.type.primitive.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(string|number|bigint|boolean|symbol|any|void|never|unknown)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + type-builtin-literals + + name + support.type.builtin.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(this|true|false|undefined|null|object)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + type-tuple + + name + meta.type.tuple.tsx + begin + \[ + beginCaptures + + 0 + + name + meta.brace.square.tsx + + + end + \] + endCaptures + + 0 + + name + meta.brace.square.tsx + + + patterns + + + name + keyword.operator.rest.tsx + match + \.\.\. + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))([_$[:alpha:]][_$[:alnum:]]*)\s*(\?)?\s*(:) + captures + + 1 + + name + entity.name.label.tsx + + 2 + + name + keyword.operator.optional.tsx + + 3 + + name + punctuation.separator.label.tsx + + + + + include + #type + + + include + #punctuation-comma + + + + type-object + + name + meta.object.type.tsx + begin + \{ + beginCaptures + + 0 + + name + punctuation.definition.block.tsx + + + end + \} + endCaptures + + 0 + + name + punctuation.definition.block.tsx + + + patterns + + + include + #comment + + + include + #method-declaration + + + include + #indexer-declaration + + + include + #indexer-mapped-type-declaration + + + include + #field-declaration + + + include + #type-annotation + + + begin + \.\.\. + beginCaptures + + 0 + + name + keyword.operator.spread.tsx + + + end + (?=\}|;|,|$)|(?<=\}) + patterns + + + include + #type + + + + + include + #punctuation-comma + + + include + #punctuation-semicolon + + + include + #type + + + + type-conditional + + patterns + + + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(extends)\s+ + beginCaptures + + 1 + + name + storage.modifier.tsx + + + end + (?<=:) + patterns + + + begin + \? + beginCaptures + + 0 + + name + keyword.operator.ternary.tsx + + + end + : + endCaptures + + 0 + + name + keyword.operator.ternary.tsx + + + patterns + + + include + #type + + + + + include + #type + + + + + + type-paren-or-function-parameters + + name + meta.type.paren.cover.tsx + begin + \( + beginCaptures + + 0 + + name + meta.brace.round.tsx + + + end + \) + endCaptures + + 0 + + name + meta.brace.round.tsx + + + patterns + + + match + (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\s*(\??)(?=\s*(:\s*( + (<) | + ([(]\s*( + ([)]) | + (\.\.\.) | + ([_$[:alnum:]]+\s*( + ([:,?=])| + ([)]\s*=>) + )) + )) +)) | +(:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) | +(:\s*((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))))) + captures + + 1 + + name + storage.modifier.tsx + + 2 + + name + keyword.operator.rest.tsx + + 3 + + name + entity.name.function.tsx variable.language.this.tsx + + 4 + + name + entity.name.function.tsx + + 5 + + name + keyword.operator.optional.tsx + + + + + match + (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\s*(\??)(?=:) + captures + + 1 + + name + storage.modifier.tsx + + 2 + + name + keyword.operator.rest.tsx + + 3 + + name + variable.parameter.tsx variable.language.this.tsx + + 4 + + name + variable.parameter.tsx + + 5 + + name + keyword.operator.optional.tsx + + + + + include + #type-annotation + + + name + punctuation.separator.parameter.tsx + match + , + + + include + #type + + + + type-fn-type-parameters + + patterns + + + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(abstract)\s+)?(new)\b(?=\s*\<) + beginCaptures + + 1 + + name + meta.type.constructor.tsx storage.modifier.tsx + + 2 + + name + meta.type.constructor.tsx keyword.control.new.tsx + + + end + (?<=>) + patterns + + + include + #comment + + + include + #type-parameters + + + + + name + meta.type.constructor.tsx + begin + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(abstract)\s+)?(new)\b\s*(?=\() + beginCaptures + + 1 + + name + storage.modifier.tsx + + 2 + + name + keyword.control.new.tsx + + + end + (?<=\)) + patterns + + + include + #function-parameters + + + + + name + meta.type.function.tsx + begin + (?x)( + (?= + [(]\s*( + ([)]) | + (\.\.\.) | + ([_$[:alnum:]]+\s*( + ([:,?=])| + ([)]\s*=>) + )) + ) + ) +) + end + (?<=\)) + patterns + + + include + #function-parameters + + + + + + type-function-return-type + + patterns + + + name + meta.type.function.return.tsx + begin + (=>)(?=\s*\S) + beginCaptures + + 1 + + name + storage.type.function.arrow.tsx + + + end + (?<!=>)(?<![|&])(?=[,\]\)\{\}=;>:\?]|//|$) + patterns + + + include + #type-function-return-type-core + + + + + name + meta.type.function.return.tsx + begin + => + beginCaptures + + 0 + + name + storage.type.function.arrow.tsx + + + end + (?<!=>)(?<![|&])((?=[,\]\)\{\}=;:\?>]|//|^\s*$)|((?<=\S)(?=\s*$))) + patterns + + + include + #type-function-return-type-core + + + + + + type-function-return-type-core + + patterns + + + include + #comment + + + begin + (?<==>)(?=\s*\{) + end + (?<=\}) + patterns + + + include + #type-object + + + + + include + #type-predicate-operator + + + include + #type + + + + type-operators + + patterns + + + include + #typeof-operator + + + include + #type-infer + + + begin + ([&|])(?=\s*\{) + beginCaptures + + 0 + + name + keyword.operator.type.tsx + + + end + (?<=\}) + patterns + + + include + #type-object + + + + + begin + [&|] + beginCaptures + + 0 + + name + keyword.operator.type.tsx + + + end + (?=\S) + + + name + keyword.operator.expression.keyof.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))keyof(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + name + keyword.operator.ternary.tsx + match + (\?|\:) + + + name + keyword.operator.expression.import.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))import(?=\s*\() + + + + type-infer + + patterns + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(infer)\s+([_$[:alpha:]][_$[:alnum:]]*)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))(?:\s+(extends)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))? + name + meta.type.infer.tsx + captures + + 1 + + name + keyword.operator.expression.infer.tsx + + 2 + + name + entity.name.type.tsx + + 3 + + name + keyword.operator.expression.extends.tsx + + + + + + type-predicate-operator + + patterns + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(asserts)\s+)?(?!asserts)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\s(is)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + captures + + 1 + + name + keyword.operator.type.asserts.tsx + + 2 + + name + variable.parameter.tsx variable.language.this.tsx + + 3 + + name + variable.parameter.tsx + + 4 + + name + keyword.operator.expression.is.tsx + + + + + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(asserts)\s+(?!is)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + captures + + 1 + + name + keyword.operator.type.asserts.tsx + + 2 + + name + variable.parameter.tsx variable.language.this.tsx + + 3 + + name + variable.parameter.tsx + + + + + name + keyword.operator.type.asserts.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))asserts(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + name + keyword.operator.expression.is.tsx + match + (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))is(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)) + + + + type-name + + patterns + + + begin + ([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(<) + captures + + 1 + + name + entity.name.type.module.tsx + + 2 + + name + punctuation.accessor.tsx + + 3 + + name + punctuation.accessor.optional.tsx + + 4 + + name + meta.type.parameters.tsx punctuation.definition.typeparameters.begin.tsx + + + end + (>) + endCaptures + + 1 + + name + meta.type.parameters.tsx punctuation.definition.typeparameters.end.tsx + + + contentName + meta.type.parameters.tsx + patterns + + + include + #type-arguments-body + + + + + begin + ([_$[:alpha:]][_$[:alnum:]]*)\s*(<) + beginCaptures + + 1 + + name + entity.name.type.tsx + + 2 + + name + meta.type.parameters.tsx punctuation.definition.typeparameters.begin.tsx + + + end + (>) + endCaptures + + 1 + + name + meta.type.parameters.tsx punctuation.definition.typeparameters.end.tsx + + + contentName + meta.type.parameters.tsx + patterns + + + include + #type-arguments-body + + + + + match + ([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]]))) + captures + + 1 + + name + entity.name.type.module.tsx + + 2 + + name + punctuation.accessor.tsx + + 3 + + name + punctuation.accessor.optional.tsx + + + + + name + entity.name.type.tsx + match + [_$[:alpha:]][_$[:alnum:]]* + + + + punctuation-comma + + name + punctuation.separator.comma.tsx + match + , + + punctuation-semicolon + + name + punctuation.terminator.statement.tsx + match + ; + + punctuation-accessor + + match + (?:(\.)|(\?\.(?!\s*[[:digit:]]))) + captures + + 1 + + name + punctuation.accessor.tsx + + 2 + + name + punctuation.accessor.optional.tsx + + + + string + + patterns + + + include + #qstring-single + + + include + #qstring-double + + + include + #template + + + + qstring-double + + name + string.quoted.double.tsx + begin + " + beginCaptures + + 0 + + name + punctuation.definition.string.begin.tsx + + + end + (")|((?:[^\\\n])$) + endCaptures + + 1 + + name + punctuation.definition.string.end.tsx + + 2 + + name + invalid.illegal.newline.tsx + + + patterns + + + include + #string-character-escape + + + + qstring-single + + name + string.quoted.single.tsx + begin + ' + beginCaptures + + 0 + + name + punctuation.definition.string.begin.tsx + + + end + (\')|((?:[^\\\n])$) + endCaptures + + 1 + + name + punctuation.definition.string.end.tsx + + 2 + + name + invalid.illegal.newline.tsx + + + patterns + + + include + #string-character-escape + + + + string-character-escape + + name + constant.character.escape.tsx + match + \\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|u\{[0-9A-Fa-f]+\}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$) + + template + + patterns + + + include + #template-call + + + contentName + string.template.tsx + begin + ([_$[:alpha:]][_$[:alnum:]]*)?(`) + beginCaptures + + 1 + + name + entity.name.function.tagged-template.tsx + + 2 + + name + string.template.tsx punctuation.definition.string.template.begin.tsx + + + end + ` + endCaptures + + 0 + + name + string.template.tsx punctuation.definition.string.template.end.tsx + + + patterns + + + include + #template-substitution-element + + + include + #string-character-escape + + + + + + template-call + + patterns + + + begin + (?=(([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*)(<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)?`) + end + (?=`) + patterns + + + begin + (?=(([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*)) + end + (?=(<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)?`) + patterns + + + include + #support-function-call-identifiers + + + name + entity.name.function.tagged-template.tsx + match + ([_$[:alpha:]][_$[:alnum:]]*) + + + + + include + #type-arguments + + + + + begin + ([_$[:alpha:]][_$[:alnum:]]*)?\s*(?=(<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)`) + beginCaptures + + 1 + + name + entity.name.function.tagged-template.tsx + + + end + (?=`) + patterns + + + include + #type-arguments + + + + + + template-substitution-element + + name + meta.template.expression.tsx + begin + \$\{ + beginCaptures + + 0 + + name + punctuation.definition.template-expression.begin.tsx + + + end + \} + endCaptures + + 0 + + name + punctuation.definition.template-expression.end.tsx + + + patterns + + + include + #expression + + + contentName + meta.embedded.line.tsx + + type-string + + patterns + + + include + #qstring-single + + + include + #qstring-double + + + include + #template-type + + + + template-type + + patterns + + + include + #template-call + + + contentName + string.template.tsx + begin + ([_$[:alpha:]][_$[:alnum:]]*)?(`) + beginCaptures + + 1 + + name + entity.name.function.tagged-template.tsx + + 2 + + name + string.template.tsx punctuation.definition.string.template.begin.tsx + + + end + ` + endCaptures + + 0 + + name + string.template.tsx punctuation.definition.string.template.end.tsx + + + patterns + + + include + #template-type-substitution-element + + + include + #string-character-escape + + + + + + template-type-substitution-element + + name + meta.template.expression.tsx + begin + \$\{ + beginCaptures + + 0 + + name + punctuation.definition.template-expression.begin.tsx + + + end + \} + endCaptures + + 0 + + name + punctuation.definition.template-expression.end.tsx + + + patterns + + + include + #type + + + contentName + meta.embedded.line.tsx + + regex + + patterns + + + name + string.regexp.tsx + begin + (?<!\+\+|--|})(?<=[=(:,\[?+!]|^return|[^\._$[:alnum:]]return|^case|[^\._$[:alnum:]]case|=>|&&|\|\||\*\/)\s*(\/)(?![\/*])(?=(?:[^\/\\\[\()]|\\.|\[([^\]\\]|\\.)+\]|\(([^\)\\]|\\.)+\))+\/([dgimsuvy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$])) + beginCaptures + + 1 + + name + punctuation.definition.string.begin.tsx + + + end + (/)([dgimsuvy]*) + endCaptures + + 1 + + name + punctuation.definition.string.end.tsx + + 2 + + name + keyword.other.tsx + + + patterns + + + include + #regexp + + + + + name + string.regexp.tsx + begin + ((?<![_$[:alnum:])\]]|\+\+|--|}|\*\/)|((?<=^return|[^\._$[:alnum:]]return|^case|[^\._$[:alnum:]]case))\s*)\/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)*\])+\/([dgimsuvy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$])) + beginCaptures + + 0 + + name + punctuation.definition.string.begin.tsx + + + end + (/)([dgimsuvy]*) + endCaptures + + 1 + + name + punctuation.definition.string.end.tsx + + 2 + + name + keyword.other.tsx + + + patterns + + + include + #regexp + + + + + + regexp + + patterns + + + name + keyword.control.anchor.regexp + match + \\[bB]|\^|\$ + + + match + \\[1-9]\d*|\\k<([a-zA-Z_$][\w$]*)> + captures + + 0 + + name + keyword.other.back-reference.regexp + + 1 + + name + variable.other.regexp + + + + + name + keyword.operator.quantifier.regexp + match + [?+*]|\{(\d+,\d+|\d+,|,\d+|\d+)\}\?? + + + name + keyword.operator.or.regexp + match + \| + + + name + meta.group.assertion.regexp + begin + (\()((\?=)|(\?!)|(\?<=)|(\?<!)) + beginCaptures + + 1 + + name + punctuation.definition.group.regexp + + 2 + + name + punctuation.definition.group.assertion.regexp + + 3 + + name + meta.assertion.look-ahead.regexp + + 4 + + name + meta.assertion.negative-look-ahead.regexp + + 5 + + name + meta.assertion.look-behind.regexp + + 6 + + name + meta.assertion.negative-look-behind.regexp + + + end + (\)) + endCaptures + + 1 + + name + punctuation.definition.group.regexp + + + patterns + + + include + #regexp + + + + + name + meta.group.regexp + begin + \((?:(\?:)|(?:\?<([a-zA-Z_$][\w$]*)>))? + beginCaptures + + 0 + + name + punctuation.definition.group.regexp + + 1 + + name + punctuation.definition.group.no-capture.regexp + + 2 + + name + variable.other.regexp + + + end + \) + endCaptures + + 0 + + name + punctuation.definition.group.regexp + + + patterns + + + include + #regexp + + + + + name + constant.other.character-class.set.regexp + begin + (\[)(\^)? + beginCaptures + + 1 + + name + punctuation.definition.character-class.regexp + + 2 + + name + keyword.operator.negation.regexp + + + end + (\]) + endCaptures + + 1 + + name + punctuation.definition.character-class.regexp + + + patterns + + + name + constant.other.character-class.range.regexp + match + (?:.|(\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\c[A-Z])|(\\.))\-(?:[^\]\\]|(\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\c[A-Z])|(\\.)) + captures + + 1 + + name + constant.character.numeric.regexp + + 2 + + name + constant.character.control.regexp + + 3 + + name + constant.character.escape.backslash.regexp + + 4 + + name + constant.character.numeric.regexp + + 5 + + name + constant.character.control.regexp + + 6 + + name + constant.character.escape.backslash.regexp + + + + + include + #regex-character-class + + + + + include + #regex-character-class + + + + regex-character-class + + patterns + + + name + constant.other.character-class.regexp + match + \\[wWsSdDtrnvf]|\. + + + name + constant.character.numeric.regexp + match + \\([0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}) + + + name + constant.character.control.regexp + match + \\c[A-Z] + + + name + constant.character.escape.backslash.regexp + match + \\. + + + + comment + + patterns + + + name + comment.block.documentation.tsx + begin + /\*\*(?!/) + beginCaptures + + 0 + + name + punctuation.definition.comment.tsx + + + end + \*/ + endCaptures + + 0 + + name + punctuation.definition.comment.tsx + + + patterns + + + include + #docblock + + + + + name + comment.block.tsx + begin + (/\*)(?:\s*((@)internal)(?=\s|(\*/)))? + beginCaptures + + 1 + + name + punctuation.definition.comment.tsx + + 2 + + name + storage.type.internaldeclaration.tsx + + 3 + + name + punctuation.decorator.internaldeclaration.tsx + + + end + \*/ + endCaptures + + 0 + + name + punctuation.definition.comment.tsx + + + + + begin + (^[ \t]+)?((//)(?:\s*((@)internal)(?=\s|$))?) + beginCaptures + + 1 + + name + punctuation.whitespace.comment.leading.tsx + + 2 + + name + comment.line.double-slash.tsx + + 3 + + name + punctuation.definition.comment.tsx + + 4 + + name + storage.type.internaldeclaration.tsx + + 5 + + name + punctuation.decorator.internaldeclaration.tsx + + + end + (?=$) + contentName + comment.line.double-slash.tsx + + + + single-line-comment-consuming-line-ending + + begin + (^[ \t]+)?((//)(?:\s*((@)internal)(?=\s|$))?) + beginCaptures + + 1 + + name + punctuation.whitespace.comment.leading.tsx + + 2 + + name + comment.line.double-slash.tsx + + 3 + + name + punctuation.definition.comment.tsx + + 4 + + name + storage.type.internaldeclaration.tsx + + 5 + + name + punctuation.decorator.internaldeclaration.tsx + + + end + (?=^) + contentName + comment.line.double-slash.tsx + + directives + + name + comment.line.triple-slash.directive.tsx + begin + ^(///)\s*(?=<(reference|amd-dependency|amd-module)(\s+(path|types|no-default-lib|lib|name|resolution-mode)\s*=\s*((\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)))+\s*/>\s*$) + beginCaptures + + 1 + + name + punctuation.definition.comment.tsx + + + end + (?=$) + patterns + + + name + meta.tag.tsx + begin + (<)(reference|amd-dependency|amd-module) + beginCaptures + + 1 + + name + punctuation.definition.tag.directive.tsx + + 2 + + name + entity.name.tag.directive.tsx + + + end + /> + endCaptures + + 0 + + name + punctuation.definition.tag.directive.tsx + + + patterns + + + name + entity.other.attribute-name.directive.tsx + match + path|types|no-default-lib|lib|name|resolution-mode + + + name + keyword.operator.assignment.tsx + match + = + + + include + #string + + + + + + docblock + + patterns + + + match + (?x) +((@)(?:access|api)) +\s+ +(private|protected|public) +\b + captures + + 1 + + name + storage.type.class.jsdoc + + 2 + + name + punctuation.definition.block.tag.jsdoc + + 3 + + name + constant.language.access-type.jsdoc + + + + + match + (?x) +((@)author) +\s+ +( + [^@\s<>*/] + (?:[^@<>*/]|\*[^/])* +) +(?: + \s* + (<) + ([^>\s]+) + (>) +)? + captures + + 1 + + name + storage.type.class.jsdoc + + 2 + + name + punctuation.definition.block.tag.jsdoc + + 3 + + name + entity.name.type.instance.jsdoc + + 4 + + name + punctuation.definition.bracket.angle.begin.jsdoc + + 5 + + name + constant.other.email.link.underline.jsdoc + + 6 + + name + punctuation.definition.bracket.angle.end.jsdoc + + + + + match + (?x) +((@)borrows) \s+ +((?:[^@\s*/]|\*[^/])+) # <that namepath> +\s+ (as) \s+ # as +((?:[^@\s*/]|\*[^/])+) # <this namepath> + captures + + 1 + + name + storage.type.class.jsdoc + + 2 + + name + punctuation.definition.block.tag.jsdoc + + 3 + + name + entity.name.type.instance.jsdoc + + 4 + + name + keyword.operator.control.jsdoc + + 5 + + name + entity.name.type.instance.jsdoc + + + + + name + meta.example.jsdoc + begin + ((@)example)\s+ + end + (?=@|\*/) + beginCaptures + + 1 + + name + storage.type.class.jsdoc + + 2 + + name + punctuation.definition.block.tag.jsdoc + + + patterns + + + match + ^\s\*\s+ + + + contentName + constant.other.description.jsdoc + begin + \G(<)caption(>) + beginCaptures + + 0 + + name + entity.name.tag.inline.jsdoc + + 1 + + name + punctuation.definition.bracket.angle.begin.jsdoc + + 2 + + name + punctuation.definition.bracket.angle.end.jsdoc + + + end + (</)caption(>)|(?=\*/) + endCaptures + + 0 + + name + entity.name.tag.inline.jsdoc + + 1 + + name + punctuation.definition.bracket.angle.begin.jsdoc + + 2 + + name + punctuation.definition.bracket.angle.end.jsdoc + + + + + match + [^\s@*](?:[^*]|\*[^/])* + captures + + 0 + + name + source.embedded.tsx + + + + + + + match + (?x) ((@)kind) \s+ (class|constant|event|external|file|function|member|mixin|module|namespace|typedef) \b + captures + + 1 + + name + storage.type.class.jsdoc + + 2 + + name + punctuation.definition.block.tag.jsdoc + + 3 + + name + constant.language.symbol-type.jsdoc + + + + + match + (?x) +((@)see) +\s+ +(?: + # URL + ( + (?=https?://) + (?:[^\s*]|\*[^/])+ + ) + | + # JSDoc namepath + ( + (?! + # Avoid matching bare URIs (also acceptable as links) + https?:// + | + # Avoid matching {@inline tags}; we match those below + (?:\[[^\[\]]*\])? # Possible description [preceding]{@tag} + {@(?:link|linkcode|linkplain|tutorial)\b + ) + # Matched namepath + (?:[^@\s*/]|\*[^/])+ + ) +) + captures + + 1 + + name + storage.type.class.jsdoc + + 2 + + name + punctuation.definition.block.tag.jsdoc + + 3 + + name + variable.other.link.underline.jsdoc + + 4 + + name + entity.name.type.instance.jsdoc + + + + + match + (?x) +((@)template) +\s+ +# One or more valid identifiers +( + [A-Za-z_$] # First character: non-numeric word character + [\w$.\[\]]* # Rest of identifier + (?: # Possible list of additional identifiers + \s* , \s* + [A-Za-z_$] + [\w$.\[\]]* + )* +) + captures + + 1 + + name + storage.type.class.jsdoc + + 2 + + name + punctuation.definition.block.tag.jsdoc + + 3 + + name + variable.other.jsdoc + + + + + begin + (?x)((@)template)\s+(?={) + beginCaptures + + 1 + + name + storage.type.class.jsdoc + + 2 + + name + punctuation.definition.block.tag.jsdoc + + + end + (?=\s|\*/|[^{}\[\]A-Za-z_$]) + patterns + + + include + #jsdoctype + + + name + variable.other.jsdoc + match + ([A-Za-z_$][\w$.\[\]]*) + + + + + match + (?x) +( + (@) + (?:arg|argument|const|constant|member|namespace|param|var) +) +\s+ +( + [A-Za-z_$] + [\w$.\[\]]* +) + captures + + 1 + + name + storage.type.class.jsdoc + + 2 + + name + punctuation.definition.block.tag.jsdoc + + 3 + + name + variable.other.jsdoc + + + + + begin + ((@)typedef)\s+(?={) + beginCaptures + + 1 + + name + storage.type.class.jsdoc + + 2 + + name + punctuation.definition.block.tag.jsdoc + + + end + (?=\s|\*/|[^{}\[\]A-Za-z_$]) + patterns + + + include + #jsdoctype + + + name + entity.name.type.instance.jsdoc + match + (?:[^@\s*/]|\*[^/])+ + + + + + begin + ((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\s+(?={) + beginCaptures + + 1 + + name + storage.type.class.jsdoc + + 2 + + name + punctuation.definition.block.tag.jsdoc + + + end + (?=\s|\*/|[^{}\[\]A-Za-z_$]) + patterns + + + include + #jsdoctype + + + name + variable.other.jsdoc + match + ([A-Za-z_$][\w$.\[\]]*) + + + name + variable.other.jsdoc + match + (?x) +(\[)\s* +[\w$]+ +(?: + (?:\[\])? # Foo[ ].bar properties within an array + \. # Foo.Bar namespaced parameter + [\w$]+ +)* +(?: + \s* + (=) # [foo=bar] Default parameter value + \s* + ( + # The inner regexes are to stop the match early at */ and to not stop at escaped quotes + (?> + "(?:(?:\*(?!/))|(?:\\(?!"))|[^*\\])*?" | # [foo="bar"] Double-quoted + '(?:(?:\*(?!/))|(?:\\(?!'))|[^*\\])*?' | # [foo='bar'] Single-quoted + \[ (?:(?:\*(?!/))|[^*])*? \] | # [foo=[1,2]] Array literal + (?:(?:\*(?!/))|\s(?!\s*\])|\[.*?(?:\]|(?=\*/))|[^*\s\[\]])* # Everything else + )* + ) +)? +\s*(?:(\])((?:[^*\s]|\*[^\s/])+)?|(?=\*/)) + captures + + 1 + + name + punctuation.definition.optional-value.begin.bracket.square.jsdoc + + 2 + + name + keyword.operator.assignment.jsdoc + + 3 + + name + source.embedded.tsx + + 4 + + name + punctuation.definition.optional-value.end.bracket.square.jsdoc + + 5 + + name + invalid.illegal.syntax.jsdoc + + + + + + + begin + (?x) +( + (@) + (?:define|enum|exception|export|extends|lends|implements|modifies + |namespace|private|protected|returns?|satisfies|suppress|this|throws|type + |yields?) +) +\s+(?={) + beginCaptures + + 1 + + name + storage.type.class.jsdoc + + 2 + + name + punctuation.definition.block.tag.jsdoc + + + end + (?=\s|\*/|[^{}\[\]A-Za-z_$]) + patterns + + + include + #jsdoctype + + + + + match + (?x) +( + (@) + (?:alias|augments|callback|constructs|emits|event|fires|exports? + |extends|external|function|func|host|lends|listens|interface|memberof!? + |method|module|mixes|mixin|name|requires|see|this|typedef|uses) +) +\s+ +( + (?: + [^{}@\s*] | \*[^/] + )+ +) + captures + + 1 + + name + storage.type.class.jsdoc + + 2 + + name + punctuation.definition.block.tag.jsdoc + + 3 + + name + entity.name.type.instance.jsdoc + + + + + contentName + variable.other.jsdoc + begin + ((@)(?:default(?:value)?|license|version))\s+(([''"])) + beginCaptures + + 1 + + name + storage.type.class.jsdoc + + 2 + + name + punctuation.definition.block.tag.jsdoc + + 3 + + name + variable.other.jsdoc + + 4 + + name + punctuation.definition.string.begin.jsdoc + + + end + (\3)|(?=$|\*/) + endCaptures + + 0 + + name + variable.other.jsdoc + + 1 + + name + punctuation.definition.string.end.jsdoc + + + + + match + ((@)(?:default(?:value)?|license|tutorial|variation|version))\s+([^\s*]+) + captures + + 1 + + name + storage.type.class.jsdoc + + 2 + + name + punctuation.definition.block.tag.jsdoc + + 3 + + name + variable.other.jsdoc + + + + + name + storage.type.class.jsdoc + match + (?x) (@) (?:abstract|access|alias|api|arg|argument|async|attribute|augments|author|beta|borrows|bubbles |callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright |default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exception |exports?|extends|extension(?:_?for)?|external|externs|file|fileoverview|final|fires|for|func |function|generator|global|hideconstructor|host|ignore|implements|implicitCast|inherit[Dd]oc |inner|instance|interface|internal|kind|lends|license|listens|main|member|memberof!?|method |mixes|mixins?|modifies|module|name|namespace|noalias|nocollapse|nocompile|nosideeffects |override|overview|package|param|polymer(?:Behavior)?|preserve|private|prop|property|protected |public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary |suppress|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation |version|virtual|writeOnce|yields?) \b + captures + + 1 + + name + punctuation.definition.block.tag.jsdoc + + + + + include + #inline-tags + + + match + ((@)(?:[_$[:alpha:]][_$[:alnum:]]*))(?=\s+) + captures + + 1 + + name + storage.type.class.jsdoc + + 2 + + name + punctuation.definition.block.tag.jsdoc + + + + + + brackets + + patterns + + + begin + { + end + }|(?=\*/) + patterns + + + include + #brackets + + + + + begin + \[ + end + \]|(?=\*/) + patterns + + + include + #brackets + + + + + + inline-tags + + patterns + + + name + constant.other.description.jsdoc + match + (\[)[^\]]+(\])(?={@(?:link|linkcode|linkplain|tutorial)) + captures + + 1 + + name + punctuation.definition.bracket.square.begin.jsdoc + + 2 + + name + punctuation.definition.bracket.square.end.jsdoc + + + + + name + entity.name.type.instance.jsdoc + begin + ({)((@)(?:link(?:code|plain)?|tutorial))\s* + beginCaptures + + 1 + + name + punctuation.definition.bracket.curly.begin.jsdoc + + 2 + + name + storage.type.class.jsdoc + + 3 + + name + punctuation.definition.inline.tag.jsdoc + + + end + }|(?=\*/) + endCaptures + + 0 + + name + punctuation.definition.bracket.curly.end.jsdoc + + + patterns + + + match + \G((?=https?://)(?:[^|}\s*]|\*[/])+)(\|)? + captures + + 1 + + name + variable.other.link.underline.jsdoc + + 2 + + name + punctuation.separator.pipe.jsdoc + + + + + match + \G((?:[^{}@\s|*]|\*[^/])+)(\|)? + captures + + 1 + + name + variable.other.description.jsdoc + + 2 + + name + punctuation.separator.pipe.jsdoc + + + + + + + + jsdoctype + + patterns + + + name + invalid.illegal.type.jsdoc + match + \G{(?:[^}*]|\*[^/}])+$ + + + contentName + entity.name.type.instance.jsdoc + begin + \G({) + beginCaptures + + 0 + + name + entity.name.type.instance.jsdoc + + 1 + + name + punctuation.definition.bracket.curly.begin.jsdoc + + + end + ((}))\s*|(?=\*/) + endCaptures + + 1 + + name + entity.name.type.instance.jsdoc + + 2 + + name + punctuation.definition.bracket.curly.end.jsdoc + + + patterns + + + include + #brackets + + + + + + jsx + + patterns + + + include + #jsx-tag-without-attributes-in-expression + + + include + #jsx-tag-in-expression + + + + jsx-tag-without-attributes-in-expression + + begin + (?<!\+\+|--)(?<=[({\[,?=>:*]|&&|\|\||\?|\*\/|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^default|[^\._$[:alnum:]]default|^yield|[^\._$[:alnum:]]yield|^)\s*(?=(<)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))?\s*(>)) + end + (?!(<)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))?\s*(>)) + patterns + + + include + #jsx-tag-without-attributes + + + + jsx-tag-without-attributes + + name + meta.tag.without-attributes.tsx + begin + (<)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))?\s*(>) + end + (</)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))?\s*(>) + beginCaptures + + 1 + + name + punctuation.definition.tag.begin.tsx + + 2 + + name + entity.name.tag.namespace.tsx + + 3 + + name + punctuation.separator.namespace.tsx + + 4 + + name + entity.name.tag.tsx + + 5 + + name + support.class.component.tsx + + 6 + + name + punctuation.definition.tag.end.tsx + + + endCaptures + + 1 + + name + punctuation.definition.tag.begin.tsx + + 2 + + name + entity.name.tag.namespace.tsx + + 3 + + name + punctuation.separator.namespace.tsx + + 4 + + name + entity.name.tag.tsx + + 5 + + name + support.class.component.tsx + + 6 + + name + punctuation.definition.tag.end.tsx + + + contentName + meta.jsx.children.tsx + patterns + + + include + #jsx-children + + + + jsx-tag-in-expression + + begin + (?x) + (?<!\+\+|--)(?<=[({\[,?=>:*]|&&|\|\||\?|\*\/|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^default|[^\._$[:alnum:]]default|^yield|[^\._$[:alnum:]]yield|^)\s* + (?!<\s*[_$[:alpha:]][_$[:alnum:]]*((\s+extends\s+[^=>])|,)) # look ahead is not type parameter of arrow + (?=(<)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>)) + end + (?!(<)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>)) + patterns + + + include + #jsx-tag + + + + jsx-tag + + name + meta.tag.tsx + begin + (?=(<)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>)) + end + (/>)|(?:(</)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))?\s*(>)) + endCaptures + + 1 + + name + punctuation.definition.tag.end.tsx + + 2 + + name + punctuation.definition.tag.begin.tsx + + 3 + + name + entity.name.tag.namespace.tsx + + 4 + + name + punctuation.separator.namespace.tsx + + 5 + + name + entity.name.tag.tsx + + 6 + + name + support.class.component.tsx + + 7 + + name + punctuation.definition.tag.end.tsx + + + patterns + + + begin + (<)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>) + beginCaptures + + 1 + + name + punctuation.definition.tag.begin.tsx + + 2 + + name + entity.name.tag.namespace.tsx + + 3 + + name + punctuation.separator.namespace.tsx + + 4 + + name + entity.name.tag.tsx + + 5 + + name + support.class.component.tsx + + + end + (?=[/]?>) + patterns + + + include + #comment + + + include + #type-arguments + + + include + #jsx-tag-attributes + + + + + begin + (>) + beginCaptures + + 1 + + name + punctuation.definition.tag.end.tsx + + + end + (?=</) + contentName + meta.jsx.children.tsx + patterns + + + include + #jsx-children + + + + + + jsx-children + + patterns + + + include + #jsx-tag-without-attributes + + + include + #jsx-tag + + + include + #jsx-evaluated-code + + + include + #jsx-entities + + + + jsx-evaluated-code + + contentName + meta.embedded.expression.tsx + begin + \{ + end + \} + beginCaptures + + 0 + + name + punctuation.section.embedded.begin.tsx + + + endCaptures + + 0 + + name + punctuation.section.embedded.end.tsx + + + patterns + + + include + #expression + + + + jsx-entities + + patterns + + + name + constant.character.entity.tsx + match + (&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;) + captures + + 1 + + name + punctuation.definition.entity.tsx + + 3 + + name + punctuation.definition.entity.tsx + + + + + + jsx-tag-attributes + + name + meta.tag.attributes.tsx + begin + \s+ + end + (?=[/]?>) + patterns + + + include + #comment + + + include + #jsx-tag-attribute-name + + + include + #jsx-tag-attribute-assignment + + + include + #jsx-string-double-quoted + + + include + #jsx-string-single-quoted + + + include + #jsx-evaluated-code + + + include + #jsx-tag-attributes-illegal + + + + jsx-tag-attribute-name + + match + (?x) + \s* + (?:([_$[:alpha:]][-_$[:alnum:].]*)(:))? + ([_$[:alpha:]][-_$[:alnum:]]*) + (?=\s|=|/?>|/\*|//) + captures + + 1 + + name + entity.other.attribute-name.namespace.tsx + + 2 + + name + punctuation.separator.namespace.tsx + + 3 + + name + entity.other.attribute-name.tsx + + + + jsx-tag-attribute-assignment + + name + keyword.operator.assignment.tsx + match + =(?=\s*(?:'|"|{|/\*|//|\n)) + + jsx-string-double-quoted + + name + string.quoted.double.tsx + begin + " + end + " + beginCaptures + + 0 + + name + punctuation.definition.string.begin.tsx + + + endCaptures + + 0 + + name + punctuation.definition.string.end.tsx + + + patterns + + + include + #jsx-entities + + + + jsx-string-single-quoted + + name + string.quoted.single.tsx + begin + ' + end + ' + beginCaptures + + 0 + + name + punctuation.definition.string.begin.tsx + + + endCaptures + + 0 + + name + punctuation.definition.string.end.tsx + + + patterns + + + include + #jsx-entities + + + + jsx-tag-attributes-illegal + + name + invalid.illegal.attribute.tsx + match + \S+ + + + + \ No newline at end of file diff --git a/src/file-viewer/highlight-grammar/xml.plist b/src/file-viewer/highlight-grammar/xml.plist new file mode 100644 index 0000000..66d1012 --- /dev/null +++ b/src/file-viewer/highlight-grammar/xml.plist @@ -0,0 +1,573 @@ + + + + + fileTypes + + xml + xsd + tld + jsp + pt + cpt + dtml + rss + opml + + keyEquivalent + ^~X + name + XML + patterns + + + begin + (<\?)\s*([-_a-zA-Z0-9]+) + captures + + 1 + + name + punctuation.definition.tag.xml + + 2 + + name + entity.name.tag.xml + + + end + (\?>) + name + meta.tag.metadata.processing.xml + patterns + + + match + ([a-zA-Z-]+) + name + entity.other.attribute-name.xml + + + include + #doublequotedString + + + include + #singlequotedString + + + + + begin + (<!)(DOCTYPE)\s+([:a-zA-Z_][:a-zA-Z0-9_.-]*) + captures + + 1 + + name + punctuation.definition.tag.xml + + 2 + + name + entity.name.tag.xml + + 3 + + name + entity.other.attribute-name.documentroot.xml + + + end + \s*(>) + name + meta.tag.metadata.doctype.xml + patterns + + + include + #internalSubset + + + + + begin + <[!%]-- + captures + + 0 + + name + punctuation.definition.comment.xml + + + end + --%?> + name + comment.block.xml + + + begin + (<)((?:([-_a-zA-Z0-9]+)((:)))?([-_a-zA-Z0-9:]+))(?=(\s[^>]*)?></\2>) + beginCaptures + + 1 + + name + punctuation.definition.tag.xml + + 3 + + name + entity.name.tag.namespace.xml + + 4 + + name + entity.name.tag.xml + + 5 + + name + punctuation.separator.namespace.xml + + 6 + + name + entity.name.tag.localname.xml + + + end + (>(<))/(?:([-_a-zA-Z0-9]+)((:)))?([-_a-zA-Z0-9:]+)(>) + endCaptures + + 1 + + name + punctuation.definition.tag.xml + + 2 + + name + meta.scope.between-tag-pair.xml + + 3 + + name + entity.name.tag.namespace.xml + + 4 + + name + entity.name.tag.xml + + 5 + + name + punctuation.separator.namespace.xml + + 6 + + name + entity.name.tag.localname.xml + + 7 + + name + punctuation.definition.tag.xml + + + name + meta.tag.no-content.xml + patterns + + + include + #tagStuff + + + + + begin + (</?)(?:([-_a-zA-Z0-9]+)((:)))?([-_a-zA-Z0-9:]+) + captures + + 1 + + name + punctuation.definition.tag.xml + + 2 + + name + entity.name.tag.namespace.xml + + 3 + + name + entity.name.tag.xml + + 4 + + name + punctuation.separator.namespace.xml + + 5 + + name + entity.name.tag.localname.xml + + + end + (/?>) + name + meta.tag.xml + patterns + + + include + #tagStuff + + + + + include + #entity + + + include + #bare-ampersand + + + begin + <%@ + beginCaptures + + 0 + + name + punctuation.section.embedded.begin.xml + + + end + %> + endCaptures + + 0 + + name + punctuation.section.embedded.end.xml + + + name + source.java-props.embedded.xml + patterns + + + match + page|include|taglib + name + keyword.other.page-props.xml + + + + + begin + <%[!=]?(?!--) + beginCaptures + + 0 + + name + punctuation.section.embedded.begin.xml + + + end + (?!--)%> + endCaptures + + 0 + + name + punctuation.section.embedded.end.xml + + + name + source.java.embedded.xml + patterns + + + include + source.java + + + + + begin + <!\[CDATA\[ + beginCaptures + + 0 + + name + punctuation.definition.string.begin.xml + + + end + ]]> + endCaptures + + 0 + + name + punctuation.definition.string.end.xml + + + name + string.unquoted.cdata.xml + + + repository + + EntityDecl + + begin + (<!)(ENTITY)\s+(%\s+)?([:a-zA-Z_][:a-zA-Z0-9_.-]*)(\s+(?:SYSTEM|PUBLIC)\s+)? + captures + + 1 + + name + punctuation.definition.tag.xml + + 2 + + name + keyword.other.entity.xml + + 3 + + name + punctuation.definition.entity.xml + + 4 + + name + variable.language.entity.xml + + 5 + + name + keyword.other.entitytype.xml + + + end + (>) + patterns + + + include + #doublequotedString + + + include + #singlequotedString + + + + bare-ampersand + + match + & + name + invalid.illegal.bad-ampersand.xml + + doublequotedString + + begin + " + beginCaptures + + 0 + + name + punctuation.definition.string.begin.xml + + + end + " + endCaptures + + 0 + + name + punctuation.definition.string.end.xml + + + name + string.quoted.double.xml + patterns + + + include + #entity + + + include + #bare-ampersand + + + + entity + + captures + + 1 + + name + punctuation.definition.constant.xml + + 3 + + name + punctuation.definition.constant.xml + + + match + (&)([:a-zA-Z_][:a-zA-Z0-9_.-]*|#[0-9]+|#x[0-9a-fA-F]+)(;) + name + constant.character.entity.xml + + internalSubset + + begin + (\[) + captures + + 1 + + name + punctuation.definition.constant.xml + + + end + (\]) + name + meta.internalsubset.xml + patterns + + + include + #EntityDecl + + + include + #parameterEntity + + + + parameterEntity + + captures + + 1 + + name + punctuation.definition.constant.xml + + 3 + + name + punctuation.definition.constant.xml + + + match + (%)([:a-zA-Z_][:a-zA-Z0-9_.-]*)(;) + name + constant.character.parameter-entity.xml + + singlequotedString + + begin + ' + beginCaptures + + 0 + + name + punctuation.definition.string.begin.xml + + + end + ' + endCaptures + + 0 + + name + punctuation.definition.string.end.xml + + + name + string.quoted.single.xml + patterns + + + include + #entity + + + include + #bare-ampersand + + + + tagStuff + + patterns + + + captures + + 1 + + name + entity.other.attribute-name.namespace.xml + + 2 + + name + entity.other.attribute-name.xml + + 3 + + name + punctuation.separator.namespace.xml + + 4 + + name + entity.other.attribute-name.localname.xml + + + match + (?:([-_a-zA-Z0-9]+)((:)))?([-_a-zA-Z0-9]+)= + + + include + #doublequotedString + + + include + #singlequotedString + + + + + scopeName + text.xml + uuid + D3C4E6DA-6B1C-11D9-8CC2-000D93589AF6 + + \ No newline at end of file diff --git a/src/file-viewer/highlight-grammar/yaml.plist b/src/file-viewer/highlight-grammar/yaml.plist new file mode 100644 index 0000000..609c2d4 --- /dev/null +++ b/src/file-viewer/highlight-grammar/yaml.plist @@ -0,0 +1,1164 @@ + + + + + fileTypes + + yaml + yml + rviz + reek + clang-format + yaml-tmlanguage + syntax + sublime-syntax + + firstLineMatch + ^%YAML( ?1.\d+)? + keyEquivalent + ^~Y + name + YAML + patterns + + + include + #comment + + + include + #property + + + include + #directive + + + match + ^--- + name + entity.other.document.begin.yaml + + + match + ^\.{3} + name + entity.other.document.end.yaml + + + include + #node + + + repository + + block-collection + + patterns + + + include + #block-sequence + + + include + #block-mapping + + + + block-mapping + + patterns + + + include + #block-pair + + + + block-node + + patterns + + + include + #prototype + + + include + #block-scalar + + + include + #block-collection + + + include + #flow-scalar-plain-out + + + include + #flow-node + + + + block-pair + + patterns + + + begin + \? + beginCaptures + + 1 + + name + punctuation.definition.key-value.begin.yaml + + + end + (?=\?)|^ *(:)|(:) + endCaptures + + 1 + + name + punctuation.separator.key-value.mapping.yaml + + 2 + + name + invalid.illegal.expected-newline.yaml + + + name + meta.block-mapping.yaml + patterns + + + include + #block-node + + + + + begin + (?x) + (?= + (?x: + [^\s[-?:,\[\]{}#&*!|>'"%@`]] + | [?:-] \S + ) + ( + [^\s:] + | : \S + | \s+ (?![#\s]) + )* + \s* + : + (\s|$) + ) + + end + (?x) + (?= + \s* $ + | \s+ \# + | \s* : (\s|$) + ) + + patterns + + + include + #flow-scalar-plain-out-implicit-type + + + begin + (?x) + [^\s[-?:,\[\]{}#&*!|>'"%@`]] + | [?:-] \S + + beginCaptures + + 0 + + name + entity.name.tag.yaml + + + contentName + entity.name.tag.yaml + end + (?x) + (?= + \s* $ + | \s+ \# + | \s* : (\s|$) + ) + + name + string.unquoted.plain.out.yaml + + + + + match + :(?=\s|$) + name + punctuation.separator.key-value.mapping.yaml + + + + block-scalar + + begin + (?:(\|)|(>))([1-9])?([-+])?(.*\n?) + beginCaptures + + 1 + + name + keyword.control.flow.block-scalar.literal.yaml + + 2 + + name + keyword.control.flow.block-scalar.folded.yaml + + 3 + + name + constant.numeric.indentation-indicator.yaml + + 4 + + name + storage.modifier.chomping-indicator.yaml + + 5 + + patterns + + + include + #comment + + + match + .+ + name + invalid.illegal.expected-comment-or-newline.yaml + + + + + end + ^(?=\S)|(?!\G) + patterns + + + begin + ^([ ]+)(?! ) + end + ^(?!\1|\s*$) + name + string.unquoted.block.yaml + + + + block-sequence + + match + (-)(?!\S) + name + punctuation.definition.block.sequence.item.yaml + + comment + + begin + (?:(^[ \t]*)|[ \t]+)(?=#\p{Print}*$) + beginCaptures + + 1 + + name + punctuation.whitespace.comment.leading.yaml + + + end + (?!\G) + patterns + + + begin + # + beginCaptures + + 0 + + name + punctuation.definition.comment.yaml + + + end + \n + name + comment.line.number-sign.yaml + + + + directive + + begin + ^% + beginCaptures + + 0 + + name + punctuation.definition.directive.begin.yaml + + + end + (?=$|[ \t]+($|#)) + name + meta.directive.yaml + patterns + + + captures + + 1 + + name + keyword.other.directive.yaml.yaml + + 2 + + name + constant.numeric.yaml-version.yaml + + + match + \G(YAML)[ \t]+(\d+\.\d+) + + + captures + + 1 + + name + keyword.other.directive.tag.yaml + + 2 + + name + storage.type.tag-handle.yaml + + 3 + + name + support.type.tag-prefix.yaml + + + match + (?x) + \G + (TAG) + (?:[ \t]+ + ((?:!(?:[0-9A-Za-z\-]*!)?)) + (?:[ \t]+ ( + ! (?x: %[0-9A-Fa-f]{2} | [0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]] )* + | (?![,!\[\]{}]) (?x: %[0-9A-Fa-f]{2} | [0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]] )+ + ) + )? + )? + + + + captures + + 1 + + name + support.other.directive.reserved.yaml + + 2 + + name + string.unquoted.directive-name.yaml + + 3 + + name + string.unquoted.directive-parameter.yaml + + + match + (?x) \G (\w+) (?:[ \t]+ (\w+) (?:[ \t]+ (\w+))? )? + + + match + \S+ + name + invalid.illegal.unrecognized.yaml + + + + flow-alias + + captures + + 1 + + name + keyword.control.flow.alias.yaml + + 2 + + name + punctuation.definition.alias.yaml + + 3 + + name + variable.other.alias.yaml + + 4 + + name + invalid.illegal.character.anchor.yaml + + + match + ((\*))([^\s\[\]/{/},]+)([^\s\]},]\S*)? + + flow-collection + + patterns + + + include + #flow-sequence + + + include + #flow-mapping + + + + flow-mapping + + begin + \{ + beginCaptures + + 0 + + name + punctuation.definition.mapping.begin.yaml + + + end + \} + endCaptures + + 0 + + name + punctuation.definition.mapping.end.yaml + + + name + meta.flow-mapping.yaml + patterns + + + include + #prototype + + + match + , + name + punctuation.separator.mapping.yaml + + + include + #flow-pair + + + + flow-node + + patterns + + + include + #prototype + + + include + #flow-alias + + + include + #flow-collection + + + include + #flow-scalar + + + + flow-pair + + patterns + + + begin + \? + beginCaptures + + 0 + + name + punctuation.definition.key-value.begin.yaml + + + end + (?=[},\]]) + name + meta.flow-pair.explicit.yaml + patterns + + + include + #prototype + + + include + #flow-pair + + + include + #flow-node + + + begin + :(?=\s|$|[\[\]{},]) + beginCaptures + + 0 + + name + punctuation.separator.key-value.mapping.yaml + + + end + (?=[},\]]) + patterns + + + include + #flow-value + + + + + + + begin + (?x) + (?= + (?: + [^\s[-?:,\[\]{}#&*!|>'"%@`]] + | [?:-] [^\s[\[\]{},]] + ) + ( + [^\s:[\[\]{},]] + | : [^\s[\[\]{},]] + | \s+ (?![#\s]) + )* + \s* + : + (\s|$) + ) + + end + (?x) + (?= + \s* $ + | \s+ \# + | \s* : (\s|$) + | \s* : [\[\]{},] + | \s* [\[\]{},] + ) + + name + meta.flow-pair.key.yaml + patterns + + + include + #flow-scalar-plain-in-implicit-type + + + begin + (?x) + [^\s[-?:,\[\]{}#&*!|>'"%@`]] + | [?:-] [^\s[\[\]{},]] + + beginCaptures + + 0 + + name + entity.name.tag.yaml + + + contentName + entity.name.tag.yaml + end + (?x) + (?= + \s* $ + | \s+ \# + | \s* : (\s|$) + | \s* : [\[\]{},] + | \s* [\[\]{},] + ) + + name + string.unquoted.plain.in.yaml + + + + + include + #flow-node + + + begin + :(?=\s|$|[\[\]{},]) + captures + + 0 + + name + punctuation.separator.key-value.mapping.yaml + + + end + (?=[},\]]) + name + meta.flow-pair.yaml + patterns + + + include + #flow-value + + + + + + flow-scalar + + patterns + + + include + #flow-scalar-double-quoted + + + include + #flow-scalar-single-quoted + + + include + #flow-scalar-plain-in + + + + flow-scalar-double-quoted + + begin + " + beginCaptures + + 0 + + name + punctuation.definition.string.begin.yaml + + + end + " + endCaptures + + 0 + + name + punctuation.definition.string.end.yaml + + + name + string.quoted.double.yaml + patterns + + + match + \\([0abtnvfre "/\\N_Lp]|x\d\d|u\d{4}|U\d{8}) + name + constant.character.escape.yaml + + + match + \\\n + name + constant.character.escape.double-quoted.newline.yaml + + + + flow-scalar-plain-in + + patterns + + + include + #flow-scalar-plain-in-implicit-type + + + begin + (?x) + [^\s[-?:,\[\]{}#&*!|>'"%@`]] + | [?:-] [^\s[\[\]{},]] + + end + (?x) + (?= + \s* $ + | \s+ \# + | \s* : (\s|$) + | \s* : [\[\]{},] + | \s* [\[\]{},] + ) + + name + string.unquoted.plain.in.yaml + + + + flow-scalar-plain-in-implicit-type + + patterns + + + captures + + 1 + + name + constant.language.null.yaml + + 2 + + name + constant.language.boolean.yaml + + 3 + + name + constant.numeric.integer.yaml + + 4 + + name + constant.numeric.float.yaml + + 5 + + name + constant.other.timestamp.yaml + + 6 + + name + constant.language.value.yaml + + 7 + + name + constant.language.merge.yaml + + + match + (?x) + (?x: + (null|Null|NULL|~) + | (y|Y|yes|Yes|YES|n|N|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF) + | ( + (?: + [-+]? 0b [0-1_]+ # (base 2) + | [-+]? 0 [0-7_]+ # (base 8) + | [-+]? (?: 0|[1-9][0-9_]*) # (base 10) + | [-+]? 0x [0-9a-fA-F_]+ # (base 16) + | [-+]? [1-9] [0-9_]* (?: :[0-5]?[0-9])+ # (base 60) + ) + ) + | ( + (?x: + [-+]? (?: [0-9] [0-9_]*)? \. [0-9.]* (?: [eE] [-+] [0-9]+)? # (base 10) + | [-+]? [0-9] [0-9_]* (?: :[0-5]?[0-9])+ \. [0-9_]* # (base 60) + | [-+]? \. (?: inf|Inf|INF) # (infinity) + | \. (?: nan|NaN|NAN) # (not a number) + ) + ) + | ( + (?x: + \d{4} - \d{2} - \d{2} # (y-m-d) + | \d{4} # (year) + - \d{1,2} # (month) + - \d{1,2} # (day) + (?: [Tt] | [ \t]+) \d{1,2} # (hour) + : \d{2} # (minute) + : \d{2} # (second) + (?: \.\d*)? # (fraction) + (?: + (?:[ \t]*) Z + | [-+] \d{1,2} (?: :\d{1,2})? + )? # (time zone) + ) + ) + | (=) + | (<<) + ) + (?: + (?= + \s* $ + | \s+ \# + | \s* : (\s|$) + | \s* : [\[\]{},] + | \s* [\[\]{},] + ) + ) + + + + + flow-scalar-plain-out + + patterns + + + include + #flow-scalar-plain-out-implicit-type + + + begin + (?x) + [^\s[-?:,\[\]{}#&*!|>'"%@`]] + | [?:-] \S + + end + (?x) + (?= + \s* $ + | \s+ \# + | \s* : (\s|$) + ) + + name + string.unquoted.plain.out.yaml + + + + flow-scalar-plain-out-implicit-type + + patterns + + + captures + + 1 + + name + constant.language.null.yaml + + 2 + + name + constant.language.boolean.yaml + + 3 + + name + constant.numeric.integer.yaml + + 4 + + name + constant.numeric.float.yaml + + 5 + + name + constant.other.timestamp.yaml + + 6 + + name + constant.language.value.yaml + + 7 + + name + constant.language.merge.yaml + + + match + (?x) + (?x: + (null|Null|NULL|~) + | (y|Y|yes|Yes|YES|n|N|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF) + | ( + (?: + [-+]? 0b [0-1_]+ # (base 2) + | [-+]? 0 [0-7_]+ # (base 8) + | [-+]? (?: 0|[1-9][0-9_]*) # (base 10) + | [-+]? 0x [0-9a-fA-F_]+ # (base 16) + | [-+]? [1-9] [0-9_]* (?: :[0-5]?[0-9])+ # (base 60) + ) + ) + | ( + (?x: + [-+]? (?: [0-9] [0-9_]*)? \. [0-9.]* (?: [eE] [-+] [0-9]+)? # (base 10) + | [-+]? [0-9] [0-9_]* (?: :[0-5]?[0-9])+ \. [0-9_]* # (base 60) + | [-+]? \. (?: inf|Inf|INF) # (infinity) + | \. (?: nan|NaN|NAN) # (not a number) + ) + ) + | ( + (?x: + \d{4} - \d{2} - \d{2} # (y-m-d) + | \d{4} # (year) + - \d{1,2} # (month) + - \d{1,2} # (day) + (?: [Tt] | [ \t]+) \d{1,2} # (hour) + : \d{2} # (minute) + : \d{2} # (second) + (?: \.\d*)? # (fraction) + (?: + (?:[ \t]*) Z + | [-+] \d{1,2} (?: :\d{1,2})? + )? # (time zone) + ) + ) + | (=) + | (<<) + ) + (?x: + (?= + \s* $ + | \s+ \# + | \s* : (\s|$) + ) + ) + + + + + flow-scalar-single-quoted + + begin + ' + beginCaptures + + 0 + + name + punctuation.definition.string.begin.yaml + + + end + '(?!') + endCaptures + + 0 + + name + punctuation.definition.string.end.yaml + + + name + string.quoted.single.yaml + patterns + + + match + '' + name + constant.character.escape.single-quoted.yaml + + + + flow-sequence + + begin + \[ + beginCaptures + + 0 + + name + punctuation.definition.sequence.begin.yaml + + + end + \] + endCaptures + + 0 + + name + punctuation.definition.sequence.end.yaml + + + name + meta.flow-sequence.yaml + patterns + + + include + #prototype + + + match + , + name + punctuation.separator.sequence.yaml + + + include + #flow-pair + + + include + #flow-node + + + + flow-value + + patterns + + + begin + \G(?![},\]]) + end + (?=[},\]]) + name + meta.flow-pair.value.yaml + patterns + + + include + #flow-node + + + + + + node + + patterns + + + include + #block-node + + + + property + + begin + (?=!|&) + end + (?!\G) + name + meta.property.yaml + patterns + + + captures + + 1 + + name + keyword.control.property.anchor.yaml + + 2 + + name + punctuation.definition.anchor.yaml + + 3 + + name + entity.name.type.anchor.yaml + + 4 + + name + invalid.illegal.character.anchor.yaml + + + match + \G((&))([^\s\[\]/{/},]+)(\S+)? + + + match + (?x) + \G + (?: + ! < (?: %[0-9A-Fa-f]{2} | [0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]] )+ > + | (?:!(?:[0-9A-Za-z\-]*!)?) (?: %[0-9A-Fa-f]{2} | [0-9A-Za-z\-#;/?:@&=+$_.~*'()] )+ + | ! + ) + (?=\ |\t|$) + + name + storage.type.tag-handle.yaml + + + match + \S+ + name + invalid.illegal.tag-handle.yaml + + + + prototype + + patterns + + + include + #comment + + + include + #property + + + + + scopeName + source.yaml + uuid + 686AD6AE-33F3-4493-9512-9E9FC1D5417F + + \ No newline at end of file diff --git a/src/file-viewer/highlight-grammar/zig.plist b/src/file-viewer/highlight-grammar/zig.plist new file mode 100644 index 0000000..cf30522 --- /dev/null +++ b/src/file-viewer/highlight-grammar/zig.plist @@ -0,0 +1,846 @@ + + + + + fileTypes + + zig + + keyEquivalent + ^~Z + name + Zig + patterns + + + include + #dummy_main + + + repository + + block + + begin + ([a-zA-Z_][\w.]*|@\".+\")?\s*(\{) + beginCaptures + + 1 + + name + storage.type.zig + + 2 + + name + punctuation.section.braces.begin.zig + + + end + (\}) + endCaptures + + 1 + + name + punctuation.section.braces.end.zig + + + patterns + + + include + #dummy_main + + + + character_escapes + + patterns + + + match + \\n + name + constant.character.escape.newline.zig + + + match + \\r + name + constant.character.escape.carrigereturn.zig + + + match + \\t + name + constant.character.escape.tabulator.zig + + + match + \\\\ + name + constant.character.escape.backslash.zig + + + match + \\' + name + constant.character.escape.single-quote.zig + + + match + \\\" + name + constant.character.escape.double-quote.zig + + + match + \\x[a-fA-F\d]{2} + name + constant.character.escape.hexidecimal.zig + + + match + \\u\{[a-fA-F\d]{1,6}\} + name + constant.character.escape.hexidecimal.zig + + + + comments + + patterns + + + begin + /// + end + $\n? + name + comment.line.documentation.zig + + + begin + //[^/]\s*TODO + end + $\n? + name + comment.line.todo.zig + + + begin + //[^/]* + end + $\n? + name + comment.line.zig + + + + constants + + patterns + + + match + \b(null|undefined|true|false)\b + name + constant.language.zig + + + match + \b(?<!\.)(-?[\d_]+)(?!\.)\b + name + constant.numeric.integer.zig + + + match + \b(?<!\.)(0x[a-fA-F\d_]+)(?!\.)\b + name + constant.numeric.integer.hexadecimal.zig + + + match + \b(?<!\.)(0o[0-7_]+)(?!\.)\b + name + constant.numeric.integer.octal.zig + + + match + \b(?<!\.)(0b[01_]+)(?!\.)\b + name + constant.numeric.integer.binary.zig + + + match + (?<!\.)(-?\b[\d_]+(?:\.[\d_]+)?(?:[eE][+-]?[\d_]+)?)(?!\.)\b + name + constant.numeric.float.zig + + + match + (?<!\.)(-?\b0x[a-fA-F\d_]+(?:\.[a-fA-F\d_]+)?[pP]?(?:[+-]?[\d_]+)?)(?!\.)\b + name + constant.numeric.float.hexadecimal.zig + + + + container_decl + + patterns + + + match + \b(?!\d)([a-zA-Z_]\w*|@\".+\")?(?=\s*=\s*(?:extern|packed)?\b\s*(?:union)\s*[(\{]) + name + entity.name.union.zig + + + match + \b(?!\d)([a-zA-Z_]\w*|@\".+\")?(?=\s*=\s*(?:extern|packed)?\b\s*(?:struct)\s*[(\{]) + name + entity.name.struct.zig + + + match + \b(?!\d)([a-zA-Z_]\w*|@\".+\")?(?=\s*=\s*(?:extern|packed)?\b\s*(?:enum)\s*[(\{]) + name + entity.name.enum.zig + + + match + \b(?!\d)([a-zA-Z_]\w*|@\".+\")?(?=\s*=\s*(?:error)\s*[(\{]) + name + entity.name.error.zig + + + captures + + 1 + + name + storage.type.error.zig + + 2 + + name + punctuation.accessor.zig + + 3 + + name + entity.name.error.zig + + + match + \b(error)(\.)([a-zA-Z_]\w*|@\".+\") + + + + dummy_main + + patterns + + + include + #label + + + include + #function_type + + + include + #punctuation + + + include + #storage_modifier + + + include + #container_decl + + + include + #constants + + + include + #comments + + + include + #strings + + + include + #storage + + + include + #keywords + + + include + #operators + + + include + #support + + + include + #field_decl + + + include + #block + + + include + #function_def + + + include + #function_call + + + include + #enum_literal + + + + enum_literal + + match + (?<!\w|\)|\?|\}|\]|\*)(\.(?:[a-zA-Z_]\w*\b|@\"[^\"]*\"))(?!\(|\s*=[^=>]) + name + constant.language.enum + + field_decl + + begin + ([a-zA-Z_]\w*|@\".+\")\s*(:)\s* + beginCaptures + + 1 + + name + variable.other.member.zig + + 2 + + name + punctuation.separator.zig + + + end + ([a-zA-Z_][\w.]*|@\".+\")?\s*(?:(,)|(=)|$) + endCaptures + + 1 + + name + storage.type.zig + + 2 + + name + punctuation.separator.zig + + 3 + + name + keyword.operator.assignment.zig + + + patterns + + + include + #dummy_main + + + + function_call + + match + (?<!fn)\b([a-zA-Z_]\w*|@\".+\")(?=\s*\() + name + variable.function.zig + + function_def + + begin + (?<=fn)\s+([a-zA-Z_]\w*|@\".+\")(\() + beginCaptures + + 1 + + name + entity.name.function + + 2 + + name + punctuation.section.parens.begin.zig + + + end + (?<=\)[^\)])\s*([a-zA-Z_][\w.]*|@\".+\")?(!)?\s*(?:([a-zA-Z_][\w.]*|@\".+\")\b(?!\s*\())? + endCaptures + + 1 + + name + storage.type.zig + + 2 + + name + keyword.operator.zig + + 3 + + name + storage.type.zig + + + patterns + + + include + #label + + + include + #param_list + + + match + ([a-zA-Z_][\w.]*|@\".+\") + name + storage.type.zig + + + include + #dummy_main + + + + function_type + + begin + \b(fn)\s*(\() + beginCaptures + + 1 + + name + storage.type.function.zig + + 2 + + name + punctuation.section.parens.begin.zig + + + contentName + meta.function.parameters.zig + end + (?<=\)|\})\s*([a-zA-Z_][\w.]*|@\".+\")?\s*(!)?\s*([a-zA-Z_][\w.]*|@\".+\") + endCaptures + + 1 + + name + storage.type.zig + + 2 + + name + keyword.operator.zig + + 3 + + name + storage.type.zig + + + patterns + + + include + #label + + + include + #param_list + + + match + ([a-zA-Z_][\w.]*|@\".+\") + name + storage.type.zig + + + include + #dummy_main + + + + keywords + + patterns + + + match + \b(while|for|break|return|continue|asm|defer|errdefer|unreachable)\b + name + keyword.control.zig + + + match + \b(async|await|suspend|nosuspend|resume)\b + name + keyword.control.async.zig + + + match + \b(if|else|switch|try|catch|orelse)\b + name + keyword.control.conditional.zig + + + match + (?<!\w)(@import|@cImport|@cInclude)\b + name + keyword.control.import.zig + + + match + \b(usingnamespace)\b + name + keyword.other.usingnamespace.zig + + + + label + + captures + + 1 + + name + keyword.control.zig + + 2 + + name + entity.name.label.zig + + 3 + + name + entity.name.label.zig + + + match + \b(break|continue)\s*:\s*([a-zA-Z_]\w*|@\".+\")\b|\b(?!\d)([a-zA-Z_]\w*|@\".+\")\b(?=\s*:\s*(?:\{|while\b)) + + operators + + patterns + + + match + \b!\b + name + keyword.operator.zig + + + match + (==|(?:!|>|<)=?) + name + keyword.operator.logical.zig + + + match + \b(and|or)\b + name + keyword.operator.word.zig + + + match + ((?:(?:\+|-|\*)\%?|/|%|<<|>>|&|\|(?=[^\|])|\^)?=) + name + keyword.operator.assignment.zig + + + match + ((?:\+|-|\*)\%?|/(?!/)|%) + name + keyword.operator.arithmetic.zig + + + match + (<<|>>|&(?=[a-zA-Z_]|@\")|\|(?=[^\|])|\^|~) + name + keyword.operator.bitwise.zig + + + match + (\+\+|\*\*|->|\.\?|\.\*|&(?=[a-zA-Z_]|@\")|\?|\|\||\.{2,3}) + name + keyword.operator.other.zig + + + + param_list + + begin + ([a-zA-Z_]\w*|@\".+\")\s*(:)\s* + beginCaptures + + 1 + + name + variable.parameter.zig + + 2 + + name + punctuation.separator.zig + + + end + ([a-zA-Z_][\w.]*|@\".+\")?\s*(?:(,)|(\))) + endCaptures + + 1 + + name + storage.type.zig + + 2 + + name + punctuation.separator.zig + + 3 + + name + punctuation.section.parens.end.zig + + + patterns + + + include + #dummy_main + + + match + ([a-zA-Z_][\w.]*|@\".+\") + name + storage.type.zig + + + + punctuation + + patterns + + + match + , + name + punctuation.separator.zig + + + match + ; + name + punctuation.terminator.zig + + + match + (\() + name + punctuation.section.parens.begin.zig + + + match + (\)) + name + punctuation.section.parens.end.zig + + + + storage + + patterns + + + match + \b(bool|void|noreturn|type|anyerror|anytype)\b + name + storage.type.zig + + + match + \b(?<!\.)([iu]\d+|[iu]size|comptime_int)\b + name + storage.type.integer.zig + + + match + \b(f16|f32|f64|f128|comptime_float)\b + name + storage.type.float.zig + + + match + \b(c_short|c_ushort|c_int|c_uint|c_long|c_ulong|c_longlong|c_ulonglong|c_longdouble|c_void)\b + name + storage.type.c_compat.zig + + + captures + + 1 + + name + storage.type.zig + + 2 + + name + keyword.operator.zig + + 3 + + name + storage.type.zig + + + match + \b(anyframe)\b\s*(->)?\s*(?:([a-zA-Z_][\w.]*|@\".+\")\b(?!\s*\())? + + + match + \bfn\b + name + storage.type.function.zig + + + match + \btest\b + name + storage.type.test.zig + + + match + \bstruct\b + name + storage.type.struct.zig + + + match + \benum\b + name + storage.type.enum.zig + + + match + \bunion\b + name + storage.type.union.zig + + + match + \berror\b + name + storage.type.error.zig + + + + storage_modifier + + match + \b(const|var|extern|packed|export|pub|noalias|inline|noinline|comptime|volatile|align|linksection|threadlocal|allowzero)\b + name + storage.modifier.zig + + strings + + patterns + + + begin + \' + end + \' + name + string.quoted.single.zig + patterns + + + include + #character_escapes + + + match + \\[^\'][^\']*? + name + invalid.illegal.character.zig + + + + + begin + c?\" + end + \" + name + string.quoted.double.zig + patterns + + + include + #character_escapes + + + match + \\[^\'][^\']*? + name + invalid.illegal.character.zig + + + + + begin + c?\\\\ + end + $\n? + name + string.quoted.other.zig + + + + support + + match + (?<!\w)@[^\"\d][a-zA-Z_]\w*\b + name + support.function.zig + + + scopeName + source.zig + uuid + 06C2FF99-3080-441A-9019-460C51E93116 + + \ No newline at end of file diff --git a/src/file-viewer/highlight.ts b/src/file-viewer/highlight.ts new file mode 100644 index 0000000..ae0707b --- /dev/null +++ b/src/file-viewer/highlight.ts @@ -0,0 +1,204 @@ +import { onceAsync } from "../lib.ts"; +import * as fs from "node:fs/promises"; +import * as path from "node:path"; +import * as oniguruma from "vscode-oniguruma"; +import * as textmate from "vscode-textmate"; +import { escapeHTML } from "../framework/bun-polyfill.ts"; + +const languages = [ + "ts", + "tsx", + "zig", + "json", + "css", + "astro", + "mdx", + "lua", + "shell", + "dosbatch", + "powershell", + "yaml", + "toml", + "xml", + "python", + "php", + "diff", +] as const; +const altScopes: Record = { + astro: "text.html.astro", + xml: "text.xml", + php: "text.html.php", +}; +export type Language = (typeof languages)[number]; + +const scopes = [ + // CSS + ["punctuation.definition.keyword", "keyword", "css"], + ["entity.name.tag.css", "class", "css"], + ["meta.selector.css", "method", "css"], + ["entity.other.attribute-name.class.css", "builtin", "css"], + ["punctuation.definition.entity", "builtin", "css"], + ["variable.css", "parameter", "css"], + + // JSON + ["support.type.property-name.json", "variable", "json"], + ["constant.numeric", "method", "json"], + ["constant", "class", "json"], + + // Lua + ["entity.name", "class", "lua"], + + // Diff + ["punctuation.definition.deleted", "variable", "diff"], + ["markup.deleted", "variable", "diff"], + ["punctuation.definition.inserted", "method", "diff"], + ["markup.inserted", "method", "diff"], + ["meta.diff.range", "string", "diff"], + ["punctuation.definition.range", "string", "diff"], + ["meta.toc-list-line.number", "keyword", "diff"], + ["meta.diff", "comment", "diff"], + + // General + ["meta.object-literal.key", "property"], + ["comment", "comment"], + ["string", "string"], + ["storage", "keyword"], + ["keyword", "keyword"], + ["variable.parameter", "parameter"], + ["entity.name.function", "method"], + ["support.type.primitive", "builtin"], + ["entity.name.type", "class"], + ["support.type", "class"], + ["support.class", "class"], + ["constant.language", "builtin"], + ["constant", "constant"], + ["support.constant", "constant"], + ["meta.parameters", "parameter"], + ["support.function", "method"], + ["variable", "variable"], + ["punctuation", null], + ["meta.function-call", "method"], +] as const; + +interface HighlightLinesOptions { + lines: string[]; + grammar: textmate.IGrammar; + state: textmate.StateStack; + language: Language; +} + +export function getStyle(scopesToCheck: string[], langugage: Language) { + if (import.meta.main) console.log(scopesToCheck); + for (const scope of scopes) { + if (scope[2] && scope[2] !== langugage) continue; + const find = scopesToCheck.find((s) => s.startsWith(scope[0])); + if (find) { + return scope[1]; + } + } + return null; +} +function highlightLines({ + lines, + grammar, + state, + language, +}: HighlightLinesOptions) { + let html = ""; + let lastHtmlStyle: string | null = null; + + const { length } = lines; + for (let i = 0; i < length; i += 1) { + const { tokens, ruleStack, stoppedEarly } = grammar.tokenizeLine( + lines[i], + state, + ); + if (stoppedEarly) throw new Error("TODO: Tokenization stopped early?"); + state = ruleStack; + + for (const token of tokens) { + const str = lines[i].slice(token.startIndex, token.endIndex); + if (str.trim().length === 0) { + // Emit but do not consider scope changes + html += escapeHTML(str); + continue; + } + + const style = getStyle(token.scopes, language); + if (style !== lastHtmlStyle) { + if (lastHtmlStyle) html += ""; + if (style) html += ``; + } + html += escapeHTML(str); + lastHtmlStyle = style; + } + html += "\n"; + } + + if (lastHtmlStyle) html += ""; + + return { state, html }; +} + +export const getRegistry = onceAsync(async () => { + const wasmBin = await fs.readFile( + path.join( + import.meta.dirname, + "../node_modules/vscode-oniguruma/release/onig.wasm", + ), + ); + await oniguruma.loadWASM(wasmBin); + + return new textmate.Registry({ + onigLib: Promise.resolve({ + createOnigScanner: (patterns) => new oniguruma.OnigScanner(patterns), + createOnigString: (s) => new oniguruma.OnigString(s), + }), + loadGrammar: async (scopeName: string) => { + for (const lang of languages) { + if (scopeName.endsWith(`.${lang}`)) { + const file = await fs.readFile( + path.join(import.meta.dirname, `highlight-grammar/${lang}.plist`), + "utf-8", + ); + return textmate.parseRawGrammar(file); + } + } + return null; + }, + }); +}); + +export async function highlightCode(code: string, language: Language) { + const registry = await getRegistry(); + const grammar = await registry.loadGrammar( + altScopes[language] ?? "source." + language, + ); + if (!grammar) { + throw new Error(`No grammar found for language: ${language}`); + } + let state = textmate.INITIAL; + const { html } = highlightLines({ + lines: code.split("\n"), + grammar, + state, + language, + }); + return html; +} + +import { existsSync } from "node:fs"; +if (import.meta.main) { + // validate exts + for (const ext of languages) { + if ( + !existsSync( + path.join(import.meta.dirname, `highlight-grammar/${ext}.plist`), + ) + ) { + console.error(`Missing grammar for ${ext}`); + } + const html = await highlightCode("wwwwwwwwwwwaaaaaaaaaaaaaaaa", ext); + } + console.log(await highlightCode(`{"maps":"damn"`, "json")); +} diff --git a/src/file-viewer/models/BlobAsset.ts b/src/file-viewer/models/BlobAsset.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/file-viewer/models/FilePermission.ts b/src/file-viewer/models/FilePermission.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/file-viewer/models/MediaFile.ts b/src/file-viewer/models/MediaFile.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/file-viewer/pages/file.cotyledon_enterance.tsx b/src/file-viewer/pages/file.cotyledon_enterance.tsx new file mode 100644 index 0000000..6f9c148 --- /dev/null +++ b/src/file-viewer/pages/file.cotyledon_enterance.tsx @@ -0,0 +1,27 @@ +import { MediaFile } from "../db"; +import { useInlineScript } from "../framework/page-resources"; +import { Readme } from "../media/cotyledon"; +import { MediaPanel } from "../pages-dynamic/file_viewer"; +import "../media/files.css"; + +export const theme = { + bg: "#312652", + fg: "#f0f0ff", + primary: "#fabe32", +}; + +export default function CotyledonPage() { + useInlineScript("canvas_cotyledon"); + useInlineScript("file_viewer"); + return ( +
+ + +
+ ); +} diff --git a/src/file-viewer/pages/file.cotyledon_speedbump.tsx b/src/file-viewer/pages/file.cotyledon_speedbump.tsx new file mode 100644 index 0000000..27f18c0 --- /dev/null +++ b/src/file-viewer/pages/file.cotyledon_speedbump.tsx @@ -0,0 +1,27 @@ +import { MediaFile } from "../db"; +import { useInlineScript } from "../framework/page-resources"; +import { Speedbump } from "../media/cotyledon"; +import { MediaPanel } from "../pages-dynamic/file_viewer"; +import "../media/files.css"; + +export const theme = { + bg: "#312652", + fg: "#f0f0ff", + primary: "#fabe32", +}; + +export default function CotyledonPage() { + useInlineScript("canvas_cotyledon"); + useInlineScript("file_viewer"); + return ( +
+ + +
+ ); +} diff --git a/src/file-viewer/redirects.ts b/src/file-viewer/redirects.ts new file mode 100644 index 0000000..4120984 --- /dev/null +++ b/src/file-viewer/redirects.ts @@ -0,0 +1,9 @@ +export const mediaRedirects: Record = { + "/q+a/172533.png": "/q+a/172533.jpg", + "/q+a/2021-12-05_smooth.mp4": "/2019/smooth.mp4", + "/q+a/temp_2022-08-17-19-43-32.m4a": + "/2023/g-missing/fragments/2022-08-17-19-43-32.m4a", + "/q+a/2023-02-09_20-5814i.png": + "/2023/g-is-missing/fragments/2023-02-09_20-5814i.png", + "/2024/waterfalls/": "/2025/waterfalls/", +}; diff --git a/src/file-viewer/scripts/canvas_2017.ts b/src/file-viewer/scripts/canvas_2017.ts new file mode 100644 index 0000000..da45795 --- /dev/null +++ b/src/file-viewer/scripts/canvas_2017.ts @@ -0,0 +1,233 @@ +// Vibe coded with AI +(globalThis as any).canvas_2017 = function (canvas: HTMLCanvasElement) { + const isStandalone = canvas.getAttribute("data-standalone") === "true"; + // Configuration interface for the checkerboard effect + interface CheckerboardConfig { + fps: number; // frames per second + color1: string; // first checkerboard color + color2: string; // second checkerboard color + opacity: number; // opacity of each checkerboard (0-1) + speedX1: number; // horizontal speed of first checkerboard (pixels per second) + speedY1: number; // vertical speed of first checkerboard (pixels per second) + speedX2: number; // horizontal speed of second checkerboard (pixels per second) + speedY2: number; // vertical speed of second checkerboard (pixels per second) + baseTileSize: number; // base size of checkerboard tiles + sizeVariation: number; // maximum variation in tile size (pixels) + sineFrequency1: number; // frequency of first sine wave for size variation + sineFrequency2: number; // frequency of second sine wave for size variation + sineOffset: number; // offset between the two sine waves (radians) + rotation: number; // rotation in degrees for the entire pattern + rotation2: number; // rotation in degrees for the entire pattern + } + + // Default configuration + const config: CheckerboardConfig = { + fps: 30, + color1: "#1A1C17", + color2: "#1A1C17", + opacity: 0.3, + speedX1: -0.02, // moving left slowly + speedY1: -0.01, // moving up slowly + speedX2: -0.015, // moving left (slightly slower) + speedY2: 0.012, // moving down slowly + baseTileSize: 200, + sizeVariation: 1.5, + sineFrequency1: 0.0005, + sineFrequency2: 0.0008, + sineOffset: Math.PI / 2, // 90 degrees offset + rotation: 2, // 5 degree rotation + rotation2: -2, // 5 degree rotation + }; + + // Get the canvas context + const ctx = canvas.getContext("2d"); + if (!ctx) { + console.error("Could not get canvas context"); + return () => {}; + } + + // Make canvas transparent + if (isStandalone) { + canvas.style.backgroundColor = "#737D60"; + } else { + canvas.style.backgroundColor = "transparent"; + } + + // Variables to track position and animation + let width = canvas.width; + let height = canvas.height; + let animationFrameId: number; + let lastFrameTime = 0; + const frameInterval = 1000 / config.fps; + + // Position offsets for the two checkerboards (centered) + let offset1X = 0; + let offset1Y = 0; + let offset2X = 0; + let offset2Y = 0; + + // Time variable for sine wave calculation + let time = 0; + + // Convert rotation to radians + const rotationRad = (config.rotation * Math.PI) / 180; + const rotationRad2 = (config.rotation2 * Math.PI) / 180; + + // Update canvas dimensions when resized + const updateDimensions = () => { + width = canvas.width = canvas.clientWidth; + height = canvas.height = canvas.clientHeight; + }; + + // Calculate the diagonal length of the canvas (to ensure rotation covers corners) + const calculateDiagonal = () => { + return Math.sqrt(width * width + height * height); + }; + + // Draw a single checkerboard pattern scaled from center with rotation + const drawCheckerboard = ( + offsetX: number, + offsetY: number, + tileSize: number, + color1: string, + color2: string, + opacity: number, + rotationRad: number, + ) => { + ctx.globalAlpha = opacity; + + // Get the center of the viewport + const centerX = width / 2; + const centerY = height / 2; + + // Save the current transformation state + ctx.save(); + + // Move to the center of the canvas, rotate, then move back + ctx.translate(centerX, centerY); + ctx.rotate(rotationRad); + + // Calculate the number of tiles needed to cover the rotated canvas + // We need to use the diagonal length to ensure we cover the corners when rotated + const diagonal = calculateDiagonal(); + const tilesX = Math.ceil(diagonal / tileSize) + 6; // Added extra tiles for rotation + const tilesY = Math.ceil(diagonal / tileSize) + 6; + + // Calculate how many tiles fit from center to edge (in each direction) + const halfTilesX = Math.ceil(tilesX / 2); + const halfTilesY = Math.ceil(tilesY / 2); + + // Adjust the offset to be relative to the center + // The modulo ensures the pattern repeats smoothly even with scaling + const adjustedOffsetX = offsetX % (tileSize * 2); + const adjustedOffsetY = offsetY % (tileSize * 2); + + // Draw the checker pattern, centered on the viewport + for (let y = -halfTilesY; y <= halfTilesY; y++) { + for (let x = -halfTilesX; x <= halfTilesX; x++) { + // Determine if this tile should be colored (creating checker pattern) + // We add a large number to ensure (x+y) is always positive for the modulo + if ((x + y + 1000) % 2 === 0) { + ctx.fillStyle = color1; + } else { + ctx.fillStyle = color2; + } + + // Calculate the position of this tile relative to the center + // The adjusted offset creates the movement effect + const posX = (x * tileSize) + adjustedOffsetX; + const posY = (y * tileSize) + adjustedOffsetY; + + // Draw the tile + ctx.fillRect( + posX - tileSize / 2, + posY - tileSize / 2, + tileSize, + tileSize, + ); + } + } + + // Restore the transformation state + ctx.restore(); + }; + + // Animation loop + const animate = (currentTime: number) => { + animationFrameId = requestAnimationFrame(animate); + + // Control frame rate + if (currentTime - lastFrameTime < frameInterval) { + return; + } + + // Calculate the time elapsed since the last frame + const dt = currentTime - lastFrameTime; + lastFrameTime = currentTime; + + // Increment time for sine wave calculation + time += dt; + + // Update the position offsets based on speed and elapsed time + offset1X += config.speedX1 * dt; + offset1Y += config.speedY1 * dt; + offset2X += config.speedX2 * dt; + offset2Y += config.speedY2 * dt; + + // Calculate the tile sizes using sine waves + const tileSize1 = config.baseTileSize + + Math.sin(time * config.sineFrequency1) * config.sizeVariation; + const tileSize2 = config.baseTileSize + + Math.sin(time * config.sineFrequency2 + config.sineOffset) * + config.sizeVariation; + + // Clear canvas + ctx.clearRect(0, 0, width, height); + + // Draw the two checkerboards + drawCheckerboard( + offset1X, + offset1Y, + tileSize1, + config.color1, + "transparent", + config.opacity, + rotationRad, + ); + + drawCheckerboard( + offset2X, + offset2Y, + tileSize2, + config.color2, + "transparent", + config.opacity, + rotationRad2, + ); + + // Reset global alpha + ctx.globalAlpha = 1.0; + }; + + // Initialize the animation + const init = () => { + // Set up resize handler + window.addEventListener("resize", updateDimensions); + + // Initial setup + updateDimensions(); + + // Start animation + lastFrameTime = performance.now(); + animationFrameId = requestAnimationFrame(animate); + }; + + // Start the animation + init(); + + // Return cleanup function + return () => { + window.removeEventListener("resize", updateDimensions); + cancelAnimationFrame(animationFrameId); + }; +}; diff --git a/src/file-viewer/scripts/canvas_2018.ts b/src/file-viewer/scripts/canvas_2018.ts new file mode 100644 index 0000000..6364d60 --- /dev/null +++ b/src/file-viewer/scripts/canvas_2018.ts @@ -0,0 +1,431 @@ +// This canvas is based on the maze generation algo in Tanks. This was +// originally written in C++ as a single function in 2018, and was ported to TS +// by Chloe in 2025 for the cotyledon canvas. +// +// The main difference is that this version is a visualization, rather than the +// practical function. Instead of taking a millisecond, only 5 steps are +// performed per second, visualizing the whole ordeal. It also isn't a playable +// game, obviously. +// +// Ported with love because I care about my old self +// She deserves the world, but instead gave it to me. +(globalThis as any).canvas_2018 = function (canvas: HTMLCanvasElement) { + const isStandalone = canvas.getAttribute("data-standalone") === "true"; + if (isStandalone) { + canvas.style.backgroundColor = "#27201E"; + } + interface Cell { + down: boolean; + right: boolean; + visited: boolean; + + cell_flash: number; + down_flash: number; + right_flash: number; + } + interface Pos { + x: number; + y: number; + /** Where the wall is relative to x, y. */ + dir: "left" | "right" | "up" | "down"; + } + interface Maze { + grid: Grid; + cursor: { x: number; y: number }; + lastTick: number; + /* Pixels */ + transform: number; + newCellsToVisit: Pos[]; + randomWallBag: Cell[]; + randomWallTarget: number; + renderOffset: { x: number; y: number }; + done: boolean; + } + const hex = (color: number[]) => + "#" + color.map((c) => c.toString(16).padStart(2, "0")).join(""); + let cellSize: number; + let borderThickness: number; + const cellFlashModifier = isStandalone ? 0.4 : 0.2; + const color = isStandalone ? "#170d0b" : "#231C1A"; + const bg = [0x27, 0x20, 0x1E]; + const wallFlashColor = [0xFF, 0xA8, 0x7A]; + const cellFlashColor = "#FFA87A"; + const updateTime = 1000 / 7; + const randomWallBreakInterval = [6, 12]; // every 10 to 18 walls. + function randomBetween(min: number, max: number) { + return Math.round( + Math.random() * (max - min), + ) + min; + } + function randomOf(array: T[]): T { + return array[randomBetween(0, array.length - 1)]; + } + function randomWallTarget() { + return randomBetween( + randomWallBreakInterval[0], + randomWallBreakInterval[1], + ); + } + + // Originally, this used a 2-dimensional array. However, I wanted to make sure + // that the grid could be infinitely sized. This grid constructs new cells on + // demand, as needed. + class Grid { + cells = new Map(); + cell({ x, y }: { x: number; y: number }) { + const k = ((x | 0) << 16) + (y | 0); + const { cells } = this; + let existing = this.cells.get(k); + if (!existing) { + existing = { + cell_flash: 0, + down: true, + down_flash: 0, + right: true, + right_flash: 0, + visited: false, + }; + cells.set(k, existing); + } + return existing; + } + forAll( + renderOffset: { x: number; y: number }, + width: number, + height: number, + cb: (cell: Cell, pos: { x: number; y: number }) => void, + ) { + const { x: offsetX, y: offsetY } = renderOffset; + const startX = Math.floor(-offsetX / cellSize); + const startY = Math.floor(-offsetY / cellSize); + const endX = Math.ceil((width - offsetX) / cellSize); + const endY = Math.ceil((height - offsetY) / cellSize); + for (let x = startX; x <= endX; x++) { + for (let y = startY; y <= endY; y++) { + const cellX = offsetX + x * cellSize; + const cellY = offsetY + y * cellSize; + cb(this.cell({ x, y }), { x: cellX, y: cellY }); + } + } + } + } + + const ctx = canvas.getContext("2d")!; + if (!ctx) { + console.error("Could not get canvas context"); + return () => {}; + } + + let width: number, height: number; + const updateDimensions = () => { + width = canvas.width = canvas.offsetWidth; + height = canvas.height = canvas.offsetHeight; + cellSize = 100; + borderThickness = 8; + }; + updateDimensions(); + + setTimeout(() => { + updateDimensions(); + }, 10); + + let maze = initMaze(); + let nextMaze: Maze | null = null; + let completeFade = 0; + function initMaze(): Maze { + return { + grid: new Grid(), + transform: 0, + cursor: { + x: randomBetween(0, Math.ceil(width / cellSize)), + y: randomBetween(0, Math.ceil(height / cellSize)), + }, + lastTick: performance.now(), + randomWallBag: [], + randomWallTarget: randomWallTarget(), + newCellsToVisit: [], + renderOffset: { x: 0, y: 0 }, + done: false, + }; + } + + function isOnScreen(maze: Maze, x: number, y: number) { + const { x: offsetX, y: offsetY } = maze.renderOffset; + const cellX = offsetX + x * cellSize; + const cellY = offsetY + y * cellSize; + return ( + cellX + cellSize > 0 && + cellX < width && + cellY + cellSize > 0 && + cellY < height + ); + } + + function tick(maze: Maze, other?: Maze) { + if (maze.done) return; + + // The original maze algorithm broke down 4%-8% of random right facing + // walls, and 4%-8% of down facing walls. It did this at the end. + // To make this visual more interesting, two random walls will be broken + // down every 12-25 cell visits. This way, the main trail is always running. + if (maze.randomWallBag.length > maze.randomWallTarget) { + const down: Cell = randomOf(maze.randomWallBag); + const right: Cell = randomOf(maze.randomWallBag); + maze.randomWallBag.forEach((cell) => + cell.cell_flash = Math.min(cell.cell_flash + 0.2, 1) + ); + down.cell_flash = 1; + down.down = false; + down.down_flash = 1; + right.cell_flash = 1; + right.right = false; + right.right_flash = 1; + maze.randomWallBag = []; + maze.randomWallTarget = randomWallTarget(); + return; + } + + // The main algorithm was simple: Have a cursor position, and move it in a + // random direction that it had not seen before. Once it had run out of + // options, branch off of a previous location. Only visit each cell once. + // + // In this visualization, cells that are too far offscreen are softly + // treated as "visited", which is how the simulation always stays in frame. + const current = maze.grid.cell(maze.cursor); + current.visited = true; + current.cell_flash = 1; + maze.randomWallBag.push(current); + const adjacent = ([ + { x: maze.cursor.x + 1, y: maze.cursor.y, dir: "left" }, + { x: maze.cursor.x - 1, y: maze.cursor.y, dir: "right" }, + { x: maze.cursor.x, y: maze.cursor.y + 1, dir: "up" }, + { x: maze.cursor.x, y: maze.cursor.y - 1, dir: "down" }, + ] as Pos[]).filter((pos) => + isOnScreen(maze, pos.x, pos.y) && + maze.grid.cell(pos).visited === false + ); + if (adjacent.length === 0) { + // move cursor to a random cell that has not been visited. + const cells = maze.newCellsToVisit.filter((pos) => + isOnScreen(maze, pos.x, pos.y) && + maze.grid.cell(pos).visited === false + ); + if (cells.length === 0) { + maze.done = true; + return; + } + const continuePos = randomOf(cells); + breakWall(maze, continuePos, other); + maze.cursor = { x: continuePos.x, y: continuePos.y }; + return; + } + + // break a random wall + const toBreak = randomOf(adjacent); + breakWall(maze, toBreak, other); + maze.cursor = { x: toBreak.x, y: toBreak.y }; + + // add the other directions to the new cells to visit. + maze.newCellsToVisit.push( + ...adjacent.filter((pos) => pos.dir !== toBreak.dir), + ); + } + + function breakWall(maze: Maze, pos: Pos, other?: Maze) { + if (pos.dir === "right") { + const cell = maze.grid.cell(pos); + cell.right = false; + cell.right_flash = 1; + if (other) cell.right = false; + } else if (pos.dir === "down") { + const cell = maze.grid.cell(pos); + cell.down = false; + cell.down_flash = 1; + if (other) cell.down = false; + } else if (pos.dir === "left") { + const cell = maze.grid.cell({ x: pos.x - 1, y: pos.y }); + cell.right = false; + cell.right_flash = 1; + if (other) cell.right = false; + } else if (pos.dir === "up") { + const cell = maze.grid.cell({ x: pos.x, y: pos.y - 1 }); + cell.down = false; + cell.down_flash = 1; + if (other) cell.down = false; + } + } + + function renderOffset(maze: Maze) { + return { x: maze.transform, y: maze.transform }; + } + + let animationFrameId: number; + let last = performance.now(); + let dt: number = 0; + + function renderMazeBorders(maze: Maze, opacity: number) { + ctx.globalAlpha = opacity; + maze.grid.forAll( + maze.renderOffset, + width, + height, + (cell, { x: cellX, y: cellY }) => { + // Walls + if (cell.right) { + ctx.fillStyle = color; + ctx.fillRect( + cellX + cellSize - borderThickness / 2, + cellY - borderThickness / 2, + borderThickness, + cellSize + borderThickness, + ); + } + if (cell.down) { + ctx.fillStyle = color; + ctx.fillRect( + cellX - borderThickness / 2, + cellY + cellSize - borderThickness / 2, + cellSize + borderThickness, + borderThickness, + ); + } + }, + ); + ctx.globalAlpha = 1; + } + + function renderCellFlash(maze: Maze) { + maze.grid.forAll( + maze.renderOffset, + width, + height, + (cell, { x: cellX, y: cellY }) => { + // Cell flash to show visiting path. + if (cell.cell_flash > 0) { + cell.cell_flash = Math.max(0, cell.cell_flash - dt / 1000); + ctx.fillStyle = cellFlashColor; + ctx.globalAlpha = cell.cell_flash * cellFlashModifier; + ctx.fillRect(cellX, cellY, cellSize, cellSize); + ctx.globalAlpha = 1; + } + }, + ); + } + + function renderBorderFlash(maze: Maze) { + maze.grid.forAll( + maze.renderOffset, + width, + height, + (cell, { x: cellX, y: cellY }) => { + if (cell.right_flash == 0 && cell.down_flash == 0) { + return; + } + + // Walls + const cellFlash = cell.cell_flash * cellFlashModifier; + if (cell.right_flash > 0) { + cell.right_flash = Math.max(0, cell.right_flash - dt / 500); + ctx.fillStyle = interpolateColor( + bg, + wallFlashColor, + Math.max(cell.right_flash, cellFlash), + ); + if (cellFlash > cell.right_flash) { + ctx.globalAlpha = cell.right_flash / cellFlash; + } + ctx.fillRect( + cellX + cellSize - borderThickness / 2, + cellY + borderThickness / 2, + borderThickness, + cellSize - borderThickness, + ); + ctx.globalAlpha = 1; + } + if (cell.down_flash > 0) { + if (cellFlash > cell.down_flash) { + ctx.globalAlpha = cell.down_flash / cellFlash; + } + cell.down_flash = Math.max(0, cell.down_flash - dt / 500); + ctx.fillStyle = interpolateColor( + bg, + wallFlashColor, + Math.max(cell.down_flash, cellFlash), + ); + ctx.fillRect( + cellX + borderThickness / 2, + cellY + cellSize - borderThickness / 2, + cellSize - borderThickness, + borderThickness, + ); + ctx.globalAlpha = 1; + } + }, + ); + } + + function render() { + const now = performance.now(); + dt = now - last; + maze.transform += dt * 0.005; + maze.renderOffset = renderOffset(maze); + if (!maze.done) { + if (now - maze.lastTick >= updateTime) { + tick(maze); + maze.lastTick = now; + + if (maze.done) { + nextMaze = initMaze(); + nextMaze.transform = (maze.transform % cellSize) - dt * 0.005; + nextMaze.lastTick = now; + completeFade = 0; + } + } + } + if (nextMaze) { + nextMaze.transform += dt * 0.005; + nextMaze.renderOffset = renderOffset(nextMaze); + if (!nextMaze.done && now - nextMaze.lastTick >= updateTime) { + tick(nextMaze, maze); + nextMaze.lastTick = now; + } + } + last = now; + + ctx.clearRect(0, 0, width, height); + + renderCellFlash(maze); + if (nextMaze) renderCellFlash(nextMaze); + + renderMazeBorders(maze, 1); + if (nextMaze) { + renderMazeBorders(nextMaze, completeFade); + completeFade += dt / 3000; + if (completeFade >= 1) { + maze = nextMaze; + nextMaze = null; + } + } + + renderBorderFlash(maze); + if (nextMaze) { + renderCellFlash(nextMaze); + renderBorderFlash(nextMaze); + } + + animationFrameId = requestAnimationFrame(render); + } + + function interpolateColor(start: number[], end: number[], t: number) { + return hex(start.map((s, i) => Math.round(s + (end[i] - s) * t))); + } + + window.addEventListener("resize", updateDimensions); + animationFrameId = requestAnimationFrame(render); + + // cleanup function + return () => { + window.removeEventListener("resize", updateDimensions); + cancelAnimationFrame(animationFrameId); + }; +}; diff --git a/src/file-viewer/scripts/canvas_2019.ts b/src/file-viewer/scripts/canvas_2019.ts new file mode 100644 index 0000000..6030c38 --- /dev/null +++ b/src/file-viewer/scripts/canvas_2019.ts @@ -0,0 +1,213 @@ +// Ported from CanvasAPI, allegedly written on 2019-08-26. +(globalThis as any).canvas_2019 = function (canvas: HTMLCanvasElement) { + const isStandalone = canvas.getAttribute("data-standalone") === "true"; + if (isStandalone) { + canvas.parentElement!.style.backgroundColor = "#121013"; + } + // Canvas.tsx + abstract class CanvasAPI { + canvas: HTMLCanvasElement; + ctx: CanvasRenderingContext2D; + width = 0; + height = 0; + private _disposed = false; + private _running = false; + private _last = 0; + + constructor(canvas: HTMLCanvasElement) { + this.canvas = canvas; + this.width = canvas.width = canvas.clientWidth; + this.height = canvas.height = canvas.clientHeight; + const ctx = this.canvas.getContext("2d"); + if (!ctx) { + throw new Error("Canvas2D Not Supported!"); + } + this.ctx = ctx; + } + + stopRenderLoop() { + this._running = false; + } + + startRenderLoop() { + if (this._disposed) return; + this._running = true; + this._last = performance.now(); + requestAnimationFrame(this._renderLoop); + } + + private _renderLoop = (delta: number) => { + if (!this._running) return; + this.render(delta - this._last); + this._last = delta; + requestAnimationFrame(this._renderLoop); + }; + + abstract render(delta: number): void; + } + + // VaultBackground.ts + function addGSHelper( + grad: CanvasGradient, + color: string, + dotOpacity: number, + gradStop: number, + gradOpacity: number, + ) { + grad.addColorStop(gradStop, `rgba(${color},${dotOpacity * gradOpacity})`); + } + + function randAround(target: number, dist: number) { + return (Math.random() - 0.5) * dist * 2 + target; + } + + class Dot { + x = Math.random() * 1.1 - 0.05; + y = Math.random() / 4 + 0.9; + size = Math.random() * 200 + 50; + opacity = 0; + opacityRandom = Math.random() / 3 + 0.3; + fadeInOpacity = 1; + color = `${randAround(217, 30)}, ${randAround(170, 30)}, ${ + randAround(255, 20) + }`; + + life = 0; + + ySpeed_1 = 0; + ySpeed_2 = -0.0000063; + ySpeed_3 = 0.000000016; + ySpeed_4 = 0.000000000009; + + seed = Math.random(); + + delete = false; + + update(init: boolean) { + this.life += 0.8; + if (this.life < 115) { + this.opacity = this.life / 230; + } else if (this.life > 450) { + this.delete = true; + } else if (this.life > 300) { + this.opacity = (150 + 300 - this.life) / 300; + } + + this.ySpeed_3 += this.ySpeed_4; + this.ySpeed_2 += this.ySpeed_3; + this.ySpeed_1 += this.ySpeed_2; + this.y += this.ySpeed_1 * 0.5; + + this.size -= 0.08; + + if (this.delete) { + Object.assign(this, new Dot()); + } + } + + render(scene: VaultBackground) { + const ctx = scene.ctx; + + if (this.fadeInOpacity < 1) { + this.fadeInOpacity += 0.0075; + } + + const finalX = this.x + + Math.sin(this.seed * Math.PI * 2 + Date.now() / 15000) * 0.2; + + const drawX = scene.shakeX + + finalX * Math.max(700, scene.width) - + (Math.max(700, scene.width) - scene.width) / 2; + const drawY = scene.shakeY + (this.y * 1.5 - 0.5) * scene.height; + + const opacity = this.opacity * this.opacityRandom * this.fadeInOpacity; + + const grad = ctx.createRadialGradient( + drawX, + drawY, + 0, + drawX, + drawY, + this.size, + ); + addGSHelper(grad, this.color, opacity, 0, 1); + addGSHelper(grad, this.color, opacity, 0.8, 0.7); + addGSHelper(grad, this.color, opacity, 0.87, 0.5); + addGSHelper(grad, this.color, opacity, 0.93, 0.3); + addGSHelper(grad, this.color, opacity, 1, 0); + + ctx.fillStyle = grad; + ctx.fillRect( + drawX - this.size, + drawY - this.size, + this.size * 2, + this.size * 2, + ); + } + } + + class VaultBackground extends CanvasAPI { + private items = new Set(); + + private shakeVar = 0; + private dom?: HTMLElement; + shakeX = 0; + shakeY = 0; + + constructor(canvas: HTMLCanvasElement) { + super(canvas); + for (let i = 0; i < 450; i++) { + if (i % 7 === 0) { + this.items.add(new Dot()); + } + this.items.forEach((x) => x.update(true)); + } + this.items.forEach((x) => x.fadeInOpacity = 0); + } + + render(): void { + this.ctx.clearRect(0, 0, this.width, this.height); + + this.items.forEach((x) => (x.update(false), x.render(this))); + + if (this.shakeVar >= 0.0001) { + this.shakeVar *= 0.97 - 0.22 * this.shakeVar; + + if (this.shakeVar >= 0.0001) { + this.shakeX = (Math.random() * 2 - 1) * this.shakeVar * 65; + this.shakeY = (Math.random() * 2 - 1) * this.shakeVar * 65; + if (this.dom) { + this.dom.style.transform = + `translate(${this.shakeX}px,${this.shakeY}px)`; + } + } else { + this.shakeX = 0; + this.shakeY = 0; + if (this.dom) this.dom.style.removeProperty("transform"); + this.dom = undefined; + } + } + } + + shake(dom?: HTMLElement | null) { + this.dom = dom || document.body; + this.shakeVar = 1; + } + } + + // Binding code + let bg = new VaultBackground(canvas); + bg.startRenderLoop(); + canvas.style.opacity = "0.2"; + function onResize() { + bg.width = canvas.width = canvas.clientWidth; + bg.height = canvas.height = canvas.clientHeight; + } + window.addEventListener("resize", onResize); + onResize(); + (globalThis as any).vault = bg; + return () => { + bg.stopRenderLoop(); + window.removeEventListener("resize", onResize); + }; +}; diff --git a/src/file-viewer/scripts/canvas_2020.ts b/src/file-viewer/scripts/canvas_2020.ts new file mode 100644 index 0000000..16170c4 --- /dev/null +++ b/src/file-viewer/scripts/canvas_2020.ts @@ -0,0 +1,197 @@ +// Vibe coded with AI +(globalThis as any).canvas_2020 = function (canvas: HTMLCanvasElement) { + const isStandalone = canvas.getAttribute("data-standalone") === "true"; + // Rain effect with slanted lines + // Configuration interface for the rain effect + interface RainConfig { + fps: number; // frames per second + color: string; // color of rain particles + angle: number; // angle in degrees + particleDensity: number; // particles per 10000 pixels of canvas area + speed: number; // speed of particles (pixels per frame) + lineWidth: number; // thickness of rain lines + lineLength: number; // length of rain lines + } + + // Rain particle interface + interface RainParticle { + x: number; // x position + y: number; // y position + } + + // Default configuration + const config: RainConfig = { + fps: 16, + color: isStandalone ? "#00FEFB99" : "#081F24", + angle: -18, + particleDensity: 1, + speed: 400, + lineWidth: 8, + lineLength: 100, + }; + + // Get the canvas context + const ctx = canvas.getContext("2d"); + if (!ctx) { + console.error("Could not get canvas context"); + return () => {}; + } + + // Make canvas transparent + if (isStandalone) { + canvas.style.backgroundColor = "#0F252B"; + } else { + canvas.style.backgroundColor = "transparent"; + } + + // Calculate canvas dimensions and update when resized + let width = canvas.width; + let height = canvas.height; + let particles: RainParticle[] = []; + let animationFrameId: number; + let lastFrameTime = 0; + const frameInterval = 1000 / config.fps; + + // Calculate angle in radians + const angleRad = (config.angle * Math.PI) / 180; + + // Update canvas dimensions and particle count when resized + const updateDimensions = () => { + width = canvas.width = canvas.offsetWidth; + height = canvas.height = canvas.offsetHeight; + + // Calculate the canvas area in pixels + const canvasArea = width * height; + + // Calculate target number of particles based on canvas area + const targetParticleCount = Math.floor( + (canvasArea / 10000) * config.particleDensity, + ); + + // Calculate buffer for horizontal offset due to slanted angle + const buffer = Math.abs(height * Math.tan(angleRad)) + config.lineLength; + + // Adjust the particles array + if (particles.length < targetParticleCount) { + // Add more particles if needed + for (let i = particles.length; i < targetParticleCount; i++) { + particles.push(createParticle(true, buffer)); + } + } else if (particles.length > targetParticleCount) { + // Remove excess particles + particles = particles.slice(0, targetParticleCount); + } + }; + + // Create a new particle + // Added initialDistribution parameter to distribute particles across the entire canvas at startup + const createParticle = ( + initialDistribution = false, + buffer: number, + ): RainParticle => { + // For initial distribution, place particles throughout the canvas + // Otherwise start them above the canvas + let x = Math.random() * (width + buffer * 2) - buffer; + let y; + + if (initialDistribution) { + // Distribute across the entire canvas height for initial setup + y = Math.random() * (height + config.lineLength * 2) - config.lineLength; + } else { + // Start new particles from above the canvas with some randomization + y = -config.lineLength - (Math.random() * config.lineLength * 20); + } + + return { + x, + y, + }; + }; + + // Update particle positions + const updateParticles = () => { + // Calculate buffer for horizontal offset due to slanted angle + const buffer = Math.abs(height * Math.tan(angleRad)) + config.lineLength; + + for (let i = 0; i < particles.length; i++) { + const p = particles[i]; + + // Update position based on speed and angle + p.x += Math.sin(angleRad) * config.speed; + p.y += Math.cos(angleRad) * config.speed; + + // Reset particles that go offscreen - only determined by position + // Add extra buffer to ensure particles fully exit the visible area before resetting + if ( + p.y > height + config.lineLength || + p.x < -buffer || + p.x > width + buffer + ) { + particles[i] = createParticle(false, buffer); + } + } + }; + + // Draw particles + const drawParticles = () => { + // Clear canvas + ctx.clearRect(0, 0, width, height); + + // Set drawing properties + ctx.strokeStyle = config.color; + ctx.lineWidth = config.lineWidth; + ctx.lineCap = "square"; + + // Draw each rain line + ctx.beginPath(); + for (const p of particles) { + // Only draw particles that are either on screen or within a reasonable buffer + // This is for performance reasons - we don't need to draw particles far offscreen + if (p.y >= -config.lineLength * 2 && p.y <= height + config.lineLength) { + const endX = p.x + Math.sin(angleRad) * config.lineLength; + const endY = p.y + Math.cos(angleRad) * config.lineLength; + + ctx.moveTo(p.x, p.y); + ctx.lineTo(endX, endY); + } + } + ctx.stroke(); + }; + + // Animation loop + const animate = (currentTime: number) => { + animationFrameId = requestAnimationFrame(animate); + + // Control frame rate + if (currentTime - lastFrameTime < frameInterval) { + return; + } + + lastFrameTime = currentTime; + + updateParticles(); + drawParticles(); + }; + + // Initialize the animation + const init = () => { + // Set up resize handler + window.addEventListener("resize", updateDimensions); + + // Initial setup + updateDimensions(); + + // Start animation + lastFrameTime = performance.now(); + animationFrameId = requestAnimationFrame(animate); + }; + + // Start the animation + init(); + + // Return cleanup function + return () => { + window.removeEventListener("resize", updateDimensions); + cancelAnimationFrame(animationFrameId); + }; +}; diff --git a/src/file-viewer/scripts/canvas_2021.ts b/src/file-viewer/scripts/canvas_2021.ts new file mode 100644 index 0000000..3c319cf --- /dev/null +++ b/src/file-viewer/scripts/canvas_2021.ts @@ -0,0 +1,783 @@ +// Vibe coded. +(globalThis as any).canvas_2021 = function (canvas: HTMLCanvasElement) { + const isStandalone = canvas.getAttribute("data-standalone") === "true"; + // Constants for simulation + const PARTICLE_RADIUS = 4.5; + const PARTICLE_DENSITY = 0.004; // Particles per pixel + const MIN_SPEED = 0.05; + const MAX_SPEED = 6.0; + const FRICTION = 0.96; + const REPULSION_STRENGTH = 0.1; + const REPULSION_RADIUS = 50; + const FORCE_RADIUS = 400; // Increased radius + const FORCE_STRENGTH = 0.25; + const FORCE_FALLOFF_EXPONENT = 3; // Higher value = sharper falloff + const FORCE_SPACING = 10; // Pixels between force points + const MIN_FORCE_STRENGTH = 0.05; // Minimum force strength for very slow movements + const MAX_FORCE_STRENGTH = 0.4; // Maximum force strength for fast movements + const MIN_SPEED_THRESHOLD = 1; // Movement speed (px/frame) that produces minimum force + const MAX_SPEED_THRESHOLD = 20; // Movement speed that produces maximum force + const OVERSCAN_PIXELS = 250; + const CELL_SIZE = REPULSION_RADIUS; // For spatial hashing + + let globalOpacity = 0; + + if (isStandalone) { + canvas.style.backgroundColor = "#301D02"; + } else { + canvas.style.backgroundColor = "transparent"; + } + + // Interfaces + interface Particle { + x: number; + y: number; + vx: number; + vy: number; + charge: number; // 0 to 1, affecting color + } + + interface Force { + x: number; + y: number; + dx: number; + dy: number; + strength: number; + radius: number; + createdAt: number; + } + + interface SpatialHash { + [key: string]: Particle[]; + } + + // State + let first = true; + let particles: Particle[] = []; + let forces: Force[] = []; + let width = canvas.width; + let height = canvas.height; + let targetParticleCount = 0; + let spatialHash: SpatialHash = {}; + let ctx: CanvasRenderingContext2D | null = null; + let animationId: number | null = null; + let isRunning = false; + + // Mouse tracking + let lastMousePosition: { x: number; y: number } | null = null; + // Track position of the last created force + let lastForcePosition: { x: number; y: number } | null = null; + + // Keep track of previous canvas dimensions for resize logic + let previousWidth = 0; + let previousHeight = 0; + + // Initialize and cleanup + function init(): void { + ctx = canvas.getContext("2d"); + if (!ctx) return; + + // Set canvas to full size + resizeCanvas(); + + // Event listeners + window.addEventListener("resize", resizeCanvas); + document.addEventListener("mousemove", handleMouseMove); + + // Start animation immediately + start(); + } + + function cleanup(): void { + // Stop the animation + stop(); + + // Remove event listeners + window.removeEventListener("resize", resizeCanvas); + document.removeEventListener("mousemove", handleMouseMove); + + // Clear arrays + particles = []; + forces = []; + spatialHash = {}; + lastMousePosition = null; + lastForcePosition = null; + } + + // Resize canvas and adjust particle count + function resizeCanvas(): void { + // Store previous dimensions + previousWidth = width; + previousHeight = height; + + // Update to new dimensions + width = window.innerWidth; + height = window.innerHeight; + canvas.width = width; + canvas.height = height; + + const oldTargetCount = targetParticleCount; + targetParticleCount = Math.floor(width * height * PARTICLE_DENSITY); + + // Adjust particle count + if (targetParticleCount > oldTargetCount) { + // Add more particles if needed, but only in newly available space + addParticles(targetParticleCount - oldTargetCount, !first); + first = false; + } + // Note: Removal of excess particles happens naturally during update + } + + // Handle mouse movement + function handleMouseMove(e: MouseEvent): void { + const rect = canvas.getBoundingClientRect(); + const currentX = e.clientX - rect.left; + const currentY = e.clientY - rect.top; + + // Initialize positions if this is the first movement + if (!lastMousePosition || !lastForcePosition) { + lastMousePosition = { x: currentX, y: currentY }; + lastForcePosition = { x: currentX, y: currentY }; + return; + } + + // Store current mouse position + const mouseX = currentX; + const mouseY = currentY; + + // Calculate vector from last mouse position to current + const dx = mouseX - lastMousePosition.x; + const dy = mouseY - lastMousePosition.y; + const distMoved = Math.sqrt(dx * dx + dy * dy); + + // Skip if essentially no movement (avoids numerical issues) + if (distMoved < 0.1) { + return; + } + + // Get the vector from the last force to the current mouse position + const forceDx = mouseX - lastForcePosition.x; + const forceDy = mouseY - lastForcePosition.y; + const forceDistance = Math.sqrt(forceDx * forceDx + forceDy * forceDy); + + // Only create forces if we've moved far enough from the last force + if (forceDistance >= FORCE_SPACING) { + // Calculate the direction vector from last force to current mouse + let dirX = forceDx / forceDistance; + let dirY = forceDy / forceDistance; + + // Calculate how many force points to create + const numPoints = Math.floor(forceDistance / FORCE_SPACING); + + // Calculate movement speed based on the recent movement + const movementSpeed = distMoved; // Simple approximation of speed + + // Scale force strength based on movement speed + let speedFactor; + if (movementSpeed <= MIN_SPEED_THRESHOLD) { + speedFactor = MIN_FORCE_STRENGTH; + } else if (movementSpeed >= MAX_SPEED_THRESHOLD) { + speedFactor = MAX_FORCE_STRENGTH; + } else { + // Linear interpolation between min and max + const t = (movementSpeed - MIN_SPEED_THRESHOLD) / + (MAX_SPEED_THRESHOLD - MIN_SPEED_THRESHOLD); + speedFactor = MIN_FORCE_STRENGTH + + t * (MAX_FORCE_STRENGTH - MIN_FORCE_STRENGTH); + } + + // Store current force position to update incrementally + let currentForceX = lastForcePosition.x; + let currentForceY = lastForcePosition.y; + + // Create evenly spaced force points along the path from last force to current mouse + for (let i = 0; i < numPoints; i++) { + // Calculate position for this force point + const t = (i + 1) / numPoints; + const fx = lastForcePosition.x + forceDx * t; + const fy = lastForcePosition.y + forceDy * t; + + // Create force at this position with the direction vector + createForce(fx, fy, dirX, dirY, speedFactor); + + // Update the last force position to this new force + currentForceX = fx; + currentForceY = fy; + } + + // Update the last force position + lastForcePosition = { x: currentForceX, y: currentForceY }; + } + + // Always update the last mouse position + lastMousePosition = { x: mouseX, y: mouseY }; + } + + // Create a new force + function createForce( + x: number, + y: number, + dx: number, + dy: number, + strength = FORCE_STRENGTH, + ): void { + forces.push({ + x, + y, + dx, + dy, + strength, + radius: 1, + createdAt: Date.now(), + }); + } + + // Improved particle addition with fill strategy options + function addParticles(count: number, inNewAreaOnly: boolean = false): void { + // Determine available space + const minX = -OVERSCAN_PIXELS; + const maxX = width + OVERSCAN_PIXELS; + const minY = -OVERSCAN_PIXELS; + const maxY = height + OVERSCAN_PIXELS; + + // Use a grid system that guarantees uniform spacing of particles + const gridSpacing = REPULSION_RADIUS * 0.8; // Slightly less than repulsion radius + const gridWidth = Math.ceil((maxX - minX) / gridSpacing); + const gridHeight = Math.ceil((maxY - minY) / gridSpacing); + + // Track which grid cells are already occupied + const occupiedCells: Set = new Set(); + + // Mark cells occupied by existing particles + for (const particle of particles) { + const cellX = Math.floor((particle.x - minX) / gridSpacing); + const cellY = Math.floor((particle.y - minY) / gridSpacing); + + // Ensure cell coordinates are within valid range + if (cellX >= 0 && cellX < gridWidth && cellY >= 0 && cellY < gridHeight) { + occupiedCells.add(`${cellX},${cellY}`); + } + } + + // Create arrays of all cells and filter by placement strategy + const allGridCells: { x: number; y: number }[] = []; + + for (let cellY = 0; cellY < gridHeight; cellY++) { + for (let cellX = 0; cellX < gridWidth; cellX++) { + const cellKey = `${cellX},${cellY}`; + if (!occupiedCells.has(cellKey)) { + const posX = minX + (cellX + 0.5) * gridSpacing; + const posY = minY + (cellY + 0.5) * gridSpacing; + + // For new area only placement, filter to expanded areas + if (inNewAreaOnly && previousWidth > 0 && previousHeight > 0) { + const expandedRight = width > previousWidth; + const expandedBottom = height > previousHeight; + + const inNewRightArea = expandedRight && posX >= previousWidth && + posX <= width; + const inNewBottomArea = expandedBottom && posY >= previousHeight && + posY <= height; + + if (inNewRightArea || inNewBottomArea) { + allGridCells.push({ x: cellX, y: cellY }); + } + } else if (!inNewAreaOnly) { + // Standard placement - add all valid cells + allGridCells.push({ x: cellX, y: cellY }); + } + } + } + } + + if (allGridCells.length == 0) { + throw new Error("No cells available to place particles"); + } + + // We now have all grid cells that match our placement criteria + + // If we need more particles than we have available cells, we need to adjust + // gridSpacing to fit more cells into the same space + if (count > allGridCells.length) { + // Retry with a smaller grid spacing + // Proportionally reduce the grid spacing to fit the required number of particles + const scaleFactor = Math.sqrt(allGridCells.length / count); + const newGridSpacing = gridSpacing * scaleFactor; + + // Clear particles and try again with new spacing + // This is a recursive call, but with adjusted parameters that will fit + return addParticlesWithCustomSpacing( + count, + inNewAreaOnly, + newGridSpacing, + ); + } + + // Shuffle the available cells for random selection + shuffleArray(allGridCells); + + // Take the number of cells we need + const cellsToUse = Math.min(count, allGridCells.length); + const selectedCells = allGridCells.slice(0, cellsToUse); + + // Create particles in selected cells + for (const cell of selectedCells) { + // Add jitter within the cell for natural look + const jitterX = (Math.random() - 0.5) * gridSpacing * 0.8; + const jitterY = (Math.random() - 0.5) * gridSpacing * 0.8; + + // Calculate final position + const x = minX + (cell.x + 0.5) * gridSpacing + jitterX; + const y = minY + (cell.y + 0.5) * gridSpacing + jitterY; + + // Create a particle at this position + particles.push(createParticle(x, y)); + } + } + + // Helper function to add particles with custom grid spacing + function addParticlesWithCustomSpacing( + count: number, + inNewAreaOnly: boolean, + gridSpacing: number, + ): void { + if (gridSpacing == 0) throw new Error("Grid spacing is 0"); + // Determine available space + const minX = -OVERSCAN_PIXELS; + const maxX = width + OVERSCAN_PIXELS; + const minY = -OVERSCAN_PIXELS; + const maxY = height + OVERSCAN_PIXELS; + + // Create grid using the custom spacing + const gridWidth = Math.ceil((maxX - minX) / gridSpacing); + const gridHeight = Math.ceil((maxY - minY) / gridSpacing); + + // Track which grid cells are already occupied + const occupiedCells: Set = new Set(); + + // Mark cells occupied by existing particles + for (const particle of particles) { + const cellX = Math.floor((particle.x - minX) / gridSpacing); + const cellY = Math.floor((particle.y - minY) / gridSpacing); + + // Ensure cell coordinates are within valid range + if (cellX >= 0 && cellX < gridWidth && cellY >= 0 && cellY < gridHeight) { + occupiedCells.add(`${cellX},${cellY}`); + } + } + + // Create arrays of all cells and filter by placement strategy + const allGridCells: { x: number; y: number }[] = []; + + for (let cellY = 0; cellY < gridHeight; cellY++) { + for (let cellX = 0; cellX < gridWidth; cellX++) { + const cellKey = `${cellX},${cellY}`; + if (!occupiedCells.has(cellKey)) { + const posX = minX + (cellX + 0.5) * gridSpacing; + const posY = minY + (cellY + 0.5) * gridSpacing; + + // For new area only placement, filter to expanded areas + if (inNewAreaOnly && previousWidth > 0 && previousHeight > 0) { + const expandedRight = width > previousWidth; + const expandedBottom = height > previousHeight; + + const inNewRightArea = expandedRight && posX >= previousWidth && + posX <= width; + const inNewBottomArea = expandedBottom && posY >= previousHeight && + posY <= height; + + if (inNewRightArea || inNewBottomArea) { + allGridCells.push({ x: cellX, y: cellY }); + } + } else if (!inNewAreaOnly) { + // Standard placement - add all valid cells + allGridCells.push({ x: cellX, y: cellY }); + } + } + } + } + + // Shuffle the available cells for random distribution + shuffleArray(allGridCells); + + // Take the number of cells we need (or all if we have fewer) + const cellsToUse = Math.min(count, allGridCells.length); + + // Create particles in selected cells + for (let i = 0; i < cellsToUse; i++) { + const cell = allGridCells[i]; + + // Add jitter within the cell + const jitterX = (Math.random() - 0.5) * gridSpacing * 0.8; + const jitterY = (Math.random() - 0.5) * gridSpacing * 0.8; + + // Calculate final position + const x = minX + (cell.x + 0.5) * gridSpacing + jitterX; + const y = minY + (cell.y + 0.5) * gridSpacing + jitterY; + + // Create a particle at this position + particles.push(createParticle(x, y)); + } + } + + // Utility to shuffle an array (Fisher-Yates algorithm) + function shuffleArray(array: T[]): void { + for (let i = array.length - 1; i > 0; i--) { + const j = Math.floor(Math.random() * (i + 1)); + [array[i], array[j]] = [array[j], array[i]]; + } + } + + // Simplified createParticle function that just places at a specific position + function createParticle(x: number, y: number): Particle { + return { + x: x + (Math.random() * 4 - 2), + y: y + (Math.random() * 4 - 2), + vx: 0, + vy: 0, + charge: 0, + }; + } + + // Function to create a particle on one of the edges + function createParticleOnEdge(): Particle { + // Overscan bounds with fixed pixel size + const minX = -OVERSCAN_PIXELS; + const maxX = width + OVERSCAN_PIXELS; + const minY = -OVERSCAN_PIXELS; + const maxY = height + OVERSCAN_PIXELS; + + let x: number, y: number; + + // Place on one of the edges + const edge = Math.floor(Math.random() * 4); + switch (edge) { + case 0: // Top + x = minX + Math.random() * (maxX - minX); + y = minY; + break; + case 1: // Right + x = maxX; + y = minY + Math.random() * (maxY - minY); + break; + case 2: // Bottom + x = minX + Math.random() * (maxX - minX); + y = maxY; + break; + case 3: // Left + x = minX; + y = minY + Math.random() * (maxY - minY); + break; + default: + x = minX + Math.random() * (maxX - minX); + y = minY + Math.random() * (maxY - minY); + } + + return createParticle(x, y); + } + + // Spatial hashing functions + function getHashKey(x: number, y: number): string { + const cellX = Math.floor(x / CELL_SIZE); + const cellY = Math.floor(y / CELL_SIZE); + return `${cellX},${cellY}`; + } + + function addToSpatialHash(particle: Particle): void { + const key = getHashKey(particle.x, particle.y); + if (!spatialHash[key]) { + spatialHash[key] = []; + } + spatialHash[key].push(particle); + } + + function updateSpatialHash(): void { + // Clear previous hash + spatialHash = {}; + + // Add all particles to hash + for (const particle of particles) { + addToSpatialHash(particle); + } + } + + function getNearbyParticles( + x: number, + y: number, + radius: number, + ): Particle[] { + const result: Particle[] = []; + const cellRadius = Math.ceil(radius / CELL_SIZE); + + const centerCellX = Math.floor(x / CELL_SIZE); + const centerCellY = Math.floor(y / CELL_SIZE); + + for ( + let cellX = centerCellX - cellRadius; + cellX <= centerCellX + cellRadius; + cellX++ + ) { + for ( + let cellY = centerCellY - cellRadius; + cellY <= centerCellY + cellRadius; + cellY++ + ) { + const key = `${cellX},${cellY}`; + const cell = spatialHash[key]; + + if (cell) { + result.push(...cell); + } + } + } + + return result; + } + + // Main update function + function update(): void { + const now = Date.now(); + // Fixed pixel overscan + const minX = -OVERSCAN_PIXELS; + const maxX = width + OVERSCAN_PIXELS; + const minY = -OVERSCAN_PIXELS; + const maxY = height + OVERSCAN_PIXELS; + + // Update spatial hash + updateSpatialHash(); + + // Update forces and remove expired ones + if (forces.length > 40) { + forces = forces.slice(-40); + } + forces = forces.filter((force) => { + force.strength *= 0.95; + force.radius *= 0.95; + return force.strength > 0.001; + }); + + // Update particles + const newParticles: Particle[] = []; + + for (const particle of particles) { + // Apply forces + for (const force of forces) { + const dx = particle.x - force.x; + const dy = particle.y - force.y; + const distSq = dx * dx + dy * dy; + + const radius = force.radius * FORCE_RADIUS; + + if (distSq < radius * radius) { + const dist = Math.sqrt(distSq); + + // Exponential falloff - much more concentrated at center + // (1 - x/R)^n where n controls how sharp the falloff is + const normalizedDist = dist / radius; + const factor = Math.pow(1 - normalizedDist, FORCE_FALLOFF_EXPONENT); + + // Calculate force line projection for directional effect + // This makes particles along the force's path experience stronger effect + const dotProduct = (dx * -force.dx) + (dy * -force.dy); + const projectionFactor = Math.max(0, dotProduct / dist); + + // Apply the combined factors - stronger directional bias + const finalFactor = factor * force.strength * + (0.1 + 0.9 * projectionFactor); + + particle.vx += force.dx * finalFactor; + particle.vy += force.dy * finalFactor; + // charge for the first 100ms + if ((now - force.createdAt) < 100) { + particle.charge = Math.min( + 1, + particle.charge + (finalFactor * finalFactor) * 0.2, + ); + } + } + } + + // Apply repulsion from nearby particles + const nearby = getNearbyParticles( + particle.x, + particle.y, + REPULSION_RADIUS, + ); + + for (const other of nearby) { + if (other === particle) continue; + + const dx = particle.x - other.x; + const dy = particle.y - other.y; + const distSq = dx * dx + dy * dy; + + if (distSq < REPULSION_RADIUS * REPULSION_RADIUS && distSq > 0) { + const dist = Math.sqrt(distSq); + const factor = REPULSION_STRENGTH * (1 - dist / REPULSION_RADIUS); + + const fx = dx / dist * factor; + const fy = dy / dist * factor; + + particle.vx += fx; + particle.vy += fy; + } + } + + // Apply friction + particle.vx *= FRICTION; + particle.vy *= FRICTION; + + // Ensure minimum speed + const speed = Math.sqrt( + particle.vx * particle.vx + particle.vy * particle.vy, + ); + if (speed < MIN_SPEED && speed > 0) { + const scale = MIN_SPEED / speed; + particle.vx *= scale; + particle.vy *= scale; + } + + // Cap at maximum speed + if (speed > MAX_SPEED) { + const scale = MAX_SPEED / speed; + particle.vx *= scale; + particle.vy *= scale; + } + + // Update position + particle.x += particle.vx; + particle.y += particle.vy; + + // Decrease charge + particle.charge *= 0.99; + + // Check if particle is within extended bounds + if ( + particle.x >= minX && particle.x <= maxX && + particle.y >= minY && particle.y <= maxY + ) { + // If outside screen but within overscan, keep it if we need more particles + if ( + (particle.x < 0 || particle.x > width || + particle.y < 0 || particle.y > height) && + newParticles.length >= targetParticleCount + ) { + continue; + } + + newParticles.push(particle); + } else { + // Out of bounds, respawn if needed + if (newParticles.length < targetParticleCount) { + newParticles.push(createParticleOnEdge()); + } + } + } + + // Add more particles if needed + while (newParticles.length < targetParticleCount) { + newParticles.push(createParticleOnEdge()); + } + + particles = newParticles; + } + + // Render function + const mul = isStandalone ? 0.9 : 0.5; + const add = isStandalone ? 0.1 : 0.03; + function render(): void { + if (!ctx) return; + + // Clear canvas + ctx.clearRect(0, 0, width, height); + + // Draw particles + for (const particle of particles) { + // Only draw if within canvas bounds (plus a small margin) + if ( + particle.x >= -PARTICLE_RADIUS && + particle.x <= width + PARTICLE_RADIUS && + particle.y >= -PARTICLE_RADIUS && particle.y <= height + PARTICLE_RADIUS + ) { + ctx.beginPath(); + ctx.arc(particle.x, particle.y, PARTICLE_RADIUS, 0, Math.PI * 2); + + // Color based on charge + ctx.fillStyle = "#FFCB1F"; + ctx.globalAlpha = (particle.charge * mul + add) * globalOpacity; + ctx.fill(); + } + } + + // // Debug: Draw forces and falloff visualization + // if (ctx) { + // for (const force of forces) { + // const R = force.radius * FORCE_RADIUS; + + // // Draw force point + // ctx.beginPath(); + // ctx.arc(force.x, force.y, 5, 0, Math.PI * 2); + // ctx.fillStyle = 'rgba(255, 0, 0, 0.5)'; + // ctx.fill(); + + // // Draw force direction + // ctx.beginPath(); + // ctx.moveTo(force.x, force.y); + // ctx.lineTo(force.x + force.dx * 20, force.y + force.dy * 20); + // ctx.strokeStyle = 'red'; + // ctx.stroke(); + + // // Visualize the falloff curve with rings + // for (let i = 0; i <= 10; i++) { + // const radius = (R * i) / 10; + // const normalizedDist = radius / R; + // const intensity = Math.pow(1 - normalizedDist, FORCE_FALLOFF_EXPONENT); + + // ctx.beginPath(); + // ctx.arc(force.x, force.y, radius, 0, Math.PI * 2); + // ctx.strokeStyle = `rgba(255, 0, 0, ${intensity * 0.2})`; + // ctx.stroke(); + // } + // } + // } + } + + // Animation loop + let r = Math.random(); + function animate(): void { + globalOpacity = Math.min(1, globalOpacity + 0.03); + update(); + render(); + + if (isRunning) { + animationId = requestAnimationFrame(animate); + } + } + + // Start/stop functions + function start(): void { + if (isRunning) return; + + // Calculate target particle count based on canvas size + targetParticleCount = Math.floor(width * height * PARTICLE_DENSITY); + + // Clear any existing particles and create new ones with proper spacing + particles = []; + addParticles(targetParticleCount); + + isRunning = true; + animate(); + } + + function stop(): void { + isRunning = false; + + if (animationId !== null) { + cancelAnimationFrame(animationId); + animationId = null; + } + } + + init(); + return cleanup; +}; diff --git a/src/file-viewer/scripts/canvas_2022.ts b/src/file-viewer/scripts/canvas_2022.ts new file mode 100644 index 0000000..4f03027 --- /dev/null +++ b/src/file-viewer/scripts/canvas_2022.ts @@ -0,0 +1,160 @@ +(globalThis as any).canvas_2022 = function (canvas: HTMLCanvasElement) { + const isStandalone = canvas.getAttribute("data-standalone") === "true"; + // Configuration for the grid of rotating squares + const config = { + gridRotation: 20, // Overall grid rotation in degrees + squareSize: 20, // Size of each square + spacing: 100, // Distance between square centers + moveSpeedX: 0.01, // Horizontal movement speed (pixels per second) + moveSpeedY: 0.01, // Vertical movement speed (pixels per second) + squareColor: "#00220A", // Color of the squares + squareOpacity: 1, // Opacity of the squares + + // Function to determine square rotation based on its coordinates and time + // Can be adjusted for different patterns + rotationFunction: (x: number, y: number, time: number): number => { + // Combination of spatial wave and time-based rotation + return Math.sin(x * 0.05) * Math.cos(y * 0.05) * 180; + }, + }; + + // Convert grid rotation to radians + const gridRotationRad = (config.gridRotation * Math.PI) / 180; + + // Get the canvas context + const ctx = canvas.getContext("2d"); + if (!ctx) { + console.error("Could not get canvas context"); + return () => {}; + } + + // Make canvas transparent + if (isStandalone) { + canvas.style.backgroundColor = "#154226"; + } else { + canvas.style.backgroundColor = "transparent"; + } + + // Animation variables + let width = canvas.width; + let height = canvas.height; + let offsetX = 0; + let offsetY = 0; + let time = 0; + let animationFrameId: number; + let lastTime = 0; + + // Update canvas dimensions when resized + const updateDimensions = () => { + width = canvas.width = canvas.clientWidth; + height = canvas.height = canvas.clientHeight; + }; + + // Calculate the diagonal length of the canvas (to ensure rotation covers corners) + const calculateDiagonal = () => { + return Math.sqrt(width * width + height * height); + }; + + // Draw a single square with rotation + const drawSquare = (x: number, y: number, size: number, rotation: number) => { + ctx.save(); + + // Move to the center of the square position, rotate, then draw + ctx.translate(x, y); + ctx.rotate((rotation * Math.PI) / 180); // Convert rotation degrees to radians + + // Draw square centered at position + ctx.fillRect(-size / 2, -size / 2, size, size); + + ctx.restore(); + }; + + // Draw the entire grid of squares + const drawGrid = () => { + ctx.clearRect(0, 0, width, height); + + // Set drawing properties + ctx.fillStyle = config.squareColor; + ctx.globalAlpha = config.squareOpacity; + + // Save the current transformation state + ctx.save(); + + // Move to the center of the canvas, rotate the grid, then move back + const centerX = width / 2; + const centerY = height / 2; + ctx.translate(centerX, centerY); + ctx.rotate(gridRotationRad); + + // Calculate how much of the grid to draw based on canvas size + const diagonal = calculateDiagonal(); + const gridSize = Math.ceil(diagonal / config.spacing) + 2; + + // Adjust for offset to create movement + const adjustedOffsetX = offsetX % config.spacing; + const adjustedOffsetY = offsetY % config.spacing; + + // Draw grid with enough squares to cover the rotated canvas + const halfGrid = Math.ceil(gridSize / 2); + + for (let y = -halfGrid; y <= halfGrid; y++) { + for (let x = -halfGrid; x <= halfGrid; x++) { + // Calculate actual position with offset + const posX = x * config.spacing + adjustedOffsetX; + const posY = y * config.spacing + adjustedOffsetY; + + // Calculate square rotation based on its position and time + const squareRotation = config.rotationFunction(posX, posY, time); + + // Draw the square + drawSquare(posX, posY, config.squareSize, squareRotation); + } + } + + // Restore the transformation state + ctx.restore(); + + // Reset global alpha + ctx.globalAlpha = 1.0; + }; + + // Animation loop + const animate = (currentTime: number) => { + animationFrameId = requestAnimationFrame(animate); + + // Calculate time elapsed since last frame + const elapsed = currentTime - lastTime; + lastTime = currentTime; + + // Update time variable for rotation function + time += elapsed; + + // Update position offsets for movement + offsetX += config.moveSpeedX * elapsed; + offsetY += config.moveSpeedY * elapsed; + + // Draw the grid + drawGrid(); + }; + + // Initialize the animation + const init = () => { + // Set up resize handler + window.addEventListener("resize", updateDimensions); + + // Initial setup + updateDimensions(); + + // Start animation + animationFrameId = requestAnimationFrame(animate); + }; + + // Start the animation + init(); + + // Return cleanup function + return () => { + window.removeEventListener("resize", updateDimensions); + cancelAnimationFrame(animationFrameId); + }; +}; diff --git a/src/file-viewer/scripts/canvas_2023.ts b/src/file-viewer/scripts/canvas_2023.ts new file mode 100644 index 0000000..ce8bf1c --- /dev/null +++ b/src/file-viewer/scripts/canvas_2023.ts @@ -0,0 +1,197 @@ +(globalThis as any).canvas_2023 = function (canvas: HTMLCanvasElement) { + const isStandalone = canvas.getAttribute("data-standalone") === "true"; + const config = { + heartBaseSize: 50, + heartMaxSize: 100, + spacing: 150, + rowSpeed: 0.1, + heartColor: "#FF90D9", + heartOpacity: isStandalone ? 0.5 : 0.04, + mouseInfluenceRadius: 1000, + heartScaleFunction: (distance: number, radius: number): number => { + if (distance > radius) return 1; + + const normalizedDistance = distance / radius; + const scaleFactor = 1 + + (1 - normalizedDistance) * + (config.heartMaxSize / config.heartBaseSize - 1); + + return 1 + (scaleFactor - 1) * Math.pow(1 - normalizedDistance, 2); + }, + }; + + const heart = new Path2D( + "M23.9451 45.3973L20.8672 42.6493C16.9551 39.0174 13.7054 35.8927 11.1181 33.275C8.53056 30.6574 6.46731 28.286 4.92839 26.1608C3.38946 24.0356 2.31772 22.1028 1.71314 20.3624C1.10856 18.6219 0.806274 16.8705 0.806274 15.1081C0.806274 11.4718 2.03118 8.42016 4.481 5.95312C6.93118 3.48608 9.93831 2.25256 13.5024 2.25256C15.5649 2.25256 17.482 2.70142 19.2536 3.59912C21.0255 4.49682 22.5893 5.80674 23.9451 7.52887C25.484 5.73346 27.1059 4.40522 28.8108 3.54416C30.5161 2.6831 32.3751 2.25256 34.3877 2.25256C38.0141 2.25256 41.0551 3.48663 43.5108 5.95477C45.9661 8.42291 47.1938 11.4758 47.1938 15.1136C47.1938 16.8712 46.8823 18.6115 46.2594 20.3343C45.6365 22.0568 44.5648 23.9807 43.0442 26.1059C41.5236 28.231 39.4721 30.6136 36.8896 33.2536C34.3068 35.8936 31.0362 39.0255 27.0779 42.6493L23.9451 45.3973ZM23.9176 38.802C27.6088 35.431 30.6339 32.5547 32.9928 30.173C35.3518 27.7913 37.2091 25.7211 38.5648 23.9624C39.9205 22.2036 40.864 20.6137 41.3953 19.1928C41.9266 17.7715 42.1923 16.4101 42.1923 15.1086C42.1923 12.8768 41.4529 11.0098 39.974 9.50748C38.4952 8.0052 36.6461 7.25406 34.4268 7.25406C32.631 7.25406 30.9572 7.6811 29.4055 8.87193C27.8537 10.0628 25.5389 13.0434 25.5389 13.0434L23.9451 15.3299L22.3512 13.0434C22.3512 13.0434 20.0643 10.2311 18.4638 9.04031C16.8634 7.84948 15.2194 7.25406 13.4991 7.25406C11.2929 7.25406 9.46857 7.98816 8.02602 9.45637C6.58383 10.9246 5.86273 12.8162 5.86273 15.1311C5.86273 16.4784 6.13644 17.8679 6.68386 19.2994C7.23127 20.731 8.18394 22.3333 9.54185 24.1064C10.8998 25.879 12.7329 27.9562 15.0413 30.3379C17.3497 32.7196 20.3084 35.5409 23.9176 38.802Z", + ); + + const ctx = canvas.getContext("2d"); + if (!ctx) { + console.error("Could not get canvas context"); + return () => {}; + } + + if (isStandalone) { + canvas.style.backgroundColor = "#2F1C21"; + } else { + canvas.style.backgroundColor = "transparent"; + } + + let width = canvas.width; + let height = canvas.height; + let animationFrameId: number; + let lastFrameTime = 0; + + let mouseX = width / 2; + let mouseY = height / 2; + + let offset = config.spacing / 2; + + const updateDimensions = () => { + width = canvas.width = canvas.clientWidth; + height = canvas.height = canvas.clientHeight; + + mouseX = width / 2; + mouseY = height / 2; + }; + + const drawHeart = (x: number, y: number, size: number) => { + const scale = size / 30; + + ctx.save(); + ctx.translate(x, y); + ctx.scale(scale, scale); + + ctx.fillStyle = config.heartColor; + ctx.fill(heart); + + ctx.restore(); + }; + + const c = 400; + const h = 40; + const k = solveForK(c, h); + + const drawHeartGrid = () => { + ctx.clearRect(0, 0, width, height); + + ctx.globalAlpha = config.heartOpacity; + + const numRows = Math.ceil(height / config.spacing) + 1; + + for (let row = 0; row < numRows; row++) { + const direction = row % 2 === 0 ? 1 : -1; + const rowOffset = (offset * direction) % config.spacing; + + const posYInit = row * config.spacing + config.spacing / 2; + + for ( + let posXInit = -config.spacing + rowOffset; + posXInit < width + config.spacing; + posXInit += config.spacing + ) { + const dx = (posXInit + config.heartBaseSize / 2) - mouseX; + const dy = (posYInit + config.heartBaseSize / 2) - mouseY; + const distance = Math.sqrt(dx * dx + dy * dy); + + const pushIntensity = asymmetricBump(distance, h, c, k, 0.00002); + + const pushAngle = Math.atan2(dy, dx); + + const pushDistanceX = pushIntensity * Math.cos(pushAngle); + const pushDistanceY = pushIntensity * Math.sin(pushAngle); + const posX = posXInit + pushDistanceX * 1; + const posY = posYInit + pushDistanceY * 2; + + const scaleFactor = config.heartScaleFunction( + distance, + config.mouseInfluenceRadius, + ); + const heartSize = config.heartBaseSize * scaleFactor; + + if ( + posX > -config.heartMaxSize && + posX < width + config.heartMaxSize && + posY > -config.heartMaxSize && + posY < height + config.heartMaxSize + ) { + drawHeart(posX - heartSize / 2, posY - heartSize / 2, heartSize); + } + } + } + + ctx.globalAlpha = 1.0; + }; + + function solveForK(c: number, k: number) { + // input -> f(x)=h*e^{(-k*(x-c)^{2})} + // desired result is (0, 0.45). (0, 0) is unsolvable but 0.45px will round down to 0. + // + // solution: -\frac{\ln\left(\frac{0.45}{h}\right)}{c^{2}} + return -Math.log(0.45 / h) / (c * c); + } + + function asymmetricBump( + x: number, + h: number, + c: number, + leftK: number, + rightK: number, + ) { + const k = (x <= c) ? leftK : rightK; + return h * Math.exp(-k * Math.pow(x - c, 2)); + } + + const updateOffset = (elapsed: number) => { + offset += config.rowSpeed * elapsed; + + if (offset > 1000000) { + offset -= 1000000; + } + }; + + const animate = (currentTime: number) => { + animationFrameId = requestAnimationFrame(animate); + + const elapsed = currentTime - lastFrameTime; + lastFrameTime = currentTime; + + updateOffset(elapsed * 0.05); + + drawHeartGrid(); + }; + + const handleMouseMove = (event: MouseEvent) => { + const rect = canvas.getBoundingClientRect(); + mouseX = event.clientX - rect.left; + mouseY = event.clientY - rect.top; + }; + + const handleTouchMove = (event: TouchEvent) => { + if (event.touches.length > 0) { + event.preventDefault(); + const rect = canvas.getBoundingClientRect(); + mouseX = event.touches[0].clientX - rect.left; + mouseY = event.touches[0].clientY - rect.top; + } + }; + + const init = () => { + window.addEventListener("resize", updateDimensions); + document.addEventListener("mousemove", handleMouseMove); + document.addEventListener("touchmove", handleTouchMove, { passive: false }); + + updateDimensions(); + + lastFrameTime = performance.now(); + animationFrameId = requestAnimationFrame(animate); + }; + + init(); + + return () => { + window.removeEventListener("resize", updateDimensions); + document.removeEventListener("mousemove", handleMouseMove); + document.removeEventListener("touchmove", handleTouchMove); + cancelAnimationFrame(animationFrameId); + }; +}; diff --git a/src/file-viewer/scripts/canvas_2024.ts b/src/file-viewer/scripts/canvas_2024.ts new file mode 100644 index 0000000..6bab57f --- /dev/null +++ b/src/file-viewer/scripts/canvas_2024.ts @@ -0,0 +1,251 @@ +// Vibe coded with AI +(globalThis as any).canvas_2024 = function (canvas: HTMLCanvasElement) { + const isStandalone = canvas.getAttribute("data-standalone") === "true"; + if (isStandalone) { + canvas.parentElement!.style.backgroundColor = "black"; + } + + const gl = canvas.getContext("webgl", { + alpha: true, + premultipliedAlpha: false, + }); + if (!gl) { + console.error("WebGL not supported"); + return () => {}; + } + + canvas.style.imageRendering = "pixelated"; + canvas.style.opacity = isStandalone ? "0.3" : "0.15"; + + // Resize canvas to match display size + const resize = () => { + const displayWidth = Math.floor( + (canvas.clientWidth || window.innerWidth) / 3, + ); + const displayHeight = Math.floor( + (canvas.clientHeight || window.innerHeight) / 3, + ); + + if (canvas.width !== displayWidth || canvas.height !== displayHeight) { + canvas.width = displayWidth; + canvas.height = displayHeight; + gl.viewport(0, 0, canvas.width, canvas.height); + } + }; + resize(); + + // Vertex shader (just passes coordinates) + const vertexShaderSource = ` + attribute vec2 a_position; + void main() { + gl_Position = vec4(a_position, 0.0, 1.0); + } + `; + + // Fragment shader creates random noise with higher opacity to ensure visibility + const fragmentShaderSource = ` + precision mediump float; + uniform float u_time; + + float noise1(float seed1,float seed2){ + return( + fract(seed1+12.34567* + fract(100.*(abs(seed1*0.91)+seed2+94.68)* + fract((abs(seed2*0.41)+45.46)* + fract((abs(seed2)+757.21)* + fract(seed1*0.0171)))))) + * 1.0038 - 0.00185; + } + + float n(float seed1, float seed2, float seed3){ + float buff1 = abs(seed1+100.81) + 1000.3; + float buff2 = abs(seed2+100.45) + 1000.2; + float buff3 = abs(noise1(seed1, seed2)+seed3) + 1000.1; + buff1 = (buff3*fract(buff2*fract(buff1*fract(buff2*0.146)))); + buff2 = (buff2*fract(buff2*fract(buff1+buff2*fract(buff3*0.52)))); + buff1 = noise1(buff1, buff2); + return(buff1); + } + + void main() { + float noise = n(gl_FragCoord.x, gl_FragCoord.y, u_time); + + gl_FragColor = vec4(1.0, 0.7, 0.7, 0.8*noise); + } + `; + + // Create and compile shaders + const vertexShader = createShader(gl, gl.VERTEX_SHADER, vertexShaderSource); + const fragmentShader = createShader( + gl, + gl.FRAGMENT_SHADER, + fragmentShaderSource, + ); + + // Check if shader creation failed + if (!vertexShader || !fragmentShader) { + console.error("Failed to create shaders"); + return () => {}; + } + + // Create program and link shaders + const program = createProgram(gl, vertexShader, fragmentShader); + + // Check if program creation failed + if (!program) { + console.error("Failed to create program"); + return () => {}; + } + + // Get attribute and uniform locations + const positionAttributeLocation = gl.getAttribLocation(program, "a_position"); + const timeUniformLocation = gl.getUniformLocation(program, "u_time"); + + // Create a position buffer for a rectangle covering the entire canvas + const positionBuffer = gl.createBuffer(); + if (!positionBuffer) { + console.error("Failed to create position buffer"); + return () => {}; + } + + gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer); + // Rectangle that covers the entire clip space + const positions = [ + -1.0, + -1.0, // bottom left + 1.0, + -1.0, // bottom right + -1.0, + 1.0, // top left + 1.0, + 1.0, // top right + ]; + gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(positions), gl.STATIC_DRAW); + + // Set up blending + gl.enable(gl.BLEND); + gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA); + + // Fixed 24 FPS timing + const FPS = 24; + const FRAME_TIME = 1000 / FPS; // ms per frame + + // Handle animation + let animationTimerId: number; + let startTime = Date.now(); + let lastFrameTime = 0; + + const render = () => { + // Get current time + const currentTime = Date.now(); + const deltaTime = currentTime - lastFrameTime; + + // Skip frame if it's too early (maintain 24 FPS) + if (deltaTime < FRAME_TIME) { + animationTimerId = window.setTimeout(render, 0); // Check again ASAP but yield to browser + return; + } + + // Update last frame time, accounting for any drift + lastFrameTime = currentTime - (deltaTime % FRAME_TIME); + + // Resize canvas if needed + resize(); + + // Calculate elapsed time in seconds for animation + const elapsedTime = (currentTime - startTime) / 1000; + + // Clear the canvas with transparent black + gl.clearColor(0, 0, 0, 0); + gl.clear(gl.COLOR_BUFFER_BIT); + + // Use our shader program + gl.useProgram(program); + + // Set up the position attribute + gl.enableVertexAttribArray(positionAttributeLocation); + gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer); + gl.vertexAttribPointer( + positionAttributeLocation, + 2, // 2 components per vertex + gl.FLOAT, // data type + false, // normalize + 0, // stride (0 = compute from size and type) + 0, // offset + ); + + // Update time uniform for animation + gl.uniform1f(timeUniformLocation, elapsedTime); + + // Draw the rectangle (2 triangles) + gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4); + + // Schedule next frame (aiming for 24 FPS) + const timeToNextFrame = Math.max( + 0, + FRAME_TIME - (Date.now() - currentTime), + ); + animationTimerId = window.setTimeout(render, timeToNextFrame); + }; + + // Helper function to create shaders + function createShader( + gl: WebGLRenderingContext, + type: number, + source: string, + ): WebGLShader | null { + const shader = gl.createShader(type); + if (!shader) { + console.error("Failed to create shader object"); + return null; + } + + gl.shaderSource(shader, source); + gl.compileShader(shader); + + if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) { + console.error("Shader compilation error:", gl.getShaderInfoLog(shader)); + gl.deleteShader(shader); + return null; + } + + return shader; + } + + // Helper function to create program and link shaders + function createProgram( + gl: WebGLRenderingContext, + vertexShader: WebGLShader, + fragmentShader: WebGLShader, + ): WebGLProgram | null { + const program = gl.createProgram(); + if (!program) { + console.error("Failed to create program object"); + return null; + } + + gl.attachShader(program, vertexShader); + gl.attachShader(program, fragmentShader); + gl.linkProgram(program); + + if (!gl.getProgramParameter(program, gl.LINK_STATUS)) { + console.error("Program linking error:", gl.getProgramInfoLog(program)); + return null; + } + + return program; + } + + // Start the rendering with initial timestamp + lastFrameTime = Date.now(); + render(); + + // Return cleanup function + return () => { + clearTimeout(animationTimerId); + if (program) gl.deleteProgram(program); + if (vertexShader) gl.deleteShader(vertexShader); + if (fragmentShader) gl.deleteShader(fragmentShader); + if (positionBuffer) gl.deleteBuffer(positionBuffer); + }; +}; diff --git a/src/file-viewer/scripts/canvas_cotyledon.ts b/src/file-viewer/scripts/canvas_cotyledon.ts new file mode 100644 index 0000000..b5e2ef0 --- /dev/null +++ b/src/file-viewer/scripts/canvas_cotyledon.ts @@ -0,0 +1,362 @@ +// @ts-ignore +globalThis.canvas_cotyledon = function ( + canvas: HTMLCanvasElement, + panel: HTMLElement, +) { + let running = true; + const ctx = canvas.getContext("2d"); + + function resizeCanvas() { + canvas.width = canvas.clientWidth; + canvas.height = canvas.clientHeight; + } + + resizeCanvas(); + window.addEventListener("resize", resizeCanvas); + + const clover = new Path2D( + "M18.9845 34.4839C20.4004 34.5218 21.8336 34.6883 23.2644 34.9578C20.1378 31.095 18.4268 27.1546 18.0555 23.2959C17.321 15.6622 21.9022 9.36595 28.8908 5.78535C34.6355 2.84212 40.258 2.98454 44.2809 5.96879C45.6605 6.99221 46.7683 8.2886 47.5877 9.78593C48.3054 8.50307 49.134 7.26623 50.0858 6.17951C51.8368 4.18037 54.1947 2.47127 57.2294 2.15019C60.2768 1.82766 63.467 2.9608 66.7548 5.52299C70.9834 8.81811 73.084 12.8864 73.5996 17.2135C74.1044 21.4504 73.0711 25.7433 71.4155 29.6117C70.6566 31.3849 69.7488 33.1106 68.7557 34.7506C70.3664 33.9983 72.0168 33.3376 73.6816 32.8312C77.2262 31.7528 81.0258 31.3024 84.8151 32.2149C88.6451 33.1371 92.2246 35.3946 95.3823 39.3157C98.4534 43.1293 99.9219 46.6818 99.997 49.9677C100.073 53.3033 98.7051 55.9829 96.8652 57.9789C95.0586 59.9387 92.7653 61.2872 90.7505 62.1315C90.692 62.1561 90.6334 62.1802 90.5746 62.2042L90.4465 62.256C91.4852 63.7304 92.4724 65.5955 93.0127 67.6979C93.5916 69.9509 93.6669 72.5285 92.674 75.1356C91.679 77.7482 89.7006 80.1559 86.5767 82.2161C86.5556 82.23 86.5342 82.2438 86.5126 82.2571C84.1333 83.7267 81.5504 84.7197 78.6932 84.9352C75.832 85.151 72.8634 84.5742 69.7337 83.1522C64.7667 80.8953 59.274 76.4525 52.8745 69.3645C52.8789 70.1568 52.8844 70.9254 52.9004 71.6677C52.9643 74.6226 53.1868 77.4534 54.0666 80.6265C55.2259 84.503 57.2821 88.4684 60.9561 92.3161C61.644 93.0366 61.8512 94.0908 61.4872 95.018L60.9919 96.2799C60.6464 97.16 59.8435 97.778 58.9041 97.8865C57.9647 97.9952 57.042 97.5769 56.5047 96.7985C52.5406 91.0574 50.3441 86.3289 49.1491 82.0434C48.0155 78.2319 47.6244 74.4579 47.5085 71.0024C45.418 73.6873 42.8696 76.4687 40.0618 78.9101C34.3517 83.8756 26.6803 88.1931 19.142 85.9955C15.5301 84.9425 12.8635 83.2751 11.0848 81.1179C9.2952 78.9474 8.5557 76.4627 8.4981 74.0631C8.43961 71.6256 9.07998 69.225 10.075 67.1703C7.76333 66.828 5.38011 65.9682 3.47071 64.2327C-0.339092 60.7699 -1.2199 54.8876 1.86982 46.4552C3.47011 42.0878 5.90372 38.9798 8.98328 37.0179C12.0444 35.0677 15.5215 34.3912 18.9845 34.4839Z", + ); + + // Background + const base = [0x14, 0x1a, 0x19]; + + let blobTextureCanvas: OffscreenCanvas; + let blobTextureCtx: OffscreenCanvasRenderingContext2D; + const blobSize = 1000; // Size of the noise texture + { + const blobTexture = new ImageData(blobSize, blobSize); + const data = blobTexture.data; + + let x = 0; + let y = 0; + for (let i = 0; i < data.length; i += 4) { + if (x >= blobSize) { + x = 0; + y++; + } + + const noiseX = Math.sin(x * .2 + y * .1) * 0.03; + const noiseY = Math.cos(y * .6 + x * .2) * 0.05; + + const centerX = blobSize / 2; + const centerY = blobSize / 2; + const dx = (x + noiseX) - centerX; + const dy = (y + noiseY) - centerY; + const distanceFromCenterRaw = (dx * dx + dy * dy) ** 0.5; + + const maxDistance = blobSize / 2; + const distanceFromCenter = Math.min( + 1, + distanceFromCenterRaw / maxDistance, + ); + + const noiseValue = (1 - 0.5 * Math.sin(x * 0.02 - y * 0.04)) * + (1 - 0.5 * Math.cos(x * 0.03 + y * 0.04)) * 0.3; + + const gradient = (1 - distanceFromCenter) * + (0.95 - distanceFromCenter * 0.4); + const finalValue = Math.max( + 0, + Math.min(1, gradient * (Math.random() * 0.3 + 0.85 + noiseValue)), + ); + + data[i] = 121; + data[i + 1] = 219; + data[i + 2] = 160; + data[i + 3] = Math.floor(finalValue * 255.99); // Alpha + x++; + } + blobTextureCanvas = new OffscreenCanvas(blobSize, blobSize); + blobTextureCtx = blobTextureCanvas.getContext("2d")!; + blobTextureCtx.putImageData(blobTexture, 0, 0); + } + + class CotyledonParticle { + x: number; + y: number; + size: number; + velocityX: number; + velocityY: number; + rotation: number; + rotationSpeed: number; + color: string; + + constructor(positioning: "random" | "edge") { + this.size = Math.random() * 0.1 + 0.6; + + if (positioning === "edge") { + const edge = Math.floor(Math.random() * 5); + if (edge === 0 || edge === 1) { + // Right edge + this.x = 1.05; + this.y = Math.random(); + this.velocityX = -Math.random() * 0.1 - 0.2; + this.velocityY = 0; + } else if (edge === 2 || edge === 3) { + // Top edge + this.x = Math.random(); + this.y = -0.05; + this.velocityX = -Math.random() * 0.1 - 0.1; + this.velocityY = -Math.random() * 0.2 - 0.05; + } else { + // Bottom edge + this.x = Math.random() * 0.5 + 0.5; + this.y = 1.05; + this.velocityX = Math.random() * 0.1 + 0.1; + this.velocityY = -Math.random() * 0.3 - 0.1; + } + } else { + let tries = 0; + do { + this.x = Math.random(); + this.y = Math.random(); + this.velocityX = -Math.random() * 0.05 - 0.1; + this.velocityY = -Math.random() * 0.2 + 0.1; + } while (this.tooCloseToAnyOtherParticle() && (tries++ < 10)); + } + + this.rotation = Math.random() * Math.PI * 2; + this.rotationSpeed = (Math.random() * 0.003 - 0.0015) * + (Math.random() > 0.5 ? 1 : -1); + + const opacity = Math.random() * 0.4 + 0.2; + this.color = `rgba(${ + base.map((x) => x + Math.floor(x * opacity)).join(",") + }, 1)`; + } + + tooCloseToAnyOtherParticle() { + for (let i = 0; i < cotyledonParticles.length; i++) { + const otherParticle = cotyledonParticles[i]; + const distance = Math.sqrt( + (this.x - otherParticle.x) ** 2 + (this.y - otherParticle.y) ** 2, + ); + if (distance < 0.1) { + return true; + } + } + } + + update() { + if (this.velocityY < 0.01) { + this.velocityY += 0.00025; + } + this.velocityX -= 0.0001; + this.x += this.velocityX / 1300; + this.y += this.velocityY / 1000; + this.rotation += this.rotationSpeed; + return this.x < -0.05 || (this.y > 1 && this.velocityY < 0); + } + + draw() { + if (!ctx) return; + + ctx.save(); + ctx.translate(this.x * canvas.width, this.y * canvas.height); + ctx.rotate(this.rotation); + ctx.scale(this.size, this.size); + ctx.translate(-50, -50); + ctx.fillStyle = this.color; + ctx.fill(clover); + ctx.restore(); + } + } + + class BlobParticle { + x: number; + y: number; + opacity: number; + state: 0 | 1 | 2; + stateTime: number; + stayDuration: number; + innerColor: string; + rot: number = Math.random() * Math.PI * 2; + + constructor() { + this.x = Math.random() * 0.6 + 0.2; + this.y = Math.random() * 0.6 + 0.2; + + this.opacity = 0; // Start fully transparent + + this.state = 0; + this.stateTime = 0; + this.stayDuration = Math.random() * 10000 + 5000; // Random stay duration between 5-15 seconds + + const colorMultiplier = Math.random() * 0.5 + 1.5; // 0.5-1.0 multiplier + const colorValues = base.map((x) => Math.floor(x * colorMultiplier)); + this.innerColor = `rgba(${colorValues.join(",")}, 1)`; + } + + update(deltaTime: number) { + this.stateTime += deltaTime; + + if (this.state === 0) { + this.opacity = Math.min(1, this.stateTime / 15000); + if (this.stateTime >= 15000) { + this.state = 1; + this.stateTime = 0; + } + } else if (this.state === 1) { + if (this.stateTime >= this.stayDuration) { + this.state = 2; + this.stateTime = 0; + } + } else if (this.state === 2) { + this.opacity = Math.max(0, 1 - (this.stateTime / 15000)); + if (this.stateTime >= 15000) { + return true; + } + } + return false; + } + + draw() { + if (!ctx) return; + + const screenX = this.x * canvas.width; + const screenY = this.y * canvas.height; + const screenSize = (Math.min(canvas.width, canvas.height) * 2) / blobSize; + + ctx.save(); + ctx.translate(screenX - screenSize * 0.5, screenY - screenSize * 0.5); + ctx.scale(screenSize, screenSize); + ctx.rotate(this.rot); + ctx.globalAlpha = this.opacity * 0.2; + ctx.globalCompositeOperation = "overlay"; + ctx.drawImage(blobTextureCanvas, 0, 0); + ctx.restore(); + } + } + + const cotyledonParticles: CotyledonParticle[] = []; + const blobParticles: BlobParticle[] = []; + let blobParticleTop: BlobParticle = new BlobParticle(); + for (let i = 0; i < 80; i++) { + cotyledonParticles.push(new CotyledonParticle("random")); + } + for (let i = 0; i < 9; i++) { + const blobParticle = new BlobParticle(); + if (i < 4) { + blobParticle.state = 1; + blobParticle.opacity = 1; + blobParticle.stayDuration = Math.random() * 10000; + } else { + blobParticle.state = i < 7 ? 2 : 0; + blobParticle.stateTime = Math.random() * 15000; + } + if (i > 0) { + do { + blobParticle.x = Math.random(); + blobParticle.y = Math.random(); + } while ( + blobParticles.some((p) => + Math.sqrt((p.x - blobParticle.x) ** 2 + (p.y - blobParticle.y) ** 2) < + 0.1 + ) + ); + } + blobParticles.push(blobParticle); + } + + let lastTime = performance.now(); + + function animate(currentTime: number) { + if (!running) return; + if (!ctx) return; + + const deltaTime = currentTime - lastTime; + lastTime = currentTime; + + ctx.clearRect(0, 0, canvas.width, canvas.height); + + for (let i = blobParticles.length - 1; i >= 0; i--) { + const shouldRemove = blobParticles[i].update(deltaTime); + if (shouldRemove) { + blobParticles[i] = new BlobParticle(); + } else { + blobParticles[i].draw(); + } + } + + for (let i = cotyledonParticles.length - 1; i >= 0; i--) { + const shouldRemove = cotyledonParticles[i].update(); + if (shouldRemove) { + cotyledonParticles[i] = new CotyledonParticle("edge"); + } else { + cotyledonParticles[i].draw(); + } + } + + if (blobParticleTop.update(deltaTime)) { + blobParticleTop = new BlobParticle(); + } + blobParticleTop.draw(); + + requestAnimationFrame(animate); + } + + let clickedButton = false; + const enterButton = panel.querySelector("button#enter")!; + enterButton.addEventListener("click", () => { + if (clickedButton) return; + clickedButton = true; + const first = panel.querySelector("#first")! as HTMLElement; + const second = panel.querySelector("#captcha")! as HTMLElement; + first.style.transition = second.style.transition = "opacity 1s ease-in-out"; + first.style.opacity = "0"; + second.style.opacity = "0"; + setTimeout(() => { + first.style.display = "none"; + second.style.display = "block"; + setTimeout(() => { + second.style.opacity = "1"; + + document.getElementById("enter2")?.addEventListener("click", () => { + second.style.opacity = "0"; + let p = fetch("/file/cotyledon", { + method: "POST", + body: "I AGREE", + }); + setTimeout(() => { + p.then(() => { + location.reload(); + }); + }, 1000); + }); + }, 10); + }, 1000); + }); + const imageButtons = panel.querySelectorAll(".image-grid button")!; + imageButtons.forEach((button) => { + let canClick = true; + button.addEventListener("click", () => { + if (!canClick) return; + canClick = false; + const image = button.querySelector("img")!; + image.style.transition = "opacity 0.05s linear"; + image.style.opacity = "0"; + setTimeout(() => { + image.style.transition = "opacity 2s linear"; + let newNum; + do { + newNum = Math.floor(Math.random() * 18); // 0-17 inclusive + } while ( + document.querySelector(`img[src="/captcha/image/${newNum}.jpeg"]`) + ); + image.setAttribute("src", `/captcha/image/${newNum}.jpeg`); + setTimeout(() => { + image.style.opacity = "0.75"; + canClick = true; + }, 50); + }, 300); + }); + }); + + // Start animation + animate(performance.now()); + return () => { + window.removeEventListener("resize", resizeCanvas); + running = false; + }; +}; diff --git a/src/file-viewer/static/captcha/0.jpeg b/src/file-viewer/static/captcha/0.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..3ceedb3494e44e374db0f81ded1446dbcab3e1b8 GIT binary patch liter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lkG`ndk;uI?g3JBM4R5~#hB z&ues?ldBC_UH7;3IKb-d8rJdBg^`#1X1BN7@Rb9Q#_hro`-W?b{vDZP0ob{VJL4F@ z-hP2dR+(tz!XcPib5eQtU!e zomWST@8=B0pM{@hL1#~OP677c9(ARa5 zZKoW8e9gBx)zCjYmH4v8BFA+1JhgvbUoBERHd2t>pL=ee-jB2k4d^{?zfVDYeApp- zWBK>*Wx0G$r?KNgax`IZt@&Rq*=c}7FssIM3)ky8$d7Y^Q1ONkD`A#M!yOIDLv1k} z6F0WE*6AggWxgV?l0|UaY(f|Me literal 0 HcmV?d00001 diff --git a/src/file-viewer/static/captcha/1.jpeg b/src/file-viewer/static/captcha/1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..583bf34957ba03e7810437a46c42e7067e6c04e4 GIT binary patch literal 9964 zcmV)u6u6@#Ry7nrqKz38IbCHASE&g2 zRKT@u#YLXfqf{eqD2ek?)u|%6qs00Ou!kdQ8!c$#QO;_as?sSnL90tx4-;YDPjDPf zN%q^!xxTHr%f|hLwzqxqS0-pZ3QZ$ggdXOm=HQ+@^w;wIs2A3+0oIXYVd6BD0xCd? z3bjd1A!)ObT}n?>wWnIJ1ybd#Dh8&^2RailzLjHC&DCk4w;GW*sE}&HaHw&s$$F*G z)URV#bgtAII*(^XVhE_-yAezrYeY(mTB|XkyPB}nxDgc52bPm7o6!}?s&f@RsI4b; zM>!&>R9VH(fVuD$&1PwES|EE=Nw1}Rt>)0#t0ptj7J#<@duQmk>UxZ zIFF|te}p4RyXo9SM1t=uD!Y_bweudqovm$jTDy-H9BsashxJ@y#u6bo@uhe^8NSEy zJ*F3jr)#<0zh@Hi9NC+>QFUY8T!fI2NIW?4)9)WawK`v;W(y4XjyH|SqDR|B9>Z>R z@;u&oSRVX}qfKnoo2drc2TNDrdYuw`4Gzymm2|JBJwMWLA!wIfi)cHmr!-`X4>qLPxnGUB{q&YyyIHOe4~2RC>D);nkeRE_JZ!taW6?-`?`%8Y}DYffgOtFr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{O4gEK!f#j3_=gqxEN8bw^rmlXH!4nqeLL4YWW*v)lgw{GeYbHvC61@vc6AeYO5R zJnMgD?BlmF?~&N&lk+>kM%e7zv}1wdbF;pRS*rMo7-3S(0IkF$kB6IAlGZX6#sw8rP|+<#OVG)*rK&+{nJ-ektx{VWQ=;lZRk5WI z8`Me;Hmi?ANbzAaO(iJRZ6$+Sn4uX&aoo~*ccRBBvE@iu=bEg%tDWtNEKc|jD3dZa zhmCTvDGX$Qx4+TjN0M^qQcXpQzs@i3T4AWjv5;AR64LN#)$snSlLjlj!*}s-wp)pI zo4vaUHuFN+9yT4;<8h+{aLeU78g_ac)~pk$V}oOk%eTR?Py#fvFo$8gBSmzPji8bF z#WjWgRy--J#ITSed7{?f-FwGz@bIoaQnv@gbxKya{aqm7No{{ZA7qcW-kqvAxM-E+M#Wz*ELJvsyU)l|a&^)SYA0-B-9-ahyhN<*(VrZq5Y19?mHAzl&>J z(%foOvvz;-*q!b;K1b&A+ar}&2i0oXZ2tfX+{i9ILfpopNxvG~)e~EmfZ9^dM;fAU zQR7?Ax`9?1fn<`rMLr9>}38^OXAwB zJcSb~cM1!)ZM=iN-_-@%%<=_w5{ip@6m)p_)N77m1n9T3wO(40s;){^8q|9l(@`Ha zQPEIE&3c;9#|k3w9@MVznW!7rKPAuKNSTf4Uibae?MUB^5qaA{bw@8@`O*7po%n|f%P*og zYmxEHaG%flmm2o?)u}qwHy?njT97OQJ2~@GfDIPr`YNkyYn3Xi0`*mC#V8y#384-2ClW?8r%RC1S*6JVhq#>w6*GDs{EiLTp5NU;o(zD^U9Y literal 0 HcmV?d00001 diff --git a/src/file-viewer/static/captcha/10.jpeg b/src/file-viewer/static/captcha/10.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..1c7b4788bfa2a0c9a852c31735bdf728b27e123a GIT binary patch literal 10225 zcmY*;bx<2l&~}g(EiDvlvEmk>c#D)4D^78O7I%WXv`~s$AW)#VOYmSJ@GI^Vmk``( zaMzFbo%v?I@41<~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vmrW&hCJ1b!g=VOhrm~g}A=Y_tq3)Io5fj zeV%q4ImZr8Yx^)oqX5BJ)2+KE0^&y&g`_;tBprOb?`an3rI{W8KeHEurh--$MGn8g z(ybi`l(~bp?{>RhN{(C>2w3(dF$Dy-E0v1qU(ZAI!1X^fTUv%!FWW?O#cx;NOzYqG zes)rOw+z~{?>fR=b`wIEMDTA}s2VNtCyJSzcren8it9Z0q5G_T!mf%O1z^sGqN zesw*q=XEe@J5HxEybYjm6Ic$@joVuf+RYC=QmLj4`>cZV|`cpIBq98UwASg&(rrYlKyD+R&Y< zSk5(#!f3hrUF%5DUz$jX)cnkYn+ES|-Q=bK9jgn5wRSY$wK1XI4-1raxkVOm87>o#Onh2120F;1(gQV8?B&6aW z+cv&rjr&xKw~eE6pH6~|%&JR8ZVQ&CCPtCYgE`jYR|N!jr8*kQO+4sfNy4H%F_Lx0AYOQ$QLG);3ylr~N6vMs==lc!rEbaS? z?+<_g9r=skF3&QK{9dJ_f*r%GyHZ1)yK*VlHg`%sj7J)OS>VR!sJFdJU$G7=)CS5K ebxPf|qCl|4D~9sQy?`Z@j=o-Lb(QJE-2VaFXKZKy literal 0 HcmV?d00001 diff --git a/src/file-viewer/static/captcha/11.jpeg b/src/file-viewer/static/captcha/11.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..2b03a2d18a0eeb8443e78422046a15f28230fd72 GIT binary patch literal 6654 zcmYkAcQhMN`^RI`+Cgcpkcho^kXB=ah)uP$MNqZ(R<)@b32LYIEJaj}E_=o-HA-vm znyu~UegAmR?{m+&&vTx8?(@BW+;gAj+^Zi~zW|Innn+Cm2`K|VxRj(M;A#eNA3#n1A1M9{<^P9@ii(<=`g*3M{I5q%Lql^NxHdO#+@Phsd6S-= zo{5R&ssm7Qtw2F?E%84nD9K4l$N*F%05Xzm{uc+3k&=@DC@2}Pk3~jCMNLIXPD%Ek zWioOA1u2l9nS}4Yv9t^&3(iPA!pp{X*K-uyR=^sLEtIXVTWH^B8e2T@roym6O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yLp+P^pW#bd-as^KPE5ldXiMEj)YALg`Q3m*(J zEQ>^5_l)oM)Eo}|bF&yVEghH~Y=!D|U{B;I+r$$LpiP20)K8=35g;vQ>*S^S@*RaA zXuguqs73um^>Smcx5}P@+gE@AMXV*|+kLUyYMu7fL7isgsZOmrC~ltp&I*9EiH-)( z`O+G4PbRrn7yX-C0nw6Bf3BW1k^B){B-Dc5`V{7!wsg8qGNXv0=kfuW5 z_TQ}K9(uY6%jxjC_eQJUN%^NkC>q|`_uGkiF|*8?vLF>Zso`3`M=zR{aKsxhS#}b1_FMwS_EU~P$~Bu=VH$kiu8h{{zA)Z$-# zJyp^ns7OC~+}htzjH`A!G}}N+)_^`!47$ewepwdI-_nTXuz4*|rURnB|JGv+uPwD? z_t)h-ynfU-pi6r=-`G2gN!PyZU{Dnq@gZ&FgNNp$*w;sTza%RV3q+OHABQhK<d&7a%OJiJrd>n%_Fy72pBiK4WF%7LKbmaMeNAE+}b|6bEA4LgNdlY-ncb>D~( zagRS?QNL%)iw2iBTURq4O3m~3_94r9U0-3mTM8mqZ^it3Gwbx~3NYUqWW0Dp|tABIIY?{KSdMnCSCh|ZD^&9pr3d(X;ZsHfPvUF;jBfgM>I50QSuW03*F_d6g z^%1W2zg6$w{B5btz7Nw>syJ}a<)HG||8s$@``aerE^|%Dv%5Jf8gi=Ttk4VpqPdcn+jqWP GP5mFI!j@40 literal 0 HcmV?d00001 diff --git a/src/file-viewer/static/captcha/12.jpeg b/src/file-viewer/static/captcha/12.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..70d058266ea2d611b2e3083d1cddf040cf854044 GIT binary patch literal 6952 zcmV+@8`tFj*#F=F5K2Z#MgRc<000310RRC1{s0h6VRmCSF)lGVE-^4L0RP(nLjVW_ z1Ox;G1qB5K1qB8M1_lNO1_lNO1_lNP2L}iU2nPoT1_lQQ2nYxW2?+@Z2nYxX2?`1d z3=9hk4h{|x5fuN#0I~o80s{d70RaF200000000040|EgB1^@>L0RRI50RaI300000 z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j_?RWHOznr${@@%Gu3VH}5cTzxe&jL%acg&)BG5-Le7xHcWN&Y*M-wun4 zeqv0C)hTtCxcJie^CI+x8Dp}0bPA@^=w39lKEIXYYCuWoN)EYBsMLKaLsVeqp=)Bi zN_-s>bWDx*vYE+iq-;%6EJ}h~**G}`>BvwC6Q~i=)<<|tB)M%D-KBi-{%d6|cl~X5 zN!Q4FTw({=oo{wW&^3(LL zb&nTlaXzC$hia`EgxN}X#xP$r@ zhFd`TiDQYabMD|Bv|Rl@OB1#~u~C0?y1v!^-SnT(t10d)$juD`h2pm|+>SbC0kAXX z>$t5-dUi%VF0tsL_J_~(CdJ|(FuDpHQ8ez6mb;45r>Z}AtmY!A(BuLnR;(2l>QM}K uH>Z5$L^pi^e4te7Edh7Ake&OYj7UK8{wCNN0izyI0tK``+E literal 0 HcmV?d00001 diff --git a/src/file-viewer/static/captcha/13.jpeg b/src/file-viewer/static/captcha/13.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..d92b575ad7c610e132d48903a8d21ef91fe907f3 GIT binary patch literal 8887 zcmV;oB1ql;*#F=F5K2Z#MgRc<000310RRC1{s0h6VRmCSF)lGVE-^4L0RP(nLjVW_ z1Ox;G1qB5K1qB8M1_lNO1_lNO1_lNP2L}iU2nPoT1_lQQ2nYxW2?+@Z2nYxX2?`1d z3=9hk4h{|x5fuN#0I2`~0s{d70RR9100000000051O@^F0RRU900RI60RR9100000 z000000|EgA1_b~R00IF60|5pD1PBEK0tW#A0RjUA01*-)1u;<~VL=8HGI4>C6hfg= z!D0uoBNa1plHt)bV}esd@X{9+B%<+DH4y*;0RjXB1p@;D2LS;90006300R**5(FVZ zQ4<9+VIpyXQjtOip%f$0!Lc(_6>{)HH2=T=5eNXt0LTLYA^-vr00R*K|Jncy0|5X6 z5d#qbKL8C|%wfP{06u47dd0<8a#4w6QKK1C+AZE=_h;(gcijG*^Qtg8Qa^>A;JC`_ z3P398Dq|x6f`ozgUkzx@c&9Y9mB;Xr2acwXRC6wq<>i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/src/file-viewer/static/captcha/2.jpeg b/src/file-viewer/static/captcha/2.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..d85eb9b6f59261386beb7552405b13366a100100 GIT binary patch literal 6358 zcmZ8_cQoA3+xAD7h}{sPtrA2h(V~|`Cps&vn$>&nA|V6`VznqCELkLo-h~LOi?XW| zZI{(W)ZoeY_j}&=eBbw)Gc(t@=geI5$DEmauB)l5pTJFRbuD#(h!_Bf{ubcs61e%; zE)f1eR76xpMD+fB;A$370VqlT0oi{*{%=rFP*74*{%y(0|HCM+UAy)-@VC2u{rZg? zR8$}kh=zvl>N`;Wj{q6bUyc6@5(-ixVoLIVf+R%$&j=|A5g9T0O@N4mgqVbkl#-a7 z;@aPtL;x`fDH+Wja#30eJ44D_4}IvwIG;W$;G$1?VYKHv8hty8yR)!L#rUp->i*I< z@#>c~h*WR!gYsWA>+wrEJDQuM zs>(DpfT}9d|5A$cm?YbnDd{5t7VL1FDHMb8C`UpGp-<-4JsF-rR5ABR>kbbQ;HaBK zw2v3Ft^k7VB;js+gHLMCFV1yR_ye^V|KoHPpndc1 zR~&YYvFNLg?BzgH;N>dn__e}VEdF*@fYAP+c^(`5$uf=&{oHhqqe8L9+Ka`roh31^ zxiG4Nf#QL)RT5jWQ>UOlg_!a~DrB<^hA%YHF>?W)kiDzS*nbv0(#P>EL|};&KkzO( zgYaZ2O7D?Ds$Hx4E+;xgT`Yq3SRvcN7IGx0^P4c=;31g_OB+HVkuksY?;N@XOCmQF z@YHbiVl)w-c3N71jI42nmw&6pmjA6ek$|*AiMLYO<^*ncpD&@VdPVPzYFHLuxl<6l400 zu7JZ*W$PT5llRk7gpyLvv^wlH``|>x#HrtyAN!&NuPDj7^;}T;$h$kXd9vVxmAoN} zz!Kx+pf+8oPo{AVSBA{HJ}y6d_zWAm_Lb_ee2`5}Z;am0=#tD5Bu^)??)%xG*$*C_y=PwlcmzTUNTFo$) zZukgOE6d8f!h*AQb2eYA={f8h@>+nLIPtSZO4rx6^!e|2n>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IU4d0IM$9orZ>@ZTXrz<(NJSSQ!ocQ4SCDH($)uEN0KjH%kliN zjatU(n7SfO#!i@sXl}EDT*lJ=<=*|JLN~#zP(w0{r5`=S{r_0Z;MBIG;@gKa$Aa|c z)E<@^{b>Xjyd5~!@d(Y~a^ym2f?hZ@ZMU>J6yjM*3F{xjY3mj~go}x{^EQCsm$YLH zHgCZ|2Qht5e8>P(oIJdK0y`u9y zs<4te(&lOUNeDqOFc1Gg=jAs!haJsn#4ZBS3evRSA@+&0msg}mopyPGxG zQn9cwnc@xv~vgdogUiIJory1ntGqZplBFX@^&o zJjgYZ_Bjc;BXC#qs|e=a-aFMtHfBTrpR4{agFWs!4>2dT0^#fpX@{zc%gkp^PR4&( J?U7g0{{zwnA$|Y= literal 0 HcmV?d00001 diff --git a/src/file-viewer/static/captcha/3.jpeg b/src/file-viewer/static/captcha/3.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..4f1e842c1ab44816f6753da73c74cad5438729d9 GIT binary patch literal 10319 zcmY*dWl$VIlU>{)xa;D+xCRLB?hqUT1oy=u1X~ujV8PubxVs0JV8PwpF5g#mRd;Wy zrn_EE^_w4EJ=6WZ^u7uBpdceJ1Au`A0AT(t!228EgOZu21s{kVB*+fpsW@Yyb>A;6L~N7w^Bq|CC^{ap0*z zG`JG#2rgz^x$(hxziU5f^l)zh6C_>Vy8+n9fMLKe91INr78?ME4R~Jxp#Rf`#s24u z0Up0rFij`8pLp_dwPlo&XgrUT)HT=`n$NuH@(*=Pf)wi$dtKx;KjwBuWRgQUdIf=^ z7|#rX{H4i(5^0dk^-GOJ?*UFEdq?7W2r03LEDXuKEk3ru%9)Q`;ti>J`ruGl2mF{@ zd|oM0lmGg9nV9-0M6&Mtm4VP8GY|rOF)A(1cg$6OG=qY|w296-_ZK43?<0C5x9ruw zuo`{OpFtn;9aUg%7CI9$3U2+(9`%S0(>Y*0XR(dj&j#Se6L4(mPy~M;*LGFaO4TMP zXwRL!S(cF>baN2HqzN;BjAlWi3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~_wRe3Ij`4=%V`?TImN9O|9g84TV z*t4PYiL9zOPyQ8B^*nXlg6#b}DYOaR`&IW}vp=cxZB~~sE{{#&$9=TdZ^<&pzhSV_ zj74~IK5J**t4cH5OAe;Er0gS%Z}I}*-7lB{l5 zV)kY*V868fqd}0Y>T&a_4d7uZ-2z9Y3}r3+vi>4q97YQrz*pz0i>;0=8ZzEj&!&c_ z$&HuzcVx)tU$OlxsgAyt@To+6m{7Mwg&)$W93m8pmd4+C_@zmu*h3-m)!KYt_*E=y z>j;5?@DL84&Z|*znCJ+gAH<{s!Z+6ZTtj%CP8ia7uj_G!pU3220wU6Zzu2<$!53k| z6(siCG#HJ>vrySv-Wf+wg!S#c-%ya&1aS)-=J{30i2h2XmK8X3Fva!oAexPauQORd zt8D|PlalTv^$AYQN>ZP78Y?CUqsNEF!r4oV)904ZDGKrT$IPC7+Fjp zqd`~ByIjzAn><&VlP4pgEk;;&Pf9W_@d*Mwvu1MEPa>Aq8Eza12AY zOpdReT;b#D!-jg@sPOqWcj<8HhSTrHuc;7-_x`benP1INxS>%CgFWNGSMv^*-FkOh zfGBv4LSkr$($_9Axnao$!Iit?B=f^T!$qNWh`f99Mpy5W0m-47X_0{C{)6F#>pMWX zLu|%tq9I8LS*Yo(Ws1wmywxWPB5h2iICivEBIB_{mgw{{YZ>B*0;KU54yWld2B`?u{TX!{Tg{QiGD=V)7jag3S zP!>4wrw5|;i4_(mU-hh1y11j(TWUr@42)QFM|_IYEM4*+h9*(G@}5VH0yF z!;?YjWk!LgA$}K2Bs23jr>>*=fFD)Iv%P(;ChvfsUCZ^duOQcP-#CG0(!r;B2BKE1 zZ?BHArp1aAI$C>A^{E8ySs3da;irBL?7xcXs?}u@O1uAjJ`5lyJ@+O5{f)wV+)?YI deWLbXH0QuNHaD-30xzR3>lddKxzzXN{{eEKri}mq literal 0 HcmV?d00001 diff --git a/src/file-viewer/static/captcha/4.jpeg b/src/file-viewer/static/captcha/4.jpeg new file mode 100644 index 0000000000000000000000000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$%gSvU+!K@Y<-fK(*+x^*DOS33q*Ua;?4xnWK*P9$6%g75!GD3n}c~tBG7;vF>bC zf9mIQL~i5UYa+2b&E7h7YoySDqacpjo4#XX& zZ4C4He~J{zCm5e89$`xEfev<}00puzs=HsHZXJ9-dlPY!zK)d^nen z6UXIT9hL1TTf2(Z3t3_gG_}pdehs`zPkE$~m%Kd@72S@?ja%-G+5Uyt-kz3TB$7Z7&M8J?r!kNQ!tPa=SRk9Qf2ctSu3Wq62uA3R`>b`4t> zO1sG|Zdhmhds=A7-Z0#8_hPJjfsg7F?>YYTnf)-ya{mA{_THOgYeE37M_~oH{nb)` zLT(3{ZUj($Qs^K!DN+>=igA(bt`bFpX!<- z-kyYs8CrA;R$Iex-ep z6=3#i2imC9<#QcrR8=up>1|YfpaQBM$g8b*)9n8MwiZl{luUjspVLVn+%ZK%(l72e z_6I#fz48N%bEImC&)pU-OOkFP9>m=Z3kMCd6(;$(V7;ZmOssq%Qn3URXuhp;RXOiJ}uU_B~UW9fGc)1o7>51B+~!cKKxa! literal 0 HcmV?d00001 diff --git a/src/file-viewer/static/captcha/5.jpeg b/src/file-viewer/static/captcha/5.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..5939aac41776ed8e8d6839df97cc300c36048b05 GIT binary patch literal 12868 zcmY*Xt7wm3s#pzFHsV#Wwk_0 z^srj^2@)a*@p<3#{qcQw&Y77r=giFgW6r(L+~>KRy<7n>8R{A60Vu8k02EgZaQP3w zWb72`q97|Rt1K-mBLlcx0O$aKRR3et|7$e=uhG)d0)fD*o`&XsXFw1LbhU6b(9zL> z!Pl=dFfcGPvt1GZJpceDfRcjZ>XQF!RMa$-*JvpKK#Ko=9RRpSMM(jmX1a2Vl8Ool zq5)IV&|Yn%q+$hJqrS~1L}Q`D;u0(j$E33hQXH5!mC;VgY4>v=CY>8COJ8J&1d-Ps z$-AcYS&9C-fn&xu972H#y@Z&+=n!TA1?9DCv^3O|S6BRxE7vFi6fDeCvT!FTtC?1> zd34E7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CQETx*Tx_s6Z4y~Bq@aaqQmp3?XGWFs8UbRV z;%RlFs??}|ks|$;7n~tv4<>r#Z;ZfTESmMBY2B&Lq%J?bHeKR$t4n9)qhj-~Oix2q z-dg;l(xBmv>7Ms3Oge cHJYhmXH|Q27ioZ`rB`*14=-}hK3vZIA49aig8%>k literal 0 HcmV?d00001 diff --git a/src/file-viewer/static/captcha/6.jpeg b/src/file-viewer/static/captcha/6.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..83730227ef47a5fd4954f6ef85cb83f64ddd63d4 GIT binary patch literal 13718 zcmV;HHEGKK*#F=F5K2Z#MgRc<000310RRC1{s0h6VRmCSF)lGVE-^4L0RP(nLjVW_ z1Ox;G1qB5K1qB8M1_lNO1_lNO1_lNP2L}iU2nPoT1_lQQ2nYxW2?+@Z2nYxX2?`1d z3=9hk4h{|x5fuN#0Ji`D0s{d70RaF200000000041qTBL0s#OB0RRF60RaF200000 z0000000RUC0RjL95C8%J0t5sD1P28K1PliO0RjO75d;7s1rkv)K?W0HA_s9YfkL5T zkx~>R(ZO=Df)!KnGZx`PB$5cC!m_h9bb~Y{W0TWVRT%MBlyeaP0Rsa91Ox;F2>}5C z000015d#7MAp{aJQDH#^B5{Eep|O!NQqjSJ;bIgcazgM1@iSBZzyJ{l0LTEy0|6oc z0ucZM5di<%01N{G00I#M5dc2`*4*4cEa^u^(!%?@qifTW#k7pu-c`VNY?ecs#5>Z| z2p00F7iT10hbp3J4TDv#7F`o%MT5=y9s#%|&kCG!q>!{THA-8lT0waU!!RO5zU)SQ z<=byayCaQ$kvgsm5{1*QYY6+NObt^{lv?$QZD75-CU|)Re{Mx2Iu3NtZ_7CE3;1Pe z57wgYSou76bqPT^#`%kD72Rq(-U7~c9oxPXwdov+{y@~HkDI-F(3Z`L*Esd+{ zu&_vyEOV$^ZF`3-Qyk9@j~G!~dB1bV9r}tXCi!F9Qyqo0{t!vDk|kB=k0?p}F23w% zP(4BQrO96o)v@*kV-@eTYjT+;t*oyn6#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?%PqS8Ebr=M=_CdeEQUj9w%X{A7zaYsQtut(0aUolm`To z)I@ik-)z~ftM_gi-AOg{Lw)ahVQNvcIvZ*(K@i6THBQH z+QJ~L@0e$MShcm)G0Y}C_5XtD+SvK>a@&u-6tnMz)Ht*133>4HO3M%KXxFGj`gPnO zRm6_(OJa_8QlZRZ0M%S2Yh?5zBHrYc$NM#W!&BE8S@1LcexgeG?4+-nXZiu?l10<%?Eldf55`Ov z^{F8Ij&>Za|68#h1^qWpYjNeNrX!hg(iDp~*(EY^_~`+7dG!EL!tYyt*;+2LeGGLK zDaq~Q;>gJR6r^gp$=4hwY*~Qh{|jF15nid$_1Z{stV+0e03r&8o*l1WaKQ8QB#1$a z9!)+8&67kDnO-sj6_YwMLo)*|PWXD)2=Ompm9EwoDmhZ-$yFFcn=;iQR;-^M=Klu> CoPx6e literal 0 HcmV?d00001 diff --git a/src/file-viewer/static/captcha/8.jpeg b/src/file-viewer/static/captcha/8.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..5471f0759cd57746b996408f68eb792ec874bb16 GIT binary patch literal 11619 zcmV-pEu7N-*#G_j5KLiqV>U4^F*zI1qB5K1_lNO1_lNO z1_lNO1_uWR2nYxV2L}cQ2L}iU2nY!Y2?z)X2nh)a3JMGi3kwbo4iOO)|HJ^N00065 z0RaI3000000000000RU91px*C2LS*B0RaI30000000000000630{{dC5C8%J0|EmF z0R;sG2>=5D009C600a>dAu&M(Q8Hl$B5@NGQjvi|BVux)6*E(@!9$YKqT%rIBnK9P zlXFBg5dZ-M0RsXA1Ox^F1pxp6009630}&xH5(Gg}aUx+8k%2M=BNU;r(ZNDuGg88m zQ}A-(qW{1E5eNXt0LTLYA^-vr00R*K|Jncy0|5X65d#qbKLGggC)+iWD`R>*k?u3L zKaBwZU5yg4Z5jW|tu&Xvk z$lC_hn;>&=RAf~Tk+mx;YI1yWPc(lf)Hbq@Pdw+1G3EKD9!3x#wP{hgLFrukah+$~mg zxqc~GPTIi7i3YA>#F26LsLR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7T!N)fi((vw7H;f?8iBb5*-gK3*cz)LXuK>(*lzMll>Q|i&m1|j)aqSJcDo{ya?w_O>jnd9}&m< z>W@%7Xrlg9^pmIows?cj4=H}N0J)xDLyr0Yo)&O_ukCa8TJf7%*Nua}ar@u>Z2{i=S^^-tR>D$(iVgHsZq z9BFY<{Iq2mQ+tAT9P1TiJBlAQ{Aq~$hOxp*3?w6SLtt@6ZWK1*NGylFYNIj6E5nTz z9{8f@iC~OJyn(%d{{R}%bolh(0aLi(eW`KXG_^}q%q;UCRt9TihDdkL#})S{u!-Zh%DMXx>9S4bPsGHZV|MvNm1LEm~JTr%xKuU1(Y$(n-` hUK}eLwJg1>6@`g4<5^i{>e|6uS!L?=dc9d?|JlvKOAY`4 literal 0 HcmV?d00001 diff --git a/src/file-viewer/static/captcha/9.jpeg b/src/file-viewer/static/captcha/9.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..02d2287466c2b28fcc0744484137d1b965b3852c GIT binary patch literal 8364 zcmY*+1yCD6({_*or4$N9N+DQq4^D9?65OS@6$tJQEwmI3?(RWbph%G7?hXy^PH~5i z_xteczOi9Q8e{1=L55Y1=+!z zoPZ}JKnj3`{vW*fFEIW$FflQ)u&|zI42=IuSTA3`d{#U!*x1-OIImve;^N}t6FzkT zY5)LKR5X-l8~-2ZXs9nR04SJPD1iUF@yzAFdv5@!C}?OX7-%ohUtqs@@k|gE4IO|_ zK>Y%&Mq?_0@z$9TGZ!Su^|i`{JGPxj-Asx$NF#3C_1|hW-$cy`7B9b>doT|j{_}At zsOV@I=%}y$YaRuFhKi3)O`ryrctK$x|Bu z9}Cb2=tD!H0ifao(C`6Ie*rjX&vfyhWih~M?Y@0f1-5~|o^TRkxEcQXBTSCg&a ze&E~rmvq5|NsAI?PP>t=5TLgvSH=R}1o&@-`O6;#tCbxmh*={Z5%od!IrSJR8G5~hC>tPKU( zmIOH@8E~IhS+jV3-u*1ap->VOkUsA;!nf2>N0g@EawYryJNYBOn9l@B|DIBnQUSTa z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bXm!u_jB8E|jLQ|63kY$FLYGr0I;}|-2*QY82V3~R{DqKN zlcNe}NHgIV(RtA#Vowm4<>>0vkI=I=9KPZwLwZE0Py4Ys^CJ#hUj44{)Y|1oogG3- zW|b{!H!p21=6*gq4WCeNvMBq^2Q2j8h0z6kkvHd%?*uWQoOZ*2- zi5{f^66PHP0MH2@N7OC`@dKYIv6APOV^p-(b)Zwgq;C$$CP;I=bQr;Wz}WZ->fWq4 zr~MnkxBziJgVp5(+JL$F~AM*yE z&^W@QhnwN5qb_iXL!*kd+_XwCjfD3w1;sd1F6Ul zlC`#gucu literal 0 HcmV?d00001 diff --git a/src/file-viewer/views/canvas.astro b/src/file-viewer/views/canvas.astro new file mode 100644 index 0000000..ca31307 --- /dev/null +++ b/src/file-viewer/views/canvas.astro @@ -0,0 +1,12 @@ +--- +import { useInlineScript } from "../framework/page-resources.ts"; + +const { script } = Astro.props; +useInlineScript('canvas_' + script as any); +useInlineScript('canvas_demo'); +--- + diff --git a/src/file-viewer/views/canvas.client.ts b/src/file-viewer/views/canvas.client.ts new file mode 100644 index 0000000..3b90c5b --- /dev/null +++ b/src/file-viewer/views/canvas.client.ts @@ -0,0 +1,10 @@ +const canvas = document.querySelector("canvas"); +const id = canvas?.getAttribute("data-canvas"); +if (!id) { + throw new Error("No canvas id found"); +} +const func = (window as any)["canvas_" + id]; +if (!func) { + throw new Error("No canvas function found"); +} +func(canvas, document.body); diff --git a/src/file-viewer/views/clofi.client.ts b/src/file-viewer/views/clofi.client.ts new file mode 100644 index 0000000..4cf9af4 --- /dev/null +++ b/src/file-viewer/views/clofi.client.ts @@ -0,0 +1,685 @@ +const filesContainer = document.querySelector(".files")!; + +// push the scrollbar to the end of the view. +let distanceFromEnd = 0; +let fakeScrollToEnd: number | null = null; +filesContainer.scrollLeft = filesContainer.scrollWidth - + filesContainer.clientWidth; +window.addEventListener("resize", () => { + if (fakeScrollToEnd) return; + const { scrollWidth, clientWidth } = filesContainer; + if (scrollWidth <= clientWidth) { + distanceFromEnd = 0; + } else { + filesContainer.scrollLeft = scrollWidth - clientWidth - distanceFromEnd; + } +}, { passive: false }); +let lastScrollLeft = filesContainer.scrollLeft; +filesContainer.addEventListener("scroll", (ev) => { + const { scrollWidth, scrollLeft, clientWidth } = filesContainer; + if (scrollWidth <= clientWidth) { + distanceFromEnd = 0; + } else { + distanceFromEnd = scrollWidth - scrollLeft - clientWidth; + if (fakeScrollToEnd && scrollLeft < lastScrollLeft) { + cancelAnimationFrame(fakeScrollToEnd); + fakeScrollToEnd = null; + } + } + lastScrollLeft = scrollLeft; +}); +const lerp = (a: number, b: number, t: number) => a + t * (b - a); +function snapToEnd(initScrollStart: number) { + if (fakeScrollToEnd) { + cancelAnimationFrame(fakeScrollToEnd); + } + let lastTime = performance.now(); + let scrollStart = initScrollStart ?? filesContainer.scrollLeft; + if (scrollStart >= filesContainer.scrollWidth) { + return; + } + fakeScrollToEnd = requestAnimationFrame(function tick() { + const now = performance.now(); + const dt = now - lastTime; + lastTime = now; + + const f = 1 - (0.98 ** dt); + const { scrollWidth, clientWidth } = filesContainer; + const target = Math.floor(scrollWidth - clientWidth); + scrollStart = lerp(scrollStart, target, f); + filesContainer.scrollLeft = scrollStart; + if (Math.abs(scrollStart - target) < 0.2) { + fakeScrollToEnd = null; + } else { + fakeScrollToEnd = requestAnimationFrame(tick); + } + }); +} + +interface CacheEntry { + html: string; + expires: number; +} +// It is intentional that the existing page is NOT put into the cache. This is +// just to avoid the differences between the partials and the full page +// (subtle differences in activeFilename & isLast) +let currentFile: string = location.pathname.replace(/^\/file/, ""); +let navigationId = 0; +const cache = new Map(); +const prefetching = new Map>(); +const fetchLater: string[] = []; +let hasCotyledonSpeedbump = false; + +function prefetchEntry( + filePath: string, + lazy = false, +): void | Promise { + console.assert(filePath[0] === "/", "filePath must start with a /"); + const existingEntry = cache.get(filePath); + if (existingEntry) { + if (existingEntry.expires > Date.now()) { + return; + } + cache.delete(filePath); + } + + const existingPromise = prefetching.get(filePath); + if (existingPromise) return existingPromise; + + // lazy prefetches should be limited + if (lazy && prefetching.size > 2) { + if (!fetchLater.includes(filePath)) { + fetchLater.push(filePath); + } + return; + } + + if (filePath === "/cotyledon") { + ensureCanvasReady("cotyledon"); + } + + const promise = fetch(`/file${filePath}$partial`) + .then((resp) => { + if (resp.status !== 200) { + throw new Error(`Failed to fetch ${filePath}`); + } + return resp.text(); + }) + .then((html) => { + const entry: CacheEntry = { html, expires: Date.now() + 1000 * 60 * 20 }; + cache.set(filePath, entry); + prefetching.delete(filePath); + + if (fetchLater.length > 0 && prefetching.size < 2) { + const filePath = fetchLater.shift()!; + prefetchEntry(filePath, false); + } + + return entry; + }); + prefetching.set(filePath, promise); + + return promise; +} + +function fetchEntry(filePath: string): Promise { + const pf = prefetchEntry(filePath); + if (pf) return pf; + return Promise.resolve(cache.get(filePath)!); +} + +type CanvasFn = (canvas: HTMLCanvasElement, panel: HTMLElement) => void; +const fetchCanvas = new Map>(); +function ensureCanvasReady(id: string): Promise { + let func = (globalThis as any)["canvas_" + id]; + if (func) return Promise.resolve(func); + let promise = fetchCanvas.get(id); + if (promise) return promise; + let resolve: (c: CanvasFn) => void; + promise = new Promise((r) => resolve = r); + fetchCanvas.set(id, promise); + const script = document.createElement("script"); + script.src = `/js/canvas/${id}.js`; + script.async = true; + script.onload = () => { + func = (globalThis as any)["canvas_" + id]; + fetchCanvas.delete(id); + if (func) { + resolve(func); + } else { + console.error(`Error loading canvas script: ${id}`); + } + }; + script.onerror = () => { + console.error(`Error loading canvas script: ${id}`); + }; + document.head.appendChild(script); + return promise; +} + +interface Tooltip { + tooltip: HTMLElement; + top: number; + index: number; +} + +const panels: Panel[] = []; + +class Panel { + index: number; + panel: HTMLElement; + content: HTMLElement; + width: number; + tooltips: Tooltip[] | null; + linkFlags: number[] | null = null; + basenames: string[] | null = null; + unmountCanvas: (() => void) | null = null; + + constructor(panel: HTMLElement, index: number) { + console.assert(panel.classList.contains("panel")); + this.panel = panel; + this.index = index; + this.content = panel.querySelector(".content.primary")!; + + if (index === 0) { + this.panel.classList.add("first"); + } + + const canvas = panel.querySelector( + "canvas[data-canvas]", + ) as HTMLCanvasElement; + if (canvas) { + canvas.width = canvas.clientWidth; + canvas.height = canvas.clientHeight; + requestAnimationFrame(() => { + canvas.width = canvas.clientWidth; + canvas.height = canvas.clientHeight; + }); + const id = canvas.getAttribute("data-canvas")!; + let cancelled = false; + this.unmountCanvas = () => (cancelled = true); + ensureCanvasReady(id).then((func) => { + if (cancelled) return; + this.unmountCanvas = func(canvas, panel) as any; + }); + if (id === "cotyledon") { + filesContainer.classList.add("ctld-sb"); + const group = document.querySelector( + "[data-group='cotyledon']", + )! as HTMLElement; + if (group) { + group.setAttribute("inert", "true"); + group.style.opacity = "0.5"; + group.style.pointerEvents = "none"; + hasCotyledonSpeedbump = true; + } + } + } + + const ul = panel.querySelector("ul"); + if (!ul) { + this.width = 0; + this.linkFlags = null; + this.basenames = null; + this.tooltips = null; + return; + } + this.width = ul.offsetWidth; + const links = panel.querySelectorAll("ul > li > a.li"); + + this.content.setAttribute("data-clover", `${index}`); + + this.tooltips = []; + this.linkFlags = new Array(links.length).fill(0); + const basenames = this.basenames = new Array(links.length); + for (let i = 0; i < links.length; i++) { + const link = links[i] as HTMLAnchorElement; + link.setAttribute("data-clover", `${index};${i}`); + link.addEventListener("mouseenter", onLinkMouseEnter); + basenames[i] = link.classList.contains("readme") + ? "readme.txt" + : link.getAttribute("href")!.split("/").pop()!; + } + } + + update(newActiveFile: string) { + console.assert(newActiveFile); + const p = this.panel; + p.querySelector(".li.active")?.classList.remove("active"); + const basenames = this.basenames; + if (!basenames) return; + const ul = p.querySelector("ul")!; + this.width = ul.offsetWidth; + console.assert(!newActiveFile.includes("/")); + if (hasCotyledonSpeedbump) { + newActiveFile = "__"; + } + + const linkIndex = basenames.indexOf(newActiveFile); + if (linkIndex === -1) return; + const link = p.querySelector(`[data-clover="${this.index};${linkIndex}"]`)!; + link.classList.add("active"); + + const newActiveTooltip = this.tooltips!.findIndex((t) => + t.index === linkIndex + ); + for (let i = 0; i < this.tooltips!.length; i++) { + const { tooltip } = this.tooltips![i]; + tooltip.classList[i === newActiveTooltip ? "add" : "remove"]("active"); + } + } + + hideReadme() { + this.panel.classList.remove("last"); + const lastHsplit = this.panel.querySelector(".hsplit")!; + if (lastHsplit) { + lastHsplit.className = "hsplit-hidden"; + const previousReadme = this.panel.querySelector( + ".content.readme", + )! as HTMLElement; + console.assert(previousReadme, "No readme found"); + previousReadme.style.display = "none"; + } + } + + showReadme() { + this.panel.classList.add("last"); + const hsplit = this.panel.querySelector(".hsplit-hidden")!; + if (hsplit) { + hsplit.className = "hsplit"; + const previousReadme = this.panel.querySelector( + ".content.readme", + )! as HTMLElement; + console.assert(previousReadme, "No readme found"); + previousReadme.style.display = "block"; + } + } + + destroy() { + if (this.unmountCanvas) { + this.unmountCanvas(); + } + this.panel.querySelectorAll("audio,video").forEach((el) => + (el as HTMLVideoElement | HTMLAudioElement).pause() + ); + this.panel.remove(); + } +} + +function onContentScrollForTooltip(ev: Event) { + const content = ev.target as HTMLElement; + const panelIndex = parseInt(content.getAttribute("data-clover")!); + const panel = panels[panelIndex]; + const scrollTop = content.scrollTop; + for (const tooltip of panel.tooltips!) { + tooltip.tooltip.style.transform = tooltipTransform(tooltip.top, scrollTop); + } +} + +function tooltipTransform(offsetTop: number, scrollTop: number) { + return `translateY(${offsetTop - scrollTop}px)`; +} + +let activeTooltip: HTMLElement | null = null; +let activeTooltipCancel: (() => void) | null = null; + +function onLinkMouseEnter(e: MouseEvent) { + const link = e.target as HTMLAnchorElement; + console.assert(link.classList.contains("li")); + const attr = link.getAttribute("data-clover")!; + console.assert(attr && attr.match(/^\d+;\d+$/)); + const [panelIndex, linkIndex] = attr.split(";").map(Number); + const panel = panels[panelIndex]; + console.assert(panel, `panel${panelIndex}`); + const linkWidths = panel.linkFlags; + let filePath: string | null = null; + if (linkWidths![linkIndex] == 0) { + // filter only links that truncate their text + // insane discovery: while this is recommended online, it doesn't + // account for the `...` itself, meaning when just the file size + // is truncated, a tooltip won't be available. + // > if (link.scrollWidth <= link.offsetWidth) continue; + const lastChild = link.lastElementChild! as HTMLElement; + linkWidths![linkIndex] = lastChild?.offsetLeft !== undefined + ? (lastChild.offsetLeft + lastChild.offsetWidth) ^ 0 + : 1; + + const href = (link as HTMLAnchorElement).getAttribute("href") ?? null; + filePath = href?.startsWith("/file") ? href.slice(5) || "/" : null; + } + if (filePath) { + prefetchEntry(filePath, true); + } + if (linkWidths![linkIndex] > panel.width) { + if (activeTooltipCancel) { + activeTooltipCancel(); + activeTooltipCancel = null; + } + maybeBuildTooltipUi(link, linkIndex, panel); + } +} + +function cancelOnMouseLeave() { + activeTooltipCancel!(); + activeTooltipCancel = null; +} + +function maybeBuildTooltipUi( + link: HTMLAnchorElement, + linkIndex: number, + panel: Panel, +) { + if (activeTooltip) { + activeTooltip.remove(); + buildTooltipUi(link, linkIndex, panel, false); + } else { + link.addEventListener("mouseleave", cancelOnMouseLeave); + const timer = setTimeout(() => { + activeTooltipCancel = null; + link.removeEventListener("mouseleave", cancelOnMouseLeave); + buildTooltipUi(link, linkIndex, panel, true); + }, 150); + activeTooltipCancel = () => { + clearTimeout(timer); + link.removeEventListener("mouseleave", cancelOnMouseLeave); + }; + } +} + +function buildTooltipUi( + link: HTMLAnchorElement, + linkIndex: number, + panel: Panel, + animateIn: boolean, +) { + const tooltip = activeTooltip = document.createElement("div"); + tooltip.classList.add("tooltip"); + if (link.classList.contains("active")) { + tooltip.classList.add("active"); + } + if (animateIn) { + tooltip.style.animation = "fadeIn .1s ease-out forwards"; + } + tooltip.innerHTML = link.innerHTML; + const top = link.parentElement!.offsetTop; + tooltip.style.transform = tooltipTransform(top, panel.content.scrollTop); + panel.panel.appendChild(tooltip); + panel.tooltips!.push({ tooltip, top, index: linkIndex }); + if (panel.tooltips!.length === 1) { + panel.content.addEventListener("scroll", onContentScrollForTooltip); + } + + link.addEventListener("mouseleave", (e) => { + tooltip.style.animation = "fadeIn .3s .2s ease reverse forwards"; + const timer = setTimeout(() => { + activeTooltipCancel = null; + tooltip.remove(); + activeTooltip = null; + + const tt = panel.tooltips = panel.tooltips!.filter((t) => + t.tooltip !== tooltip + ); + if (tt.length === 0) { + panel.content.removeEventListener("scroll", onContentScrollForTooltip); + } + }, 500); + activeTooltipCancel = () => { + clearTimeout(timer); + }; + }, { once: true }); +} + +function addPanel(panel: HTMLElement, activeFile?: string) { + const p = new Panel(panel, panels.length); + panels.push(p); + if (activeFile) { + p.update(activeFile); + } +} + +async function maybeInterceptClick(event: MouseEvent, element: HTMLElement) { + const href = (element as HTMLAnchorElement).href; + const url = new URL(href, window.location.origin); + if (maybeNavigate(url, true)) { + event.preventDefault(); + } +} + +type URLLike = Pick; +function maybeNavigate(url: URLLike, pushState: boolean) { + if (!url.pathname.startsWith("/file")) return false; + if (url.origin !== location.origin) return false; + if (url.search !== "") return false; + navigate(url.pathname, pushState); + return true; +} + +async function navigate(pathname: string, pushState: boolean) { + const filePath = pathname.slice(5) || "/"; + + const currentNavigationId = ++navigationId; + + if (filePath === currentFile) return; + + const currentSplit = splitSlashes(currentFile); + const filePathSplit = splitSlashes(filePath); + + // Find the first index where the currentSplit and filePathSplit differ, then + // add all the paths after that to panelsToFetch + let deleteCount = Math.max(currentSplit.length - filePathSplit.length, 0); + let appendPanels = []; + for (let i = -1; i < filePathSplit.length; i++) { + if (currentSplit[i] !== filePathSplit[i]) { + deleteCount = currentSplit.length - i; + appendPanels = []; + for (let j = i; j < filePathSplit.length; j++) { + appendPanels.push("/" + filePathSplit.slice(0, j + 1).join("/")); + } + break; + } + } + + // Before fetching, prepare to mark the panels as loading + const loadingPanels = new Set(); + { + let lastPanel = filesContainer.lastElementChild; + let toDelete = deleteCount; + while (lastPanel && toDelete > 0) { + lastPanel.querySelectorAll(".content").forEach((content) => { + loadingPanels.add(content as HTMLElement); + }); + lastPanel = lastPanel.previousElementSibling; + toDelete--; + } + if (deleteCount == 0) { + const last = filesContainer.lastElementChild!; + console.assert(last, "Last panel is not a panel"); + + const readme = last.querySelector(".content.readme")!; + if (readme) { + loadingPanels.add(readme as HTMLElement); + } + } + const folderWithReadme = panels[panels.length - deleteCount - 1]; + const readmes = folderWithReadme.panel.querySelectorAll(".readme"); + if (readmes.length === 1) { + deleteCount += 1; + appendPanels.unshift( + "/" + currentSplit.slice(0, panels.length - deleteCount).join("/"), + ); + } + } + + console.assert( + deleteCount > 0 || appendPanels.length > 0, + "No difference found", + ); + let timer = loadingPanels.size > 0 + ? setTimeout(() => { + if (navigationId !== currentNavigationId) { + return; // cancelled + } + document.querySelectorAll(".loading") + .forEach((thing) => thing.classList.remove("loading")); + for (const panel of loadingPanels) { + panel.classList.add("loading"); + } + timer = null; + }, 100) + : null; + + // Fetch the data + let appendEntries; + try { + appendEntries = await Promise.all(appendPanels.map(fetchEntry)); + } catch (e) { + console.error("error", e); + if (navigationId === currentNavigationId) { + console.error(e); + location.href = "/file" + (filePath.length > 1 ? filePath : ""); + } + return; // cancelled + } + if (navigationId !== currentNavigationId) { + return; // cancelled + } + if (timer) clearTimeout(timer); + else {for (const panel of loadingPanels) { + panel.classList.remove("loading"); + }} + currentFile = filePath; + + if (pushState) { + history.pushState(null, "", `/file${filePath.length > 1 ? filePath : ""}`); + } + + const startScrollleft = filesContainer.scrollLeft; + + if (currentSplit[0] !== filePathSplit[0]) { + if (currentSplit[0] === "cotyledon") { + filesContainer.classList.remove("ctld-et", "ctld-sb"); + } + if (parseInt(currentSplit[0]) < 2025) { + filesContainer.classList.remove("ctld", "ctld-" + currentSplit[0]); + } + if (parseInt(filePathSplit[0]) < 2025) { + filesContainer.classList.add("ctld", "ctld-" + filePathSplit[0]); + } + } + + // Make the last panel into a regular panel + panels[panels.length - 1].hideReadme(); + + // Delete the panels that are no longer needed + for (let i = 0; i < deleteCount; i++) { + const panel = panels.pop(); + console.assert(panel, "No panel found"); + if (panel) { + panel.destroy(); + } + } + + // Update the last panel + const currentFileSplit = splitSlashes(currentFile); + const activeFile = currentFileSplit[panels.length - 1]; + panels[panels.length - 1]?.update(activeFile ?? "readme.txt"); + + // Insert the new panels + if (appendEntries.length > 0) { + let lastNewPanel: HTMLElement | null = null; + for (const entry of appendEntries) { + const panel = document.createElement("div"); + panel.classList.add("panel"); + if (panels.length >= 2) { + panel.classList.add("fade-slide-in"); + } + panel.innerHTML = entry.html; + filesContainer.appendChild(panel); + lastNewPanel = panel; + const current = currentFileSplit[panels.length]; + addPanel(panel, current ?? "readme.txt"); + if (current) { + panels[panels.length - 1].hideReadme(); + } + } + console.assert(lastNewPanel, "No last new panel found"); + lastNewPanel!.classList.add("last"); + + // Automatically play videos + const video = lastNewPanel!.querySelector("video") || + lastNewPanel!.querySelector("audio"); + if (video) { + const timer = setTimeout(() => { + video.play(); + }, 50); + video.play().then(() => { + clearTimeout(timer); + }, () => {}); + } + } else { + // Make the last panel the .last panel + const lastPanel = filesContainer.lastElementChild!; + console.assert(lastPanel, "No last panel found"); + lastPanel.classList.add("last"); + panels[panels.length - 1].showReadme(); + } + + updateWidths(); + filesContainer.scrollLeft = startScrollleft; + requestAnimationFrame(() => { + updateWidths(); + filesContainer.scrollLeft = startScrollleft; + snapToEnd(startScrollleft); + }); +} + +function updateWidths() { + for (const panel of panels.slice(-2)) { + const ul = panel.panel.querySelector("ul")!; + if (ul) { + panel.width = ul.offsetWidth; + } + } +} + +function splitSlashes(path: string) { + if (path.length <= 1) return []; + return path.slice(1).split("/"); +} + +requestAnimationFrame(() => { + document.querySelectorAll(".panel").forEach((panel) => + addPanel(panel as HTMLElement) + ); + (document.querySelector(".files")! as HTMLElement).addEventListener( + "click", + (event, element = event.target as HTMLAnchorElement) => { + if ( + !(event.button || + event.which != 1 || + event.metaKey || + event.ctrlKey || + event.shiftKey || + event.altKey || + event.defaultPrevented) + ) { + while (element && element !== document.body) { + if ( + element.nodeName.toUpperCase() === "A" + ) { + maybeInterceptClick(event, element); + return; + } + element = + (element.assignedSlot ?? element.parentNode) as HTMLAnchorElement; + } + } + }, + ); +}); + +window.addEventListener("popstate", (event) => { + if (!maybeNavigate(window.location, false)) { + location.reload(); + } +}); diff --git a/src/file-viewer/views/clofi.css b/src/file-viewer/views/clofi.css new file mode 100644 index 0000000..ba0d4b1 --- /dev/null +++ b/src/file-viewer/views/clofi.css @@ -0,0 +1,798 @@ +html, body { + height: 100vh; + width: 100vw; + overflow: hidden; + --dark-bg: #27143f; + --bar: #804fc9; +} +@font-face { + font-family: c1; + src: url(/cydn_header.woff2); + font-variation-settings: "wght" 50; +} +body { + display: grid; + background-color: var(--dark-bg); +} +.files { + background-color: var(--bg); + --scroll-bg: var(--dark-bg); + display: flex; + flex-direction: row; + overflow-x: scroll; + overflow-y: hidden; + min-height: 100vh; + border-bottom: 0; + box-sizing: border-box; + --tooltip: lch(from var(--bg) calc(l - 2) c h); + --muted: lch(from var(--dark-bg) 60 20 h / 0.8); + z-index: 1; +} +.ctld { + --c: 4.5; + --bg: lch(13 var(--c) var(--hue)); + --dark-bg: lch(10 var(--c) var(--hue)); + --bar: lch(90 96 var(--hue)); + --primary: lch(90 96 var(--hue)); +} +.ctld-2017 { + --hue: 120; +} +.ctld-2018 { + --hue: 40; +} +.ctld-2019 { + --hue: 290; + --c: 10; +} +.ctld-2020 { + --hue: 220; + --c: 10; +} +.ctld-2021 { + --hue: 70; + --c: 20; +} +.ctld-2022 { + --hue: 150; + --c: 20; +} +.ctld-2023 { + --hue: 5; + --c: 10; +} +.ctld-et { + --hue: 150; + --c: 0; +} +.ctld-2024, .ctld-sb { + --bg: #191919; + --dark-bg: #101010; + --fg: #a7a7a7; + --bar: white; + --primary: white; + .active { + font-weight: bold; + } +} +.ctld-2024 { + --dark-bg: #00000080; + --scroll-bg: #0000004d; + .content:not(.file-view-image):not(.file-view-video):not(.file-view-audio) { + background-color: #00000050; + } +} +.ctld-2024 .convo { + --primary: #ff6c5c; +} +.files::-webkit-scrollbar { + height: 24px; + background-color: transparent; +} +.files::-webkit-scrollbar-thumb { + background-color: var(--bar); + border: 6px solid var(--dark-bg); + border-radius: 12px; +} +.files::-webkit-scrollbar-track { + background-color: var(--dark-bg); +} +.files .panel { + position: relative; + flex: 0 0 auto; + min-width: 235px; + max-width: 235px; + height: 100%; + min-height: calc(100vh - 59px); /* safari hack */ + display: flex; + flex-direction: column; +} +.files .panel div.header { + display: none; +} +.files .panel .header { + white-space: nowrap; + font-size: 1rem; + font-weight: bold; + background-color: var(--dark-bg); + padding: 0.5rem 0.5rem 0.5rem 0.25rem; + color: var(--primary); + --color: var(--primary); + overflow: hidden; + text-overflow: ellipsis; + flex-shrink: 0; +} +.actions { + display: flex; + gap: 0.5rem; + height: 19px; + margin-right: 4px; + & > * { + position: relative; + width: 22px; + display: flex; + &::before { + position: absolute; + top: -3px; + width: 24px; + height: 24px; + } + } +} +.files .panel .content { + position: relative; + flex: 1; + overflow-y: scroll; + overflow-x: hidden; +} +a.header { + display: flex; +} +.files .panel.last { + min-width: min(calc(100vw - 255px), calc(90% - 20rem)); + max-width: none; + div.header { + display: flex; + } + a.header { + display: none; + } +} +.files .panel.first:not(.last) { + max-width: 216px; + min-width: 216px; +} +.files .panel.first .content:not(.readme) { + max-width: 200px; + min-width: 200px; +} +.panel:first-child { + border-left: 16px solid var(--dark-bg); +} +.panel:last-child { + flex: 1; +} +.files .panel .hsplit { + display: flex; + flex-direction: row-reverse; + height: calc(100vh - 59px); + .content { + min-width: 235px; + flex: 0 0 auto; + } + .content.readme { + min-width: 300px; + flex: 1; + } +} +.content { + height: calc(100vh - 59px); +} +.files .panel ul { + white-space: nowrap; + list-style-type: none; + display: flex; + flex-direction: column; + &, li { + margin: 0; + padding: 0; + } + li a { + &:active { + --muted: red !important; + } + position: relative; + display: block; + text-overflow: ellipsis; + font-size: 0.5rem; + overflow: hidden; + color: var(--muted); + & > * { + color: var(--fg); + font-size: 1rem; + } + &:hover:not(.active) { + background-color: rgb(from var(--dark-bg) r g b / 0.5); + } + &:active { + background-color: var(--dark-bg) !important; + color: red; + date { + color: red; + } + } + } +} +.li, .tooltip { + padding: 0.5rem 0.2rem 0.5rem 0.2rem; + color: var(--fg); + &.active { + background-color: var(--dark-bg); + color: var(--primary); + --color: var(--primary); + --muted: var(--primary); + } + date { + color: var(--muted); + letter-spacing: -0.08em; + padding-right: 0.3rem; + transform: scaleX(0.95); + display: inline-block; + &.inline { + padding-right: 0; + } + } +} +pre { + padding: 1rem; + font-size: 1rem; +} +.files .panel ul a.readme { + display: flex; + font-weight: bold; + align-items: center; + color: #91fff2; + &.active { + --muted: #91fff2; + } + .line { + display: block; + width: 58px; + margin-right: 8px; + margin-left: 2px; + height: 2px; + background-color: var(--muted); + } +} +.panel .content::-webkit-scrollbar { + width: 10px; +} +.panel .content::-webkit-scrollbar-thumb { + background-color: var(--bar); + border: 2px solid var(--dark-bg); + border-radius: 8px; +} +.panel .content::-webkit-scrollbar-track { + background-color: var(--scroll-bg); +} +.tooltip { + position: absolute; + left: 0; + top: 35px; + background-color: var(--tooltip); + pointer-events: none; + padding-right: 1rem; + border-bottom-right-radius: 8px; + border-top-right-radius: 8px; + white-space: nowrap; + z-index: 100; +} +h3 { + padding-left: 0.25rem; + font-size: 1rem; + margin: 0; + margin-top: 8px; + margin-bottom: 2px; + text-decoration: underline; + text-underline-offset: 1px; + text-decoration-thickness: 2px; +} +@keyframes fadeIn { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +.file-view { + display: flex; + flex-direction: column; +} +.bold-slash { + font-weight: bold; + text-shadow: 1px 0 0 var(--color); +} +.size { + display: inline-block; + font-size: 0.9rem; + color: var(--muted); + padding-left: 0.4rem; +} +.first .size { + display: inline-block; + font-size: 0.7rem; + padding-left: 0.2rem; + transform: translateY(1px); +} +.mobile-back { + display: none; +} +.actions .download::before { + content: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjQiIGZpbGw9IiNmZmZmZmYiPjxwYXRoIGQ9Ik00ODAtMzIwIDI4MC01MjBsNTYtNTggMTA0IDEwNHYtMzI2aDgwdjMyNmwxMDQtMTA0IDU2IDU4LTIwMCAyMDBaTTI0MC0xNjBxLTMzIDAtNTYuNS0yMy41VDE2MC0yNDB2LTEyMGg4MHYxMjBoNDgwdi0xMjBoODB2MTIwcTAgMzMtMjMuNSA1Ni41VDcyMC0xNjBIMjQwWiIvPjwvc3ZnPg==); + transform: scale(1.2); +} +.actions .full-screen::before { + content: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjRkZGRkZGIj48cGF0aCBkPSJNMTIwLTEyMHYtMzIwaDgwdjE4NGw1MDQtNTA0SDUyMHYtODBoMzIwdjMyMGgtODB2LTE4NEwyNTYtMjAwaDE4NHY4MEgxMjBaIi8+PC9zdmc+); +} +.ico { + display: inline-block; + height: 19px; + position: relative; + width: 19px; + margin-right: 2px; + &::before { + content: " "; + position: absolute; + transform: translate(-2px, 3px); + width: 20px; + height: 20px; + background-color: var(--muted); + mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjBweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyMHB4IiBmaWxsPSIjRkZGRkZGIj48cGF0aCBkPSJNMjU5LjcyLTY0cS00MC40NSAwLTY5LjA4LTI4Ljc5UTE2Mi0xMjEuNTggMTYyLTE2MnYtNjM2cTAtNDAuNDIgMjguNzktNjkuMjFRMjE5LjU3LTg5NiAyNjAtODk2aDMwNGwyMzQgMjMzdjUwMXEwIDQwLjQyLTI4LjggNjkuMjFRNzQwLjQtNjQgNjk5Ljk2LTY0SDI1OS43MlpNNTA0LTYwMmgxOTZMNTA0LTc5OHYxOTZaIi8+PC9zdmc+); + } +} +.header .ico::before { + transform: translate(-2px, 0); +} +/* file icons alter the mask image. 24x24 */ +.ico-dir::before { + mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjBweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyMHB4IiBmaWxsPSIjRkZGRkZGIj48cGF0aCBkPSJNMTYzLjA0LTEyMC4wOXEtNTEuMyAwLTg3LjEyLTM1LjgzLTM1LjgzLTM1LjgyLTM1LjgzLTg3LjEydi00NzMuOTJxMC01MS4zIDM1LjgzLTg3LjEyIDM1LjgyLTM1LjgzIDg3LjEyLTM1LjgzaDIxMS41M0w0ODAtNzM0LjQ4aDMxNi45NnE1MS4zIDAgODcuMTIgMzUuODMgMzUuODMgMzUuODMgMzUuODMgODcuMTN2MzY4LjQ4cTAgNTEuMy0zNS44MyA4Ny4xMi0zNS44MiAzNS44My04Ny4xMiAzNS44M0gxNjMuMDRabTAtMTIyLjk1aDYzMy45MnYtMzY4LjQ4SDQyOS4yMkwzMjMuNzgtNzE2Ljk2SDE2My4wNHY0NzMuOTJabTAgMHYtNDczLjkyIDQ3My45MloiLz48L3N2Zz4=); +} +.active .ico-dir::before, .ico-dir-open::before { + mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjBweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyMHB4IiBmaWxsPSIjRkZGRkZGIj48cGF0aCBkPSJNMTU3LjgzLTEyNC42NXEtNDYuOTMgMC04MC4wNi0zMy4xMi0zMy4xMi0zMy4xMy0zMy4xMi04MC4wNnYtNDg0LjM0cTAtNDcuMTcgMzMuMTItODAuMTggMzMuMTMtMzMgODAuMDYtMzNoMjE2LjQxTDQ4MC03MjkuNTloMzIyL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UyOEw1NzEtNTAyIDQ1MC0zNDFsLTkxLTEyMS0xNDMgMjAwWm0xMjQuMjQtMjcwcTM3LjE4IDAgNjIuNDctMjUuNTNRNDI4LTU4My4wNSA0MjgtNjIwLjI0cTAtMzcuMTgtMjUuNTMtNjIuNDdRMzc2Ljk1LTcwOCAzMzkuNzYtNzA4cS0zNy4xOCAwLTYyLjQ3IDI1LjUzUTI1Mi02NTYuOTUgMjUyLTYxOS43NnEwIDM3LjE4IDI1LjUzIDYyLjQ3UTMwMy4wNS01MzIgMzQwLjI0LTUzMloiLz48L3N2Zz4=); +} +.ico-video::before { + mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjBweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyMHB4IiBmaWxsPSIjRkZGRkZGIj48cGF0aCBkPSJNMTk4LTE2MnEtMzkuNzMgMC02OC44Ni0yOS4xNFExMDAtMjIwLjI3IDEwMC0yNjB2LTQ0MHEwLTQwLjQyIDI5LjE0LTY5LjIxUTE1OC4yNy03OTggMTk4LTc5OGg0NDBxNDAuNDIgMCA2OS4yMSAyOC43OVE3MzYtNzQwLjQyIDczNi03MDB2MTU0bDE3Mi0xNzJ2NDc2TDczNi00MTR2MTU0cTAgMzkuNzMtMjguNzkgNjguODZRNjc4LjQyLTE2MiA2MzgtMTYySDE5OFoiLz48L3N2Zz4=); +} +.ico-blend::before { + mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9IiNmZmYiIHZpZXdCb3g9IjAgMCAyMCAyMCI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNi4zNiAxNC4xYy0uMTItLjM5LS4yLS45LS4yLTEuMTZsLS4wMi0uMDFjMC0uMjYuMDUtLjcuMDUtLjdsLTMuOSAzLjIxYy0uNy41Ni0x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SAyLjk1IDIuOTUgMCAxIDEtLjg1LTMuNDMgMi43NiAyLjc2IDAgMCAwIDMuOS0xLjEyIDIuOTUgMi45NSAwIDAgMSA1LjY5IDEuMDlabS0uNjkgNy40NWEyLjE4IDIuMTggMCAwIDEtMy41IDEuNzMgMi4xNyAyLjE3IDAgMCAwLTIuOTYuODIgMi4xOCAyLjE4IDAgMSAxLS42Mi0yLjU0IDIuMDQgMi4wNCAwIDAgMCAyLjg3LS44MiAyLjE4IDIuMTggMCAwIDEgNC4yMS44WiIvPjwvc3ZnPg==); +} +.ico-audio::before { + mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjBweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyMHB4IiBmaWxsPSIjRkZGRkZGIj48cGF0aCBkPSJNNTM2LTc4di0xMDFxMTA2LTIzIDE3My0xMDguNVQ3NzYtNDgxcTAtMTA3LTY4LTE5MC41VDUzNi03ODF2LTEwMXExNDcgMjMgMjQyLjUgMTM3VDg3NC00ODJxMCAxNTAtOTUgMjY1LjVUNTM2LTc4Wk04Ni0zNjV2LTIzMmgxNThsMjIwLTIyMnY2NzZMMjQ0LTM2NUg4NlptNDUwIDQ3di0zMjRxNDkgMjEgNzguNSA2NC41VDY0NC00ODFxMCA1NC0yOS41IDk3LjVUNTM2LTMxOFoiLz48L3N2Zz4=); +} +.ico-archive::before { + mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjBweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyMHB4IiBmaWxsPSIjRkZGRkZGIj48cGF0aCBkPSJNNDQ0LjQzLTU3Ljk2di00MDMuNDNMMTA0LjA5LTY1NC4yMnYzMzMuNTdxMCAzMC45NSAxNS4yNiA1Ny42OXQ0Mi4yMiA0MmwyODIuODYgMTYzWm03Mi0xIDI4MS41Ny0xNjJxMjYuOTYtMTUuMjYgNDIuMjItNDIgMTUuMjYtMjYuNzQgMTUuMjYtNTcuNjl2LTMzNS43TDUxNi40My00NjMuODN2NDA0Ljg3Wm0xNzQuMTQtNTg3Ljg3IDEzNC42NS03NS4zOS0yODguMTgtMTY1LjNxLTI2LjUyLTE1LjI2LTU3LjA0LTE1LjI2dC01Ny40OCAxNS4yNmwtNzQuNjEgNDMuMyAzNDIuNjYgMTk3LjM5Wk00NzgtNTI1LjI2bDE0MC04MC0zNDQuMjItMTk3Ljk2LTE0MC41NiA4MS41N0w0NzgtNTI1LjI2WiIvPjwvc3ZnPg==); +} +.ico-text::before { + mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjBweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyMHB4IiBmaWxsPSIjRkZGRkZGIj48cGF0aCBkPSJNOTgtMjA4di0xMjhoNTI0djEyOEg5OFptMC0yMDh2LTEyOGg3NjR2MTI4SDk4Wm0wLTIwOXYtMTI4aDc2NHYxMjhIOThaIi8+PC9zdmc+); +} +.ico-link::before { + transform: translate(-2px, 3px); + mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjBweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyMHB4IiBmaWxsPSIjRkZGRkZGIj48cGF0aCBkPSJNNDMyLTI4OEgyODhxLTc5LjY4IDAtMTM1Ljg0LTU2LjIzUTk2LTQwMC40NSA5Ni00ODAuMjMgOTYtNTYwIDE1Mi4xNi02MTZxNTYuMTYtNTYgMTM1Ljg0LTU2aDE0NHY3MkgyODhxLTUwIDAtODUgMzV0LTM1IDg1cTAgNTAgMzUgODV0ODUgMzVoMTQ0djcyWm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ODAuMTl0LTMzLjExIDE2Ny41MnEtMzMuMTEgNzguMzItOTIgMTM3LjMzUTcyNi0xMTYuMzMgNjQ3LjcyLTgzLjE2IDU2OS40NS01MCA0ODAuMjgtNTBaIi8+PC9zdmc+); +} +.ico-chat::before { + mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjBweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyMHB4IiBmaWxsPSIjRkZGRkZGIj48cGF0aCBkPSJNNTAtNDZ2LTc0MXEwLTUzLjgzIDM3LjA5LTkwLjkxUTEyNC4xOC05MTUgMTc4LTkxNWg2MDRxNTMuODMgMCA5MC45MSAzNy4wOVE5MTAtODQwLjgzIDkxMC03ODd2NDU5cTAgNTMuODMtMzcuMDkgOTAuOTFRODM1LjgzLTIwMCA3ODItMjAwSDIwNEw1MC00NlptMTg0LTMzOGgzNDd2LTcySDIzNHY3MlptMC0xMzhoNDkydi03MkgyMzR2NzJabTAtMTM4aDQ5MnYtNzJIMjM0djcyWiIvPjwvc3ZnPg); +} +.ico-snow::before { + mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjBweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyMHB4IiBmaWxsPSIjRkZGRkZGIj48cGF0aCBkPSJNNDU2LTI4MyAzMzYtMTYxcS04IDgtMTYuNSA4dC0xNy41LTdxLTgtOS04LTE4dDgtMTdsMTU0LTE1M3YtMTA4SDM1MEwxOTQtMzAycS04IDktMTcgOC41dC0xNy04LjVxLTgtOS04LTE3LjV0OS0xNy41bDEyNC0xMTlIMTI4cS03IDAtMTQuNS02LjVUMTA2LTQ3OXEwLTcgNi41LTE1dDE2LjUtOGgxNTZMMTYxLTYyM3EtOC04LTgtMTYuNXQ3LTE2LjVxOS05IDE4LTl0MTcgOWwxNTUgMTU0aDEwNnYtMTEwTDMwMi03NjRxLTgtOC04LTE3dDgtMTdxOS04IDE3LjUtOHQxNy41IDlsMTE5IDEyMHYtMTU0cTAtNyA2LjUtMTV0MTYuNS04cTcgMCAxNSA4dDggMTV2MTU0bDEyMS0xMjJxOC04IDE2LjUtOHQxNi41IDhxOSA4IDkgMTd0LTkgMTdMNTAyLTYxMnYxMTBoMTA4bDE1NC0xNTVxOC04IDE3LTh0MTcgOHE4IDkgOCAxNy41dC05IDE3LjVMNjc1LTUwMmgxNTZxNyAwIDE1IDh0OCAxNXEwIDEwLTggMTYuNXQtMTUgNi41SDY3NWwxMjMgMTIwcTkgOCA5IDE2LjV0LTggMTcuNXEtOCA4LTE3IDguNXQtMTgtNy41TDYxMC00NTZINTAydjEwOGwxNTQgMTU0cTkgOCA5IDE3LjV0LTggMTYuNXEtOSA4LTE3LjUgOHQtMTYuNS04TDUwMi0yODN2MTU1cTAgNy04IDE0LjV0LTE1IDcuNXEtMTAgMC0xNi41LTYuNVQ0NTYtMTI5di0xNTRaIi8+PC9zdmc+); +} +.ico-code::before { + mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjBweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyMHB4IiBmaWxsPSIjRkZGRkZGIj48cGF0aCBkPSJNMzE5LTIwMCAzOC00ODBsMjgyLTI4MiA5MSA5MC0xOTAgMTkxIDE5MCAxODktOTIgOTJabTMyMiAxLTkxLTkxIDE5MC0xOTAtMTkwLTE5MCA5MS05MCAyODEgMjgwLTI4MSAyODFaIi8+PC9zdmc+); +} +.ico-json::before { + mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjBweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZ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Mi4zOXE0Ni4yOCA1Ljg1IDc2LjQzIDM5Ljk5IDMwLjE0IDM0LjE0IDMwLjE0IDgxLjY2djQ5LjQ2cTAgMjAuNzggMTQuODMgMzUuNiAxNC44MiAxNC44MyAzNS42IDE0LjgzaDM0Ljk0djEwMy45NEgyODVaIi8+PC9zdmc+); +} +.loading { + animation: loading 2s linear infinite; + background-color: hsl(from var(--bg) h s calc(l + 20) / 50%) !important; +} +@keyframes loading { + from { + opacity: 0.4; + } + 50% { + opacity: 0.7; + } + to { + opacity: 0.4; + } +} +.mobile { + display: none !important; +} +.file-view-image, .file-view-video, .file-view-audio { + background-color: lch(from var(--dark-bg) calc(l - 3) calc(c - 15) h); +} +.file-view-video, .file-view-audio { + display: flex; + justify-content: center; + align-items: center; + & > * { + max-width: 100%; + max-height: 100%; + object-fit: contain; + } +} +.file-view-download { + p:first-child { + margin-top: 2rem; + } + p { + margin: 0.5rem 2rem; + max-width: 60ch; + } + code { + background-color: lch(from var(--dark-bg) calc(l - 5) calc(c - 5) h); + padding: 0.3rem 0.5rem; + border-radius: 0.3rem; + } +} +.speedbump { + z-index: 1; + position: relative; + canvas { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: -1; + } + header { + font-family: c1; + height: max(min(40vh, 400px), 100px); + color: #00ff80; + letter-spacing: 0.8ch; + margin-right: -0.8ch; + font-size: 6vw; + display: flex; + align-items: center; + justify-content: center; + font-variation-settings: "wght" 50; + text-shadow: 0 0 20px #00ff8022, 0 0 10px #00ff8033; + margin-bottom: 2rem; + h1 { + flex: 1; + margin: 0; + padding: 0; + display: flex; + align-items: center; + justify-content: center; + } + } + p { + max-width: 50ch; + margin: 0 auto 1rem auto; + color: #ecffea88; + line-height: 1.5; + letter-spacing: 0.01em; + word-spacing: 0.3em; + text-align: center; + font-size: 1.2rem; + } + button { + background-color: #00ff80bb; + color: #111318; + border: none; + padding: 0.5rem 1rem; + border-radius: 0.3rem; + font-size: 1.2rem; + font-weight: 400; + cursor: pointer; + letter-spacing: 0.5rem; + padding-right: 0.5rem; + } + .enter-container { + display: flex; + justify-content: center; + align-items: center; + margin-top: 1rem; + } + .image-grid { + display: grid; + grid-template-columns: repeat(3, 1fr); + grid-template-rows: repeat(3, 1fr); + gap: 0.5rem; + margin: 0 auto; + background-color: #050d06; + padding: 0.5rem; + border-radius: 0.75rem; + button { + background-color: #0c1f0e; + width: 100%; + max-width: 100px; + aspect-ratio: 1/1; + padding: 0; + margin: 0; + cursor: pointer; + border-radius: 0.5rem; + img { + width: 100%; + height: 100%; + display: block; + opacity: 0.75; + border-radius: 0.5rem; + } + &:hover { + img { + opacity: 0.85; + } + } + } + } +} +.lyrics { + align-self: flex-start; +} +.fullscreen-canvas { + position: fixed; + top: 0; + left: 0; + width: 100vw; + height: 100vh; + z-index: -1; + pointer-events: none; + user-select: none; + touch-action: none; +} +.cotyledon-link { + position: absolute; + bottom: 0; + right: 0; + color: #27143f; + padding: 0.5rem 1rem; + border-radius: 0.3rem; +} +.convo { + padding: 1rem; + .line { + margin-bottom: 0.5rem; + } + /* different colors for different ppl */ + .s-other_a { + padding-left: 4rem; + color: var(--primary); + } + .s-other_b { + padding-left: 8rem; + color: hsl(from var(--primary) calc(h + 200) s l); + } + .s-other_b2 { + padding-left: 4rem; + color: hsl(from var(--primary) calc(h + 200) s l); + } + .s-other_c { + padding-left: 12rem; + color: hsl(from var(--primary) calc(h + 100) s l); + } + .s-other_d { + padding-left: 4rem; + color: hsl(from var(--primary) calc(h + 50) s l); + } + .s-other_e { + padding-left: 4rem; + color: hsl(from var(--primary) calc(h + 80) s l); + } + .s-other_f { + padding-left: 4rem; + color: #00ff80; + } + hr { + margin-top: 2rem; + margin-bottom: 2rem; + border: none; + border-top: 2px solid var(--muted); + } +} +:not(.active) .ext { + font-size: 80%; + color: var(--muted); +} +.file-view-code { + color: lch(from var(--primary) 90 10 h / 0.88); + + .comment { + color: var(--muted); + } + .keyword { + font-weight: bold; + color: lch(from var(--primary) 100 20 h / 1); + } + .string { + color: lch(from var(--primary) calc(l + 30) calc(c + 30) h); + } + .constant { + color: lch(from var(--primary) calc(l + 30) calc(c - 30) h); + } + .method { + color: lch(from var(--primary) l c calc(h - 25)); + } + .class { + color: lch(from var(--primary) l c calc(h + 25)); + } + .builtin { + color: var(--primary); + font-weight: bold; + } + .parameter { + font-style: italic; + } + .variable { + color: lch(from var(--primary) 90 30 h / 0.88); + } +} +.for_everyone { + max-width: 69ch; + padding: 1rem 3rem; + font-family: rmo, monospace; + line-height: 1; + &:last-child { + padding-bottom: 3rem; + } + &:first-child { + padding-top: 3rem; + } + p { + /* line */ + margin: 0; + min-height: 1rem; + margin-bottom: 0.5rem; + } + p.normal { + line-height: 1.5; + } + blockquote { + margin-left: 0; + padding-left: 1rem; + border-left: 2px solid #f66244; + color: #ffbfb2; + line-height: 1.5; + p { + margin-bottom: 0.5rem; + } + } +} +.fade-slide-in { + animation: fadeSlideIn 0.4s cubic-bezier(0.3, 0.8, 0.3, 1); +} +@keyframes fadeSlideIn { + from { + opacity: 0.5; + transform: translateY(12px); + } + to { + opacity: 1; + transform: translateY(0); + } +} +/* MOBILE */ +@media (max-width: 1000px) { + html, body { + overflow: unset; + width: unset; + height: unset; + } + .mobile { + display: inline !important; + } + .desktop { + display: none !important; + } + h3 { + padding-left: 1rem; + font-size: 1.2rem; + } + body { + overflow-y: auto; + } + .files { + overflow-x: unset; + overflow-y: unset; + border-bottom: 16px solid var(--dark-bg); + min-height: 100vh; + .panel { + overflow-x: hidden; + border: none !important; + } + .panel, .panel .hsplit { + height: unset; + min-height: unset; + } + .panel .header { + padding: 0.75rem; + gap: 1rem; + align-items: center; + } + .mobile-back { + margin-left: -0.75rem; + display: block; + width: 48px; + height: 48px; + &::before { + display: block; + content: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjRkZGRkZGIj48cGF0aCBkPSJtMzEzLTQ0MCAyMjQgMjI0LTU3IDU2LTMyMC0zMjAgMzIwLTMyMCA1NyA1Ni0yMjQgMjI0aDQ4N3Y4MEgzMTNaIi8+PC9zdmc+); + transform: scale(2); + transform-origin: top left; + } + } + .full-screen, .download { + width: 48px; + height: 48px; + &::before { + transform: scale(2); + } + } + .panel ul li a { + display: flex; + flex-direction: column-reverse; + padding: 0.5rem 1rem; + text-overflow: unset; + white-space: wrap; + date { + font-size: 0.9rem; + padding-right: 0; + } + .size { + padding-left: 0; + } + .size:not(:first-child) { + padding-left: 0.5rem; + } + } + .first .size { + font-size: 0.9rem; + &::before { + content: "("; + } + &::after { + content: ")"; + } + } + } + .panel:not(.last) { + display: none; + } + .panel { + position: relative; + min-width: unset !important; + max-width: unset !important; + border-left-width: 10px !important; + } + .content { + height: unset !important; + min-width: unset !important; + max-width: unset !important; + overflow: unset !important; + } + .hsplit { + display: block !important; + } + .li.readme { + display: none !important; + } + .tooltip { + display: none !important; + } +} diff --git a/src/file-viewer/views/clofi.tsx b/src/file-viewer/views/clofi.tsx new file mode 100644 index 0000000..4f4b7f6 --- /dev/null +++ b/src/file-viewer/views/clofi.tsx @@ -0,0 +1,1007 @@ +import "./clofi.css"; +import assert from "node:assert"; +import path, { dirname } from "node:path"; +import { MediaFile } from "../db.ts"; +import { useInlineScript } from "../framework/page-resources.ts"; +import { escapeUri, formatDuration, formatSize } from "../media/share.ts"; +import { + highlightConvo, + highlightHashComments, + highlightLinksInTextView, +} from "../media/text-formatting.ts"; +import { TestID } from "../test/id.ts"; +import { ForEveryone } from "../media/cotyledon.tsx"; + +export const theme = { + bg: "#312652", + fg: "#f0f0ff", + primary: "#fabe32", +}; + +export const extensionToViewer: { + [key: string]: (props: { + file: MediaFile; + siblingFiles?: MediaFile[]; + }) => any; +} = { + ".html": IframeView, + ".txt": TextView, + ".md": TextView, + ".mp4": VideoView, + ".mkv": VideoView, + ".webm": VideoView, + ".avi": VideoView, + ".mov": VideoView, + ".mp3": AudioView, + ".flac": AudioView, + ".wav": AudioView, + ".ogg": AudioView, + ".m4a": AudioView, + ".jpg": ImageView, + ".jpeg": ImageView, + ".png": ImageView, + ".gif": ImageView, + ".webp": ImageView, + ".avif": ImageView, + ".heic": ImageView, + ".svg": ImageView, + ".chat": ChatView, + ".json": CodeView, + ".jsonc": CodeView, + ".toml": CodeView, + ".ts": CodeView, + ".js": CodeView, + ".tsx": CodeView, + ".jsx": CodeView, + ".css": CodeView, + ".py": CodeView, + ".lua": CodeView, + ".sh": CodeView, + ".bat": CodeView, + ".ps1": CodeView, + ".cmd": CodeView, + ".yaml": CodeView, + ".yml": CodeView, + ".xml": CodeView, + ".zig": CodeView, + ".astro": CodeView, + ".mdx": CodeView, + ".php": CodeView, + ".diff": CodeView, + ".patch": CodeView, +}; + +export default function MediaList({ + file, + hasCotyledonCookie, +}: { + file: MediaFile; + hasCotyledonCookie: boolean; +}) { + useInlineScript("file_viewer"); + + const dirs: MediaFile[] = []; + let dir: MediaFile | null = file; + assert(dir); + do { + dirs.unshift(dir); + dir = dir?.getParent(); + } while (dir); + const parts = file.path.split("/"); + + const isCotyledon = parseInt(parts[1]) < 2025; + + return ( +
    + {dirs.map((entry, i) => { + const isLast = i === dirs.length - 1; + return ( + + ); + })} +
    + ); +} + +const specialCaseViewers: Record = { + "/2024/for everyone": ForEveryone, +}; + +export function MediaPanel({ + file, + isLast, + activeFilename, + hasCotyledonCookie, +}: { + file: MediaFile; + isLast: boolean; + activeFilename: string | null; + hasCotyledonCookie: boolean; +}) { + const showsActions = file.path !== "/2024/for everyone"; + const label = file.path === "/" + ? ( + "clo's files" + ) + : ( + <> + {file.kind === MediaFile.Kind.directory + ? ( + + {file.basename} + / + + ) + : ( + <> + {file.basename} +
    + {showsActions && ( + + )} + + )} + + ); + let View = specialCaseViewers[file.path] ?? + (extensionToViewer[file.extension.toLowerCase()] as any) ?? + DownloadView; + if (View === VideoView && file.size > 500_000_000) { + View = DownloadViewTooBig; + } + const mobileBtn = file.path !== "/" && ( + + ); + const canvases: Record = { + "/2017": "2017", + "/2018": "2018", + "/2019": "2019", + "/2020": "2020", + "/2021": "2021", + "/2022": "2022", + "/2023": "2023", + "/2024": "2024", + }; + if (canvases[file.path]) { + useInlineScript(`canvas_${canvases[file.path]}` as any); + } + return ( +
    + {canvases[file.path] && ( + + + )} + {file.kind === MediaFile.Kind.directory && ( + +
    + {label} +
    + )} +
    + {mobileBtn} + {
    } + {label} +
    + + {file.kind === MediaFile.Kind.directory + ? ( + + ) + : ( +
    + +
    + )} +
    + ); +} + +const readmeFile = "readme.txt"; +const priorityFiles = ["readme.txt", "index.html"]; + +function sorterFromDirSort(dirsort: string) { + const array: string[] = JSON.parse(dirsort); + if (array.length === 1 && array[0] === "a-z") { + return sortAlphabetically; + } + return (a: MediaFile, b: MediaFile) => { + const aIndex = array.indexOf(a.basename); + const bIndex = array.indexOf(b.basename); + if (bIndex == -1 && aIndex >= 0) return -1; + if (aIndex == -1 && bIndex >= 0) return 1; + if (aIndex >= 0 && bIndex >= 0) { + return aIndex - bIndex; + } + return sortDefault(a, b); + }; +} + +function sortNumerically(a: MediaFile, b: MediaFile) { + const n1 = parseInt(a.basenameWithoutExt); + const n2 = parseInt(a.basenameWithoutExt); + return n1 - n2; +} + +function sortDefault(a: MediaFile, b: MediaFile) { + // First check if either file is in the priority list + const aIndex = priorityFiles.indexOf(a.basename.toLowerCase()); + const bIndex = priorityFiles.indexOf(b.basename.toLowerCase()); + + if (aIndex !== -1 && bIndex !== -1) { + // Both are priority files, sort by priority order + return aIndex - bIndex; + } else if (aIndex !== -1) { + // Only a is a priority file + return -1; + } else if (bIndex !== -1) { + // Only b is a priority file + return 1; + } + + // Then sort directories before files + if (a.kind !== b.kind) { + return a.kind === MediaFile.Kind.directory ? -1 : 1; + } + + // Finally sort by date (newest first), then by name (a-z) if dates are the same + const dateComparison = b.date.getTime() - a.date.getTime(); + if (dateComparison !== 0) { + return dateComparison; + } + // If dates are the same, sort alphabetically by name + return a.basename.localeCompare(b.basename); +} + +function sortAlphabetically(a: MediaFile, b: MediaFile) { + // First check if either file is in the priority list + const aIndex = priorityFiles.indexOf(a.basename.toLowerCase()); + const bIndex = priorityFiles.indexOf(b.basename.toLowerCase()); + + if (aIndex !== -1 && bIndex !== -1) { + // Both are priority files, sort by priority order + return aIndex - bIndex; + } else if (aIndex !== -1) { + // Only a is a priority file + return -1; + } else if (bIndex !== -1) { + // Only b is a priority file + return 1; + } + + // If dates are the same, sort alphabetically by name + return a.basename.localeCompare(b.basename); +} + +function isNumericallyOrdered(files: MediaFile[]) { + return !files.some((x) => Number.isNaN(parseInt(x.basenameWithoutExt))); +} + +function sortChronologicalStartToEnd(a: MediaFile, b: MediaFile) { + const aIndex = priorityFiles.indexOf(a.basename.toLowerCase()); + const bIndex = priorityFiles.indexOf(b.basename.toLowerCase()); + + if (aIndex !== -1 && bIndex !== -1) { + return aIndex - bIndex; + } else if (aIndex !== -1) { + return -1; + } else if (bIndex !== -1) { + return 1; + } + + const dateComparison = a.date.getTime() - b.date.getTime(); + if (dateComparison !== 0) { + return dateComparison; + } + return a.basename.localeCompare(b.basename); +} + +const sortOverrides: Record number> = { + "/2024": sortChronologicalStartToEnd, + "/2023": sortChronologicalStartToEnd, + "/2022": sortChronologicalStartToEnd, + "/2021": sortChronologicalStartToEnd, + "/2020": sortChronologicalStartToEnd, + "/2019": sortChronologicalStartToEnd, + "/2018": sortChronologicalStartToEnd, + "/2017": sortChronologicalStartToEnd, +}; + +function DirView({ + dir, + activeFilename, + isLast, + hasCotyledonCookie, +}: { + dir: MediaFile; + activeFilename: string | null; + isLast: boolean; + hasCotyledonCookie: boolean; +}) { + if (dir.path === "/") { + return ( + + ); + } + const isCotyledon = parseInt(dir.path.split("/")?.[1]) < 2025; + const unsortedFiles = dir + .getPublicChildren() + .filter((f) => !f.basenameWithoutExt.startsWith("_unlisted")); + const sorter = dir.dirsort + ? sorterFromDirSort(dir.dirsort) + : isNumericallyOrdered(unsortedFiles) + ? sortNumerically + : isCotyledon + ? sortChronologicalStartToEnd + : (sortOverrides[dir.path] ?? sortDefault); + const sortedFiles = unsortedFiles.sort(sorter); + const readme = sortedFiles.find((f) => f.basename === readmeFile); + if (readme && isLast) activeFilename ||= readmeFile; + const main = ( +
    +
      + {sortedFiles.map((file) => { + return ( + + ); + })} +
    +
    + ); + + if (readme && isLast) { + return ( +
    + + {main} +
    + ); + } + + return main; +} + +const unknownDate = new Date("1970-01-03"); +const unknownDateWithKnownYear = new Date("1970-02-20"); + +function ListItem({ + file, + active, + noDate, +}: { + file: MediaFile; + active: boolean; + noDate?: boolean; +}) { + const dateTime = file.date; + let shortDate = dateTime < unknownDateWithKnownYear + ? ( + dateTime < unknownDate + ? ( + "??.??.??" + ) + : <>xx.xx.{21 + Math.floor(dateTime.getTime() / 86400000)} + ) + : ( + `${(dateTime.getMonth() + 1).toString().padStart(2, "0")}.${ + dateTime + .getDate() + .toString() + .padStart(2, "0") + }.${dateTime.getFullYear().toString().slice(2)}` + ); + + let basenameWithoutExt = file.basenameWithoutExt; + + let meta = file.kind === MediaFile.Kind.directory + ? formatSize(file.size) + : (file.duration ?? 0) > 0 + ? formatDuration(file.duration!) + : null; + if (meta && dirname(file.path) !== "/") { + meta = `(${meta})`; + } + + const isReadme = file.basename === readmeFile; + + return ( +
  1. + + + {file.basename === readmeFile + ? <>{!noDate &&
    } + : <>{!noDate && {shortDate}}} + {meta} +
    + + + {path.dirname(file.path) !== "/" && ( + + )} + {basenameWithoutExt} + {file.extension} + {file.kind === MediaFile.Kind.directory + ? / + : ( + "" + )} + + {meta} + +
    +
  2. + ); +} + +function fileIcon(file: MediaFile, dirOpen?: boolean) { + if (file.kind === MediaFile.Kind.directory) { + return dirOpen ? "dir-open" : "dir"; + } + if (file.basename === "readme.txt") { + return "readme"; + } + if (file.path === "/2024/for everyone") { + return "snow"; + } + const ext = path.extname(file.basename).toLowerCase(); + if ( + ext === ".mp4" || + ext === ".mkv" || + ext === ".webm" || + ext === ".avi" || + ext === ".mov" + ) { + return "video"; + } + if ( + ext === ".mp3" || + ext === ".flac" || + ext === ".wav" || + ext === ".ogg" || + ext === ".m4a" + ) { + return "audio"; + } + if ( + ext === ".jpg" || + ext === ".jpeg" || + ext === ".png" || + ext === ".gif" || + ext === ".webp" || + ext === ".avif" || + ext === ".heic" || + ext === ".svg" + ) { + return "image"; + } + if (ext === ".comp" || ext === ".fuse" || ext === ".setting") return "fusion"; + if (ext === ".txt" || ext === ".md") return "text"; + if (ext === ".html") return "webpage"; + if (ext === ".blend") return "blend"; + if ( + ext === ".zip" || + ext === ".rar" || + ext === ".7z" || + ext === ".tar" || + ext === ".gz" || + ext === ".bz2" || + ext === ".xz" + ) { + return "archive"; + } + if (ext === ".lnk") return "link"; + if (ext === ".chat") return "chat"; + if ( + ext === ".ts" || + ext === ".js" || + ext === ".tsx" || + ext === ".jsx" || + ext === ".css" || + ext === ".py" || + ext === ".lua" || + ext === ".sh" || + ext === ".bat" || + ext === ".ps1" || + ext === ".cmd" || + ext === ".php" + ) { + return "code"; + } + if (ext === ".json" || ext === ".toml" || ext === ".yaml" || ext === ".yml") { + return "json"; + } + return "file"; +} + +function RootDirView({ + dir, + activeFilename, + isLast, + hasCotyledonCookie, +}: { + dir: MediaFile; + activeFilename: string | null; + isLast: boolean; + hasCotyledonCookie: boolean; +}) { + const children = dir.getPublicChildren(); + let readme: MediaFile | null = null; + + const groups = { + // years 2025 and onwards + years: [] as MediaFile[], + // named categories + categories: [] as MediaFile[], + // years 2017 to 2024 + cotyledon: [] as MediaFile[], + }; + const colorMap = { + years: "#a2ff91", + categories: "#9c91ff", + cotyledon: "#ff91ca", + }; + for (const child of children) { + const basename = child.basename; + if (basename === readmeFile) { + readme = child; + continue; + } + + const year = basename.match(/^(\d{4})/); + if (year) { + const n = parseInt(year[1]); + if (n >= 2025) { + groups.years.push(child); + } else { + groups.cotyledon.push(child); + } + } else { + groups.categories.push(child); + } + } + + if (readme && isLast) activeFilename ||= readmeFile; + + const main = ( +
    + {readme && ( +
      + +
    + )} + {Object.entries(groups).map(([key, files]) => { + if (key === "cotyledon" && !hasCotyledonCookie) { + return null; + } + if (key === "years" || key === "cotyledon") { + files.sort((a, b) => { + return b.basename.localeCompare(a.basename); + }); + } else { + files.sort((a, b) => { + return a.basename.localeCompare(b.basename); + }); + } + return ( +
    +

    + {key} +

    +
      + {files.map((file) => ( + + ))} +
    +
    + ); + })} +
    + ); + + if (readme && isLast) { + return ( +
    + + + cotyledon + + + )} + /> + {main} + {!hasCotyledonCookie && ( + <> + + cotyledon + + + )} +
    + ); + } + + return main; +} + +function TextView({ + file, + siblingFiles = [], +}: { + file: MediaFile; + siblingFiles?: MediaFile[]; +}) { + const contents = file.contents; + + if (file.path.startsWith("/2021/phoenix-write/maps")) { + const basename = file.basename; + if (basename.includes("map") && basename.endsWith(".txt")) { + return ( +
    
    +      );
    +    }
    +  }
    +
    +  return (
    +    
     f.kind === MediaFile.Kind.file),
    +        ),
    +      }}
    +    >
    + ); +} + +function ChatView({ file }: { file: MediaFile }) { + const contents = file.contents; + return ( +
    +
    + ); +} + +function CodeView({ file }: { file: MediaFile }) { + const highlightedContents = file.contents; + if (!highlightedContents) { + if (file.size > 1_000_000) { + return ; + } + return ; + } + return ( +
    +  );
    +}
    +
    +function VideoView({ file }: { file: MediaFile }) {
    +  useInlineScript("video_player");
    +  const dimensions = file.parseDimensions() ?? { width: 1920, height: 1080 };
    +  return (
    +    <>
    +      
    +    
    +  );
    +}
    +
    +function AudioView({
    +  file,
    +  onlyAudio = false,
    +}: {
    +  file: MediaFile;
    +  onlyAudio?: boolean;
    +}) {
    +  const parent = file.getParent();
    +  let lyricsFile: MediaFile | null = null;
    +  if (parent && !onlyAudio) {
    +    const siblings = parent.getPublicChildren();
    +    // show lyrics only if
    +    // - this media file is the only audio file
    +    // - there is lyrics.txt in the same directory
    +    const audioFiles = siblings.filter(
    +      (f) =>
    +        f.kind === MediaFile.Kind.file &&
    +        extensionToViewer[path.extname(f.basename)] === AudioView,
    +    );
    +    if (
    +      audioFiles.length === 1 &&
    +      siblings.find((f) => f.basename === "lyrics.txt")
    +    ) {
    +      lyricsFile = siblings.find((f) => f.basename === "lyrics.txt")!;
    +    }
    +  }
    +  return (
    +    <>
    +      
    +      {lyricsFile && (
    +        
    +

    + lyrics +

    + +
    + )} + + ); +} + +function ImageView({ file }: { file: MediaFile }) { + return ( + {file.basename} + ); +} + +function IframeView({ file }: { file: MediaFile }) { + return ( + <> +