diff --git a/framework/generate.ts b/framework/generate.ts
index ccd29f9707cd7cdc859e27c2ff05fcce0f0ae291..84a9993a4da56a6b4157d2acd026b7d33a2d376f 100644
--- a/framework/generate.ts
+++ b/framework/generate.ts
@@ -124,6 +124,7 @@ export async function readManifest(io: Io) {
return {
siteSections: cfg.siteSections.map((section) => ({
root: toRel(section.root),
+ base: section.base ?? "/",
})),
backends: cfg.backends.map(toRel),
fonts: cfg.fonts,
@@ -141,8 +142,11 @@ export async function discoverAllFiles(
using node = p.start("discover files");
return (
await Promise.all(
- siteConfig.siteSections.map(({ root: sectionRoot }) =>
- incr.work(node, scanSiteSection, toAbs(sectionRoot))
+ siteConfig.siteSections.map(({ root: root, base }) =>
+ incr.work(node, scanSiteSection, {
+ root: toAbs(root),
+ base: base.endsWith("/") ? base : base + "/",
+ })
),
)
).reduce((acc, next) => ({
@@ -153,8 +157,8 @@ export async function discoverAllFiles(
}));
}
-export async function scanSiteSection(io: Io, sectionRoot: string) {
- using _ = io.start(toRel(sectionRoot));
+export async function scanSiteSection(io: Io, section: sg.Section) {
+ using _ = io.start(toRel(section.root));
// Static files are compressed and served as-is.
// - "{section}/static/*.png"
let staticFiles: FileItem[] = [];
@@ -170,29 +174,32 @@ export async function scanSiteSection(io: Io, sectionRoot: string) {
// - "{section}/scripts/*.client.ts"
let scripts: FileItem[] = [];
- const sectionPath = (...sub: string[]) => path.join(sectionRoot, ...sub);
- const rootPrefix = hot.projectSrc === sectionRoot
+ const sectionPath = (...sub: string[]) => path.join(section.root, ...sub);
+ const rootPrefix = hot.projectSrc === section.root
? ""
- : path.relative(hot.projectSrc, sectionRoot) + "/";
+ : path.relative(hot.projectSrc, section.root) + "/";
const kinds = [
{
dir: sectionPath("pages"),
list: pages,
- prefix: "/",
+ prefix: section.base,
include: [".tsx", ".mdx", ".marko"],
exclude: [".client.ts", ".client.tsx"],
+ page: true,
},
{
dir: sectionPath("static"),
list: staticFiles,
- prefix: "/",
+ prefix: section.base,
ext: true,
+ page: true,
},
{
dir: sectionPath("scripts"),
list: scripts,
prefix: rootPrefix,
include: [".client.ts", ".client.tsx"],
+ page: false,
},
{
dir: sectionPath("views"),
@@ -200,6 +207,7 @@ export async function scanSiteSection(io: Io, sectionRoot: string) {
prefix: rootPrefix,
include: [".tsx", ".mdx", ".marko"],
exclude: [".client.ts", ".client.tsx"],
+ page: false,
},
];
for (const kind of kinds) {
@@ -229,7 +237,7 @@ export async function scanSiteSection(io: Io, sectionRoot: string) {
? subPath
: subPath.slice(0, -path.extname(subPath).length).replaceAll(".", "/");
let id = prefix + trim.replaceAll("\\", "/");
- if (prefix === "/" && id.endsWith("/index")) {
+ if (kind.page && id.endsWith("/index")) {
id = id.slice(0, -"/index".length) || "/";
}
list.push({ id, file: path.relative(hot.projectRoot, file) });
diff --git a/framework/hot.ts b/framework/hot.ts
index 324b86ff3d226041a25697f36e3a02cd9b5e3743..3695084aa3edbff84c537ad35fa75e8265e48355 100644
--- a/framework/hot.ts
+++ b/framework/hot.ts
@@ -174,7 +174,11 @@ function loadMarko(module: NodeJS.Module, filepath: string) {
function loadMdx(module: NodeJS.Module, filepath: string) {
const input = fs.readFileSync(filepath);
- const out = mdx.compileSync(input, { jsxImportSource: "#jsx" }).value;
+ const out = mdx.compileSync(input, {
+ jsxImportSource: "#jsx",
+ providerImportSource: "#mdx",
+ rehypePlugins: [rehypeMdxCodeProps],
+ }).value;
const src = typeof out === "string" ? out : Buffer.from(out).toString("utf8");
return loadEsbuildCode(module, filepath, src);
}
@@ -323,6 +327,7 @@ import { pathToFileURL } from "node:url";
import * as esbuild from "esbuild";
import { createRequire } from "node:module";
import * as mdx from "@mdx-js/mdx";
+import rehypeMdxCodeProps from "rehype-mdx-code-props";
import * as self from "./hot.ts";
import { Buffer } from "node:buffer";
import { UNWRAP } from "lib/assert.ts";
diff --git a/framework/lib/sitegen.ts b/framework/lib/sitegen.ts
index f2413829534ccc8c9e60b1a3afc6e210800fa8b3..1e72bc84fd68700b90023d706e31f3232749722f 100644
--- a/framework/lib/sitegen.ts
+++ b/framework/lib/sitegen.ts
@@ -30,6 +30,7 @@ export interface FileItem {
}
export interface Section {
root: string;
+ base?: string;
}
export interface Font {
name: string;
@@ -59,6 +60,17 @@ export function addScript(id: ScriptId | { value: ScriptId }) {
context.get().scripts.add(typeof id === "string" ? id : id.value);
}
+// TODO: self-host plausible for extra privacy. i am in a rush as i write this
+// TODO: properly locate this constant in `site.ts`
+//
+// I have this so I can see if the blog is actually seen by people. And for
+// understanding where paperclover.net gets its load for. When I need to scale
+// large enough, analytics will determine the location of the second web
+// hosting node.
+export const analytics =
+ `
+ `;
+
export function wrapDocument({
body,
head,
@@ -72,7 +84,7 @@ export function wrapDocument({
}) {
return `
${head}${
inlineCss ? `` : ""
- }${body}${
+ }${analytics}${body}${
scripts ? `` : ""
}`;
}
diff --git a/framework/mdx-hack.tsx b/framework/mdx-hack.tsx
new file mode 100644
index 0000000000000000000000000000000000000000..61e2cc424968a8514b703934bdc34a70b2de921d
--- /dev/null
+++ b/framework/mdx-hack.tsx
@@ -0,0 +1,32 @@
+export function useMDXComponents() {
+ return {
+ pre: async (
+ { filename, whitespace, tint, children: [, , { className, children }] },
+ ) => {
+ const lang = className.split("-")?.[1] ?? null;
+ const code = ["tsx", "jsx", "json", "html", "ts", "js"].includes(lang)
+ ? await highlight.highlightCode(
+ children.trim(),
+ lang,
+ )
+ : children.trim();
+ return (
+
+ {filename && {filename} }
+ {render.raw(code)}
+
+ );
+ },
+ code: ({ children }) => {
+ return (
+
+ {children}
+
+ );
+ },
+ };
+}
+import * as highlight from "../src/file-viewer/highlight.ts";
+import * as render from "lib/render.ts";
diff --git a/lib/progress.ts b/lib/progress.ts
index 3f7b824c9db23367c7c93c819e1a2ef66639d911..dbff7153c437ea6114f1e42192b39f7cd53ac52a 100644
--- a/lib/progress.ts
+++ b/lib/progress.ts
@@ -1,3 +1,9 @@
+// For those coming from my blog, check out this video
+// -> https://paperclover.net/file/2025/file%20scanner.mp4?view=embed
+//
+// There is some massive rework pending on this file, check out the PR
+// -> https://git.paperclover.net/clo/sitegen/pulls/48
+//
// This file is under heavy construction.
// - I am happy with the overall design
// - Will rename things
diff --git a/lib/render.ts b/lib/render.ts
index e26b182987ef60159fee6875230cfbb457687572..bf70fc98de65366114786764832d6a351f5b55c2 100644
--- a/lib/render.ts
+++ b/lib/render.ts
@@ -370,6 +370,7 @@ function stringifyStyleAttribute(style: Record): string {
)
}`;
}
+ if (!out) return "";
return "style=" + quoteIfNeeded(out);
}
diff --git a/package-lock.json b/package-lock.json
index 46a8b52426e5cf656e75e0f60dfc6fff774cbffa..cde3bb0b5af643e58f9eea9c94892b502e69f25d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -17,9 +17,8 @@
"marko": "6.0.82",
"msgpackr": "1.11.5",
"puppeteer": "24.23.0",
- "sharp": "0.34.2",
+ "rehype-mdx-code-props": "^3.0.1",
"source-map-support": "0.5.21",
- "ts-to-jsdoc": "2.4.0",
"unique-names-generator": "4.7.1",
"vscode-oniguruma": "2.0.1",
"vscode-textmate": "9.2.0"
@@ -491,16 +490,6 @@
"w3c-keyname": "^2.2.4"
}
},
- "node_modules/@emnapi/runtime": {
- "version": "1.4.4",
- "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.4.4.tgz",
- "integrity": "sha512-hHyapA4A3gPaDCNfiqyZUStTMqIkKRshqPIuDOXv1hcBnD4U3l8cP0T1HMCfGRxQ6V64TGCcoswChANyOAwbQg==",
- "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",
@@ -913,402 +902,6 @@
"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.13",
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",
@@ -1541,41 +1134,6 @@
"win32"
]
},
- "node_modules/@nodelib/fs.scandir": {
- "version": "2.1.5",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
- "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
- "license": "MIT",
- "dependencies": {
- "@nodelib/fs.stat": "2.0.5",
- "run-parallel": "^1.1.9"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/@nodelib/fs.stat": {
- "version": "2.0.5",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
- "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
- "license": "MIT",
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/@nodelib/fs.walk": {
- "version": "1.2.8",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
- "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
- "license": "MIT",
- "dependencies": {
- "@nodelib/fs.scandir": "2.1.5",
- "fastq": "^1.6.0"
- },
- "engines": {
- "node": ">= 8"
- }
- },
"node_modules/@puppeteer/browsers": {
"version": "2.10.10",
"resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.10.10.tgz",
@@ -1621,18 +1179,6 @@
"integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==",
"license": "MIT"
},
- "node_modules/@ts-morph/common": {
- "version": "0.24.0",
- "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.24.0.tgz",
- "integrity": "sha512-c1xMmNHWpNselmpIqursHeOHHBTIsJLbB+NuovbTTRCNiTLEr/U9dbJ8qy0jd/O2x5pc3seWuOUN5R2IoOTp8A==",
- "license": "MIT",
- "dependencies": {
- "fast-glob": "^3.3.2",
- "minimatch": "^9.0.4",
- "mkdirp": "^3.0.1",
- "path-browserify": "^1.0.1"
- }
- },
"node_modules/@types/debug": {
"version": "4.1.12",
"resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz",
@@ -1773,12 +1319,6 @@
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
- "node_modules/arg": {
- "version": "5.0.2",
- "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz",
- "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==",
- "license": "MIT"
- },
"node_modules/argparse": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
@@ -1830,12 +1370,6 @@
"url": "https://github.com/sponsors/wooorm"
}
},
- "node_modules/balanced-match": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
- "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
- "license": "MIT"
- },
"node_modules/bare-events": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.7.0.tgz",
@@ -1976,27 +1510,6 @@
"url": "https://github.com/sponsors/wooorm"
}
},
- "node_modules/brace-expansion": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
- "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
- "license": "MIT",
- "dependencies": {
- "balanced-match": "^1.0.0"
- }
- },
- "node_modules/braces": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
- "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
- "license": "MIT",
- "dependencies": {
- "fill-range": "^7.1.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/browserslist": {
"version": "4.26.3",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.26.3.tgz",
@@ -2151,12 +1664,6 @@
"node": ">=12"
}
},
- "node_modules/code-block-writer": {
- "version": "13.0.3",
- "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-13.0.3.tgz",
- "integrity": "sha512-Oofo0pq3IKnsFtuHqSF7TqBfr71aeyZDVJ0HpmqB7FBM2qEigL0iPONSCZSO9pE9dZTAxANe5XHG9Uy0YMv8cg==",
- "license": "MIT"
- },
"node_modules/codem-isoboxer": {
"version": "0.3.10",
"resolved": "https://registry.npmjs.org/codem-isoboxer/-/codem-isoboxer-0.3.10.tgz",
@@ -2188,19 +1695,6 @@
"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",
@@ -2219,16 +1713,6 @@
"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",
@@ -2377,6 +1861,7 @@
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.4.tgz",
"integrity": "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==",
"license": "Apache-2.0",
+ "optional": true,
"engines": {
"node": ">=8"
}
@@ -2656,6 +2141,18 @@
"url": "https://opencollective.com/unified"
}
},
+ "node_modules/estree-util-value-to-estree": {
+ "version": "3.4.1",
+ "resolved": "https://registry.npmjs.org/estree-util-value-to-estree/-/estree-util-value-to-estree-3.4.1.tgz",
+ "integrity": "sha512-E4fEc8KLhDXnbyDa5XrbdT9PbgSMt0AGZPFUsGFok8N2Q7DTO+F6xAFJjIdw71EkidRg186I1mQCKzZ1ZbEsCw==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree": "^1.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/remcohaszing"
+ }
+ },
"node_modules/estree-util-visit": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/estree-util-visit/-/estree-util-visit-2.0.0.tgz",
@@ -2735,31 +2232,6 @@
"integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==",
"license": "MIT"
},
- "node_modules/fast-glob": {
- "version": "3.3.3",
- "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz",
- "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==",
- "license": "MIT",
- "dependencies": {
- "@nodelib/fs.stat": "^2.0.2",
- "@nodelib/fs.walk": "^1.2.3",
- "glob-parent": "^5.1.2",
- "merge2": "^1.3.0",
- "micromatch": "^4.0.8"
- },
- "engines": {
- "node": ">=8.6.0"
- }
- },
- "node_modules/fastq": {
- "version": "1.19.1",
- "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz",
- "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==",
- "license": "ISC",
- "dependencies": {
- "reusify": "^1.0.4"
- }
- },
"node_modules/fd-slicer": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
@@ -2769,18 +2241,6 @@
"pend": "~1.2.0"
}
},
- "node_modules/fill-range": {
- "version": "7.1.1",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
- "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
- "license": "MIT",
- "dependencies": {
- "to-regex-range": "^5.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/gensync": {
"version": "1.0.0-beta.2",
"resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
@@ -2828,16 +2288,23 @@
"node": ">= 14"
}
},
- "node_modules/glob-parent": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
- "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
- "license": "ISC",
+ "node_modules/hast-util-properties-to-mdx-jsx-attributes": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/hast-util-properties-to-mdx-jsx-attributes/-/hast-util-properties-to-mdx-jsx-attributes-1.0.1.tgz",
+ "integrity": "sha512-ZzxhjHZ+gyxaPIFp/nuRpVL4GIFoqzfH6vNgjaA3CuUAV6XCxYwAQfRczrZRkgL6msi6DdOl+/QEduOdzszvbg==",
+ "license": "MIT",
"dependencies": {
- "is-glob": "^4.0.1"
+ "@types/estree": "^1.0.0",
+ "@types/hast": "^3.0.0",
+ "comma-separated-tokens": "^2.0.0",
+ "estree-util-value-to-estree": "^3.0.0",
+ "mdast-util-mdx-jsx": "^3.0.0",
+ "property-information": "^7.0.0",
+ "space-separated-tokens": "^2.0.0",
+ "style-to-js": "^1.0.0"
},
- "engines": {
- "node": ">= 6"
+ "funding": {
+ "url": "https://github.com/sponsors/remcohaszing"
}
},
"node_modules/hast-util-to-estree": {
@@ -3075,15 +2542,6 @@
"url": "https://github.com/sponsors/wooorm"
}
},
- "node_modules/is-extglob": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
- "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
- "license": "MIT",
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
@@ -3093,18 +2551,6 @@
"node": ">=8"
}
},
- "node_modules/is-glob": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
- "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
- "license": "MIT",
- "dependencies": {
- "is-extglob": "^2.1.1"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/is-hexadecimal": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz",
@@ -3115,15 +2561,6 @@
"url": "https://github.com/sponsors/wooorm"
}
},
- "node_modules/is-number": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
- "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
- "license": "MIT",
- "engines": {
- "node": ">=0.12.0"
- }
- },
"node_modules/is-plain-obj": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz",
@@ -3463,15 +2900,6 @@
"url": "https://opencollective.com/unified"
}
},
- "node_modules/merge2": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
- "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
- "license": "MIT",
- "engines": {
- "node": ">= 8"
- }
- },
"node_modules/micromark": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.2.tgz",
@@ -4068,55 +3496,12 @@
],
"license": "MIT"
},
- "node_modules/micromatch": {
- "version": "4.0.8",
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
- "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
- "license": "MIT",
- "dependencies": {
- "braces": "^3.0.3",
- "picomatch": "^2.3.1"
- },
- "engines": {
- "node": ">=8.6"
- }
- },
- "node_modules/minimatch": {
- "version": "9.0.5",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
- "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
- "license": "ISC",
- "dependencies": {
- "brace-expansion": "^2.0.1"
- },
- "engines": {
- "node": ">=16 || 14 >=14.17"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
"node_modules/mitt": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz",
"integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==",
"license": "MIT"
},
- "node_modules/mkdirp": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz",
- "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==",
- "license": "MIT",
- "bin": {
- "mkdirp": "dist/cjs/src/bin.js"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
"node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
@@ -4298,18 +3683,6 @@
"integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
"license": "ISC"
},
- "node_modules/picomatch": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
- "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
- "license": "MIT",
- "engines": {
- "node": ">=8.6"
- },
- "funding": {
- "url": "https://github.com/sponsors/jonschlinkert"
- }
- },
"node_modules/progress": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
@@ -4412,26 +3785,6 @@
"node": ">=18"
}
},
- "node_modules/queue-microtask": {
- "version": "1.2.3",
- "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
- "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "license": "MIT"
- },
"node_modules/raptor-async": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/raptor-async/-/raptor-async-1.1.3.tgz",
@@ -4514,6 +3867,24 @@
"url": "https://opencollective.com/unified"
}
},
+ "node_modules/rehype-mdx-code-props": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/rehype-mdx-code-props/-/rehype-mdx-code-props-3.0.1.tgz",
+ "integrity": "sha512-BWWKn0N6r7/qd7lbLgv5J8of7imz1l1PyCNoY7BH0AOR9JdJlQIfA9cKqTZVEb2h2GPKh473qrBajF0i01fq3A==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0",
+ "hast-util-properties-to-mdx-jsx-attributes": "^1.0.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-mdx": "^3.0.0",
+ "micromark-extension-mdxjs": "^3.0.0",
+ "unified": "^11.0.0",
+ "unist-util-visit-parents": "^6.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/remcohaszing"
+ }
+ },
"node_modules/rehype-recma": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/rehype-recma/-/rehype-recma-1.0.0.tgz",
@@ -4600,39 +3971,6 @@
"node": ">=8"
}
},
- "node_modules/reusify": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz",
- "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==",
- "license": "MIT",
- "engines": {
- "iojs": ">=1.0.0",
- "node": ">=0.10.0"
- }
- },
- "node_modules/run-parallel": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
- "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "queue-microtask": "^1.2.2"
- }
- },
"node_modules/sax": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz",
@@ -4657,74 +3995,6 @@
"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",
@@ -4916,18 +4186,6 @@
"b4a": "^1.6.4"
}
},
- "node_modules/to-regex-range": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
- "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
- "license": "MIT",
- "dependencies": {
- "is-number": "^7.0.0"
- },
- "engines": {
- "node": ">=8.0"
- }
- },
"node_modules/trim-lines": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz",
@@ -4948,32 +4206,6 @@
"url": "https://github.com/sponsors/wooorm"
}
},
- "node_modules/ts-morph": {
- "version": "23.0.0",
- "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-23.0.0.tgz",
- "integrity": "sha512-FcvFx7a9E8TUe6T3ShihXJLiJOiqyafzFKUO4aqIHDUCIvADdGNShcbc2W5PMr3LerXRv7mafvFZ9lRENxJmug==",
- "license": "MIT",
- "dependencies": {
- "@ts-morph/common": "~0.24.0",
- "code-block-writer": "^13.0.1"
- }
- },
- "node_modules/ts-to-jsdoc": {
- "version": "2.4.0",
- "resolved": "https://registry.npmjs.org/ts-to-jsdoc/-/ts-to-jsdoc-2.4.0.tgz",
- "integrity": "sha512-RiI9ipxkLjXESp5+YjXIQJ5GgtjwWTZU4uDahxsIdr1HKLFaC/nQOtgkGRJ+AFxqHrrhwrXtPh093r0nXQwKmw==",
- "license": "MIT",
- "dependencies": {
- "arg": "^5.0.1",
- "ts-morph": "^23.0.0"
- },
- "bin": {
- "ts-to-jsdoc": "bin/ts-to-jsdoc"
- },
- "optionalDependencies": {
- "typescript": "*"
- }
- },
"node_modules/tslib": {
"version": "2.8.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
diff --git a/package.json b/package.json
index 4547a07f4d1c1e63c16180dbd49bb507fcf9e259..78c5874b5a08193304828bdf80db436f37d80cca 100644
--- a/package.json
+++ b/package.json
@@ -13,6 +13,7 @@
"marko": "6.0.82",
"msgpackr": "1.11.5",
"puppeteer": "24.23.0",
+ "rehype-mdx-code-props": "^3.0.1",
"source-map-support": "0.5.21",
"unique-names-generator": "4.7.1",
"vscode-oniguruma": "2.0.1",
@@ -39,6 +40,7 @@
"deno": "hono/deno",
"node": "@hono/node-server/conninfo",
"worker": "hono/cloudflare-workers"
- }
+ },
+ "#mdx": "./framework/mdx-hack.tsx"
}
}
diff --git a/src/bin/deploy.ts b/src/bin/deploy.ts
new file mode 100644
index 0000000000000000000000000000000000000000..c17ca3edae9022f4dab8398ccb991784e5b6a67a
--- /dev/null
+++ b/src/bin/deploy.ts
@@ -0,0 +1,61 @@
+export async function main() {
+ await rsync.spawn({
+ cwd: Path.resolve(import.meta.dirname).parent!.toString(),
+ args: [
+ "-a",
+ "--progress",
+ "clo@zenith:/mnt/storage1/clover/Documents/Config/paperclover/cache.sqlite",
+ ".clover/",
+ ],
+ progress: progress.start("download file cache"),
+ });
+ await rsync.spawn({
+ cwd: Path.resolve(import.meta.dirname).parent!.toString(),
+ args: [
+ "-a",
+ "--progress",
+ "clo@paperclover.net:~/paperclover.net/.clover/questions.sqlite",
+ ".clover/",
+ ],
+ progress: progress.start("download questions state"),
+ });
+
+ // cannot call incr.restore until database calls are
+ // considered in the watch graph.
+ // await incr.restore()
+ await incr.compile(generate);
+
+ await rsync.spawn({
+ cwd: Path.resolve(import.meta.dirname).parent!.parent!.toString(),
+ args: [
+ "-a",
+ "-r",
+ "--progress",
+ "--delete",
+ "--exclude=node_modules",
+ "--exclude=.clover",
+ "package.json",
+ "package-lock.json",
+ ".clover/o/",
+ "paperclover.net:~/paperclover.net/",
+ ],
+ progress: progress.start("copy site files"),
+ });
+ await subprocess.spawnAndWait({
+ stdio: "inherit",
+ cmd: [
+ "ssh",
+ "paperclover.net",
+ "cd paperclover.net && " +
+ "npm i &&" +
+ "pm2 restart site",
+ ],
+ });
+}
+
+import * as incr from "../../framework/incremental.ts";
+import { generate } from "../../framework/generate.ts";
+import * as progress from "lib/progress.ts";
+import * as subprocess from "lib/subprocess.ts";
+import * as rsync from "../file-viewer/rsync.ts";
+import { Path } from "#sitegen/path";
diff --git a/src/bin/package-lib.ts b/src/bin/package-lib.ts
new file mode 100644
index 0000000000000000000000000000000000000000..b26cde479d91bcbcb1e0ebf7d9009b7a1b0dc313
--- /dev/null
+++ b/src/bin/package-lib.ts
@@ -0,0 +1,226 @@
+export async function updateJsrPackageExportsToAll(
+ absPath: string,
+ p: progress.Ref,
+) {
+ using _ = p.start("update deno.json");
+ const manifestPath = path.join(absPath, "deno.json");
+ const deno = JSON.parse(
+ await fs.readFile(manifestPath, "utf-8"),
+ );
+ const newExports: Record = {};
+ for (const subPath of await fs.readdir(absPath, { recursive: true })) {
+ if (!subPath.match(/\.tsx?$/)) continue;
+ if (subPath.match(/\.(test|sample)\.tsx?$/)) continue;
+ if (subPath.startsWith("dist")) continue;
+ newExports["./" + subPath] = "./" + subPath;
+ }
+ deno.exports = Object.fromEntries(
+ Object.entries(newExports).sort(([a], [b]) => a.localeCompare(b)),
+ ) as typeof deno.exports;
+ await fs.writeFile(manifestPath, JSON.stringify(deno, null, 2));
+}
+
+export async function transpileForNpm(
+ absPath: string,
+ p: progress.Ref,
+ packageJson: Record,
+) {
+ using node = p.start("transpile into js for npm");
+ const manifestPath = path.join(absPath, "deno.json");
+ const deno = JSON.parse(
+ await fs.readFile(manifestPath, "utf-8"),
+ );
+ const distPath = path.join(absPath, "dist-npm");
+ await fs.rm(distPath, { recursive: true, force: true });
+ await fs.mkdir(distPath, { recursive: true });
+
+ const files: string[] = [];
+ const exports: Record = {};
+ for (const subPath of await fs.readdir(absPath, { recursive: true })) {
+ if (!subPath.match(/\.tsx?$/)) continue;
+ if (subPath.startsWith("dist")) continue;
+ files.push(subPath);
+ }
+ const tsFiles: string[] = [];
+ for (const subPath of files) {
+ using _ = node.start(subPath);
+ const targetSubPath = subPath.replace(/\.tsx?$/, ".js");
+ if (!subPath.match(/\.(test|sample)\.tsx?$/)) {
+ exports["./" + subPath] = "./" + targetSubPath;
+ }
+ const out = path.join(distPath, subPath);
+ await fs.mkdir(path.dirname(out), { recursive: true });
+ tsFiles.push(out);
+
+ let code = await fs.readFile(path.join(absPath, subPath), "utf-8");
+ code = code.replace(
+ / from "lib\/([^"]+)"/g,
+ (_, src) => {
+ return ' from "./' + path.relative(
+ path.dirname(subPath),
+ src.replace(/\.tsx?$/, ".js"),
+ ) + '"';
+ },
+ );
+ await fs.writeFile(out, code);
+ }
+ await subprocess.spawnAndWait({
+ cmd: [
+ "npx",
+ "tsc",
+ "--outdir",
+ distPath,
+ "--sourceMap",
+ "--declarationMap",
+ "--declaration",
+ "--module",
+ "nodenext",
+ "--lib",
+ "esnext",
+ "--skipLibCheck",
+ "--jsx",
+ "react-jsx",
+ "--jsxImportSource",
+ "./lib/dist-npm/render",
+ "--target",
+ "esnext",
+ "--isolatedModules",
+ "--verbatimModuleSyntax",
+ "--allowSyntheticDefaultImports",
+ "--moduleResolution",
+ "nodenext",
+ ...tsFiles,
+ ],
+ });
+ await fs.writeFile(
+ path.join(distPath, "readme.md"),
+ (await fs.readFile(path.join(absPath, "readme.md"), "utf-8")).replace(
+ "\n",
+ await fs.readFile(path.join(absPath, "readme.npm.md"), "utf-8"),
+ ),
+ ).catch((e) => {
+ if (e.code !== "ENOENT") throw e;
+ });
+ await fs.cp(
+ path.join(absPath, "readme.changes.md"),
+ path.join(distPath, "readme.changes.md"),
+ ).catch((e) => {
+ if (e.code !== "ENOENT") throw e;
+ });
+ const { name, description, ...rest } = packageJson;
+ await fs.writeFile(
+ path.join(distPath, "package.json"),
+ JSON.stringify(
+ {
+ name,
+ description,
+ version: deno.version,
+ type: "module",
+ exports,
+ ...rest,
+ },
+ null,
+ 2,
+ ),
+ );
+}
+
+// TODO: failed experiment
+//
+// export async function transpileForNpm(
+// absPath: string,
+// p: progress.Ref,
+// packageJson: Record,
+// ) {
+// const { transpileFile } = await import("ts-to-jsdoc") as TsToJsdoc;
+//
+// using node = p.start("transpile into jsdoc for npm");
+// const manifestPath = path.join(absPath, "deno.json");
+// const deno = JSON.parse(
+// await fs.readFile(manifestPath, "utf-8"),
+// );
+// const distPath = path.join(absPath, "dist-npm");
+// await fs.rm(distPath, { recursive: true, force: true });
+// await fs.mkdir(distPath, { recursive: true });
+//
+// const files: string[] = [];
+// const exports: Record = {};
+// for (const subPath of await fs.readdir(absPath, { recursive: true })) {
+// if (!subPath.match(/\.tsx?$/)) continue;
+// if (subPath.startsWith("dist")) continue;
+// files.push(subPath);
+// }
+// node.estimate = Object.keys(exports).length;
+// for (const subPath of files) {
+// using _ = node.start(subPath);
+// const targetSubPath = subPath.replace(/\.tsx?$/, ".js");
+// if (!subPath.match(/\.(test|sample)\.tsx?$/)) {
+// exports["./" + subPath] = "./" + targetSubPath;
+// }
+//
+// let code = transpileFile({
+// code: await fs.readFile(path.join(absPath, subPath), "utf-8"),
+// });
+// code = code.replace(
+// / from "lib\/([^"]+)"/g,
+// (_, src) => {
+// return ' from "./' + path.relative(
+// path.dirname(subPath),
+// src.replace(/\.tsx?$/, ".js"),
+// ) + '"';
+// },
+// );
+// if (packageJson.homepage) {
+// code =
+// "// This file is transpiled from TypeScript from paper clover's sitegen\n" +
+// "// " + packageJson.homepage + "/" + subPath + "\n" +
+// code;
+// }
+// const out = path.join(distPath, targetSubPath);
+// await fs.mkdir(path.dirname(out), { recursive: true });
+// await fs.writeFile(out, code);
+// node.value += 1;
+// }
+// await fs.cp(
+// path.join(absPath, "readme.npm.md"),
+// path.join(distPath, "readme.md"),
+// ).catch((e) => {
+// if (e.code !== "ENOENT") throw e;
+// });
+// await fs.cp(
+// path.join(absPath, "readme.changes.md"),
+// path.join(distPath, "readme.changes.md"),
+// ).catch((e) => {
+// if (e.code !== "ENOENT") throw e;
+// });
+// const { name, description, ...rest } = packageJson;
+// await fs.writeFile(
+// path.join(distPath, "package.json"),
+// JSON.stringify({
+// name,
+// description,
+// version: deno.version,
+// type: "module",
+// ...rest,
+// }),
+// );
+// }
+//
+export function main() {
+ const main = path.resolve("lib");
+ updateJsrPackageExportsToAll(main, progress)
+ .then(() =>
+ transpileForNpm(main, progress, {
+ name: "@paperclover/lib",
+ description: "high quality typescript libraries",
+ homepage:
+ "https://git.paperclover.net/clo/sitegen/src/branch/master/lib",
+ })
+ );
+}
+
+import * as progress from "lib/progress.ts";
+import * as path from "node:path";
+import * as fs from "node:fs/promises";
+import * as subprocess from "lib/subprocess.ts";
+import { UNWRAP } from "lib/assert.ts";
diff --git a/src/blog/blog.css b/src/blog/blog.css
new file mode 100644
index 0000000000000000000000000000000000000000..2c845a45d9283687548596773d6a411b5e699f9b
--- /dev/null
+++ b/src/blog/blog.css
@@ -0,0 +1,204 @@
+:root {
+ --secondary: #a291ff;
+}
+main {
+ font-weight: 350;
+ color: #e9eaff;
+}
+h1, .description {
+ color: var(--primary);
+}
+h1 {
+ margin-bottom: 0.5rem;
+}
+p {
+ line-height: 1.6;
+}
+.description {
+ margin-top: 0.5rem;
+ margin-bottom: 0.5rem;
+ font-style: italic;
+}
+.tag-list {
+ display: flex;
+ gap: 0.5rem;
+ font-size: 80%;
+}
+.tag {
+ background-color: #0005;
+ border-radius: 8px;
+ padding: 0.35rem;
+ color: #fffc;
+ &.date {
+ color: var(--secondary);
+ }
+}
+hr {
+ margin: 1rem 0;
+ border: 2px solid var(--primary);
+}
+img {
+ width: 100%;
+ border-radius: 8px;
+}
+
+#toc {
+ background-color: #0003;
+ border-radius: 8px;
+ padding: 1rem;
+
+ h2 {
+ text-decoration: none;
+ margin: 0;
+ text-transform: uppercase;
+ font-weight: bold;
+ letter-spacing: 1px;
+ font-size: 0.8rem;
+ color: #fff8;
+ }
+ ul {
+ margin: 0;
+ }
+ li {
+ list-style-type: square;
+ &::marker {
+ color: var(--primary);
+ }
+ li {
+ --primary: var(--secondary);
+ }
+ }
+}
+
+h3 {
+ --primary: var(--secondary);
+}
+h2, h3 {
+ color: var(--primary);
+ text-decoration: underline;
+ text-decoration-color: var(--primary);
+ text-decoration-thickness: 2px;
+ text-underline-offset: 2px;
+ a.return {
+ display: inline-block;
+ font-size: 1rem;
+ margin-right: 0.1rem;
+ transform: translateY(-4px);
+ }
+}
+
+b {
+ color: var(--secondary);
+ &.server {
+ color: #ff7770;
+ }
+ &.client {
+ color: #ffcd70;
+ }
+}
+
+blockquote {
+ & > :first-child {
+ margin-top: 0;
+ }
+ & > :last-child {
+ margin-bottom: 0;
+ }
+ figure.code {
+ border: none;
+ pre {
+ padding: 0;
+ }
+ }
+ background-color: #0008;
+ border-radius: 8px;
+ padding: 1rem;
+ border-left: 4px solid var(--secondary);
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+}
+
+code, kbd {
+ /* box-decoration-break: clone; */
+ border: 1px solid rgb(from var(--secondary) r g b / 0.8);
+ border-radius: 4px;
+ padding: 1px 5px;
+ background-color: #0008;
+}
+kbd {
+ /* box-decoration-break: clone; */
+ border-color: white;
+}
+a > code {
+ --secondary: var(--primary);
+}
+figure.code {
+ border: 4px solid var(--secondary);
+ background-color: lch(from var(--secondary) 4 2 h);
+
+ &:has(figcaption) {
+ border-top: none;
+ }
+
+ &.server {
+ --secondary: #ff7770;
+
+ .variable {
+ color: lch(from var(--secondary) 70 c calc(h + 50));
+ }
+ }
+ &.client {
+ --secondary: #ffcd70;
+
+ .variable {
+ color: lch(from var(--secondary) 70 c calc(h + 50));
+ }
+ }
+ figcaption {
+ padding: 0.5rem;
+ font-family: "rmo", monospace;
+ font-weight: bold;
+ color: black;
+ background-color: rgb(from var(--secondary) r g b / 100%);
+ }
+ pre {
+ padding: 0.5rem;
+ overflow-x: auto;
+ font-size: 95%;
+ }
+ pre > code {
+ border: unset;
+ border-radius: unset;
+ padding: unset;
+ background-color: unset;
+
+ color: lch(from var(--secondary) 90 10 h);
+
+ .keyword {
+ color: var(--secondary);
+ color: lch(from var(--secondary) l c h / 90%);
+ font-weight: bold;
+ }
+ .string {
+ color: lch(from var(--secondary) 90 90 calc(h + 20));
+ }
+ .constant {
+ color: lch(from var(--secondary) 90 90 calc(h - 10));
+ }
+ .method {
+ color: lch(from var(--secondary) 70 c calc(h + 20));
+ }
+ .builtin {
+ color: lch(from var(--secondary) 90 90 calc(h - 25));
+ }
+ .variable {
+ color: lch(from var(--secondary) 50 c calc(h + 50));
+ }
+ .comment {
+ color: lch(from var(--secondary) 90 40 h / 50%);
+ }
+ .property, .parameter {
+ color: lch(from var(--secondary) 90 calc(c - 20) h);
+ }
+ }
+}
diff --git a/src/blog/drafts/webdev/deranged-typescript.md b/src/blog/drafts/webdev/deranged-typescript.md
new file mode 100644
index 0000000000000000000000000000000000000000..a6f4a450915a4612b7c3cc7aabdfdef0cd034061
--- /dev/null
+++ b/src/blog/drafts/webdev/deranged-typescript.md
@@ -0,0 +1,87 @@
+- imports at the bottom
+ - order your file by importance.
+ - 'G' to jump to imports, etc
+ - prefer namespace imports
+ - easier to type and refactor. easier to read.
+- large files are okay
+ - all files are their own library
+ - split files up by making components modular, not by "oh it's too big"
+ - engine/render.ts is a standalone library, in order to split JSX, Suspense,
+ and Marko out, the main file was made modular.
+- lowercase
+- name objects ultra-concisely
+ - filenames are often one word describing what they contain
+ - avoid useless descriptors like "utils", "helpers", and "data"
+ - examples
+ - async.ts contains all the async library functions.
+ - watch.ts contains the file watcher and watch-reload mode.
+ - render.*, Io
+- be ultra-concise in comments
+- no "discarded" variables, embrace `void x`
+ - makes code more readable
+ - note how i want to write a lint for this
+ - note the one proposal i want about void
+- push the ts inference engine (as const, ReturnType, etc)
+ - reduces how much you repeat yourself making it easier to refactor things
+ - use the code as the source of truth
+- push the ts inference engine (generics)
+ - do not implement crazy things with the TS engine, instead use generic input
+ types, and then use regular control to narrow and transform the return type.
+ source of truth is your code.
+- UNWRAP, ASSERT utility globals are amazing
+ - ban postfix '!'
+ - stripped for production frontend builds
+- destructure often
+ - use the one example from work lol
+- package.json "imports" are amazing
+ - remapping
+ - implementation switching
+ - testing
+- embrace the web and node.js APIs
+ - sitegen relies on so many node features that bun and deno fail to run it.
+ - overlay modules are great
+- avoid dependencies
+ - once you build your own mini standard library you win
+ - talk about regrets with mdx
+
+## imports at the bottom
+
+Here is an abridged version of my website's `backend.ts`. When reading it from
+top to bottom it is immediately obvious that it is a Hono web server.
+
+```ts
+// This is the main file for paperclover.net's server.
+const app = new Hono();
+const logHttp = console.scoped("http", { color: "magenta" });
+
+// Middleware
+app.use(...);
+...
+
+// Backends
+app.route("", require("./q+a/backend.ts").app);
+...
+
+export default app;
+
+...
+
+import { type Context, Hono, type Next } from "#hono";
+import { logger } from "hono/logger";
+import { trimTrailingSlash } from "hono/trailing-slash";
+import * as assets from "#sitegen/assets";
+import * as admin from "./admin.ts";
+import * as console from "@paperclover/console";
+```
+
+Since `import`/`export` statements are hoisted like `var` and `function`, the
+position of these statements within the file does not matter. The imported
+modules have to be loaded first before this file can start. With this, I've
+found it nicer to sort the file by _importance_ rather than by arbitrary rules
+dictated by how C-style `#include`s worked.
+
+Start with a documentation comment, then the most important
+functions/variables/types, sort the file by importance. Imports are not really
+important since you very quickly get to know where common namespaces come from.
+And since they're at the bottom, you can just press `G` in Vim or `CMD+Down` on
+the Mac to scroll to the end of the file.
diff --git a/src/blog/drafts/webdev/marko-intro.markodown b/src/blog/drafts/webdev/marko-intro.markodown
new file mode 100644
index 0000000000000000000000000000000000000000..8a7df80aeb80d2c561975c3a6ba5ed5c42f22672
--- /dev/null
+++ b/src/blog/drafts/webdev/marko-intro.markodown
@@ -0,0 +1,339 @@
+export const blog: BlogMeta = {
+ title: "Marko is the coziest HTML templating language",
+ desc: "...todo...",
+ created: "2025-06-13",
+ draft: true,
+};
+export const meta = formatBlogMeta(blob);
+export * as layout from "@/blog/layout.tsx";
+
+I've been recently playing around [Marko], and after adding limited support
+for it in my website generator, [sitegen], I instantly fell in love with how
+minimalistic it is in comparison to JSX, Astro components, and Svelte.
+
+[Marko]: https://next.markojs.com
+[sitegen]: https://paperclover.dev/clo/sitegen
+
+## Introduction to Marko
+
+If JSX was taking HTML and shoving its syntax into JavaScript, Marko is shoving
+JavaScript into HTML. Attributes are JavaScript expressions.
+
+```marko
+
+ // `input` is like props, but given in the top-level scope
+
+ // Interpolation with JS template string syntax
+ ${formatTimeNicely(input.date)}
+
+
+
+ // Capital letter variables for imported components
+
+
+ // Components also can be auto-imported by lowercase.
+ // This will look upwards for a `tags/` folder containing
+ // "custom-footer.marko", similar to how Node.js finds
+ // package names in all upwards `node_modules` folders.
+
+
+
+// ESM `import` / `export` just work as expected.
+// I prefer my imports at the end, to highlight the markup.
+import MarkdownContent from "./MarkdownContent.marko";
+import { formatTimeNicely } from "../date-helpers.ts";
+```
+
+Tags with the `value` attribute have a shorthand, which is used by the built-in
+`` for conditional rendering.
+
+```marko
+// Sugar for
+
+
+// and it composes amazingly to the 'if' built-in
+
+
+
+```
+
+Tags can also return values into the scope for use in the template using `/`, such as `` for unique ID generation. This is available to components that ` `.
+
+```
+
+
+
+click me!>
+// ^ oh, you can also omit the
+// closing tag name if you want.
+```
+
+It's important that I started with the two forms of "Tag I/O": `=` for input
+and `/` for output. With those building blocks, we introduce local variables
+with `const`
+
+```
+
+
+// This is how you insert raw HTML to the document
+
+
+// It supports all of the cozy destructuring syntax JS has
+
+```
+
+Unlike JSX, when you pass content within a tag (`input.content` instead of
+JSX's `children`), instead of it being a JSX element, it is actually a
+function. This means that the `for` tag can render the content multiple times.
+
+```
+
+
+ // Renders a new random number for each iteration.
+ ${Math.random()}
+ >
+
+```
+
+Since `content` is a function, it can take arguments. This is done with `|`
+
+```
+my friends
+
+ // I tend to omit the closing tag names for the built-in control
+ // flow tags, but I keep them for HTML tags. It's kinda like how
+ // in JavaScript you just write `}` to close your `if`s and loops.
+ //
+ // Anyways also has 'of'
+
+ ${item.name}
+ >
+
+ // They support the same syntax JavaScript function params allows,
+ // so you can have destructuring here too, and multiple params.
+
+ // By the way you can also use emmet-style class and ID shorthands.
+ My #${index + 1} friend is ${name}
+ >
+
+```
+
+Instead of named slots, Marko has attribute tags. These are more powerful than
+slots since they are functions, and can also act as sugar for more complicated
+attributes.
+
+```
+
+ <@header variant="big">
+ the next big thing
+ @header>
+
+ body text...
+
+
+// The `input` variable inside of is:
+//
+// {
+// title: "Welcome",
+// header: {
+// content: /* function rendering "the next big thing " */,
+// variant: "big",
+// },
+// content: /* function rendering "body text
" */
+// }
+```
+
+This layout could be implemented as such:
+
+```marko
+
+
+
+
+ // Instead of assigning to a variable with a capital letter,
+ // template interpolation works on tag names. This can also
+ // be a string to render the native HTML tag of that kind.
+ <${content} />
+
+
+ >
+
+ <${input.content} />
+
+```
+
+The last syntax feature missing is calling a tag with parameters. That is done
+just like a regular function call, with '('.
+
+```
+
+```
+
+In fact, attributes can just be sugar over this syntax. (this technically isn't
+true but it's close enough for the example)
+
+```
+
+
+// is equal to
+
+
+```
+
+All of the above is about how Marko's syntax works, and how it performs HTML
+generation with components. Marko also allows interactive components, but an
+explaination of that is beyond the scope of this page, mostly since I have not
+used it. A brief example of it, modified from their documentation.
+
+```marko
+// Reactive variables with just work...
+
+${basicCounter}
+// ...but a counter is boring.
+
+
+
+// 'by' is like React JSX's "key" property, but it's optional.
+
+
+// Form example
+
+
+```
+
+Usage on `paperclover.net`
+
+Using Marko for HTML generation is quite easy. `.marko` files can be compiled
+into `.js` using the `@marko/compiler` library.
+
+```ts
+const src = fs.readFileSync("page.marko", "utf8");
+const compile = marko.compileSync(src, filepath);
+fs.writeFileSync("page.js", compile.code);
+
+const page = require("./page.js");
+console.info(page);
+
+import * as fs from "node:fs";
+import * as marko from "@marko/compiler";
+```
+
+To get client side JavaScript, an option can be passed to the Marko compiler to
+generate the client side code. While it is a big selling point of Marko, I do
+not use any of their client side features, instead deferring to manually-written
+frontend scripts. This is because that is how my website has been for years,
+statically generated. And for websites like mine that are content focused, this
+is the correct way to do things.
+
+Since I have a custom HTML generation library (built on JSX and some React-like
+patterns), I have written a simple integration for it to utilize Marko
+components, which is loaded by replacing the generated import to `marko/html`,
+which lets me overwrite functions like `createTemplate` (to change the signature
+of a component), `dynamicTag` (to allow Marko to render non-Marko components),
+and `fork` (to enable async integration with the rendering framework). An
+additional feature of this is I have a Node.js loader hook to allow importing
+these files directly.
+
+```tsx
+function Page() {
+ const q = Question.getByDate(new Date("2025-06-07 12:12 EST"));
+ return
+
example question
+
+ ;
+}
+
+// The synchronous render can be used because `Page` and `question.marko`
+// do not await any promises (SQLite runs synchronously)
+console.info(render.sync( ).text);
+
+import * as render from "#engine/render";
+import QuestionRender from "@/q+a/tags/question.marko";
+import { Question } from "@/q+a/models/Question.ts";
+```
+
+Here is the `question.marko` tag used to render [questions on the clover q+a](/q+a).
+
+```marko
+// Renders a `Question` entry including its markdown body.
+export interface Input {
+ question: Question;
+ admin?: boolean;
+}
+
+// 2024-12-31 05:00:00 EST
+export const transitionDate = 1735639200000;
+
+
+
+
+<${"e-"}
+ f=(date > transitionDate ? true : undefined)
+ id=admin ? `q${id}` : undefined
+>
+
+ [EDIT]
+ >
+
+ ${formatQuestionTimestamp(date)}
+
+
+
+>
+
+// this singleton script will make all the '' tags clickable.
+client import "./clickable-links.client.ts";
+
+import type { Question } from "@/q+a/models/Question.ts";
+import { formatQuestionTimestamp, formatQuestionISOTimestamp } from "@/q+a/format.ts";
+import { CloverMarkdown } from "@/q+a/clover-markdown.tsx";
+```
+
+The integration is great, `client import` is quite a magical concept, and I've
+tuned it to do the expected thing in my framework.
+
+import { type BlogMeta, formatBlogMeta } from '@/blog/helpers.ts';
diff --git a/src/blog/helpers.ts b/src/blog/helpers.ts
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/src/blog/layout.tsx b/src/blog/layout.tsx
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..7ad9cb7d6c81d5eb2c90ef59da8acff4d0fd2684 100644
--- a/src/blog/layout.tsx
+++ b/src/blog/layout.tsx
@@ -0,0 +1,31 @@
+import "./blog.css";
+
+export const theme = {
+ bg: "#271a30",
+ fg: "#ffffff",
+ primary: "#91ffc6",
+};
+
+export function Layout({ meta: { title, description }, date, tags, children }) {
+ return (
+ <>
+
+
+ {children}
+
+ >
+ );
+}
diff --git a/src/blog/pages/webdev/deranged-typescript.md b/src/blog/pages/webdev/deranged-typescript.md
deleted file mode 100644
index a6f4a450915a4612b7c3cc7aabdfdef0cd034061..0000000000000000000000000000000000000000
--- a/src/blog/pages/webdev/deranged-typescript.md
+++ /dev/null
@@ -1,87 +0,0 @@
-- imports at the bottom
- - order your file by importance.
- - 'G' to jump to imports, etc
- - prefer namespace imports
- - easier to type and refactor. easier to read.
-- large files are okay
- - all files are their own library
- - split files up by making components modular, not by "oh it's too big"
- - engine/render.ts is a standalone library, in order to split JSX, Suspense,
- and Marko out, the main file was made modular.
-- lowercase
-- name objects ultra-concisely
- - filenames are often one word describing what they contain
- - avoid useless descriptors like "utils", "helpers", and "data"
- - examples
- - async.ts contains all the async library functions.
- - watch.ts contains the file watcher and watch-reload mode.
- - render.*, Io
-- be ultra-concise in comments
-- no "discarded" variables, embrace `void x`
- - makes code more readable
- - note how i want to write a lint for this
- - note the one proposal i want about void
-- push the ts inference engine (as const, ReturnType, etc)
- - reduces how much you repeat yourself making it easier to refactor things
- - use the code as the source of truth
-- push the ts inference engine (generics)
- - do not implement crazy things with the TS engine, instead use generic input
- types, and then use regular control to narrow and transform the return type.
- source of truth is your code.
-- UNWRAP, ASSERT utility globals are amazing
- - ban postfix '!'
- - stripped for production frontend builds
-- destructure often
- - use the one example from work lol
-- package.json "imports" are amazing
- - remapping
- - implementation switching
- - testing
-- embrace the web and node.js APIs
- - sitegen relies on so many node features that bun and deno fail to run it.
- - overlay modules are great
-- avoid dependencies
- - once you build your own mini standard library you win
- - talk about regrets with mdx
-
-## imports at the bottom
-
-Here is an abridged version of my website's `backend.ts`. When reading it from
-top to bottom it is immediately obvious that it is a Hono web server.
-
-```ts
-// This is the main file for paperclover.net's server.
-const app = new Hono();
-const logHttp = console.scoped("http", { color: "magenta" });
-
-// Middleware
-app.use(...);
-...
-
-// Backends
-app.route("", require("./q+a/backend.ts").app);
-...
-
-export default app;
-
-...
-
-import { type Context, Hono, type Next } from "#hono";
-import { logger } from "hono/logger";
-import { trimTrailingSlash } from "hono/trailing-slash";
-import * as assets from "#sitegen/assets";
-import * as admin from "./admin.ts";
-import * as console from "@paperclover/console";
-```
-
-Since `import`/`export` statements are hoisted like `var` and `function`, the
-position of these statements within the file does not matter. The imported
-modules have to be loaded first before this file can start. With this, I've
-found it nicer to sort the file by _importance_ rather than by arbitrary rules
-dictated by how C-style `#include`s worked.
-
-Start with a documentation comment, then the most important
-functions/variables/types, sort the file by importance. Imports are not really
-important since you very quickly get to know where common namespaces come from.
-And since they're at the bottom, you can just press `G` in Vim or `CMD+Down` on
-the Mac to scroll to the end of the file.
diff --git a/src/blog/pages/webdev/everyone-hates-nextjs.mdx b/src/blog/pages/webdev/everyone-hates-nextjs.mdx
new file mode 100644
index 0000000000000000000000000000000000000000..9899ee83251418b33d174b56a216c46b6d638230
--- /dev/null
+++ b/src/blog/pages/webdev/everyone-hates-nextjs.mdx
@@ -0,0 +1,831 @@
+import TableOfContents from "../../tags/table-of-contents.tsx";
+import Heading from "../../tags/heading.tsx";
+import { Layout } from "../../layout.tsx";
+export { theme } from "../../layout.tsx";
+
+export const meta = {
+ title: "Everyone Hates Next.js",
+ description: "A critique of React Server Components in Next.js 15,"
+ + " and how my company escaped it.",
+ keywords: ["webdev", "technical analysis", "opinion"],
+ authors: ["clover caruso"],
+ embed: {
+ thumbnail: "/open-graph/everyone-hates-nextjs.png"
+ },
+ canonical: "/blog/webdev/everyone-hates-nextjs"
+};
+
+
+
+As I've been using [Next.js] professionally on my employer's web app, I find the
+core design of their App Router and [React Server Components] (RSC) to be
+extremely frustrating. And it's not small bugs or that the API is confusing,
+but large disagreements about the fundamental design decisions that Vercel and
+the React team made when building it.
+
+The more webdev events I go to, the more I see people who dislike Next.js, but
+still get stuck using it. By the end of this article, I will share how me and
+my colleagues escaped this hell, seamlessly migrating our entire frontend to
+[TanStack Start].
+
+[Next.js]: https://nextjs.org
+[React Server Components]: https://react.dev/reference/rsc/server-components
+
+
+
+- [A Technical Review, What are Server Components?][§1]
+- [Real-world Pitfalls of the App Router][§2]
+ - [Optimistic Updates are Impossible][§2.1]
+ - [Every Navigation is Another Fetch][§2.2]
+ - [Layouts are Artificially Restricted][§2.3]
+ - [You Still Download All the Content Twice][§2.4]
+ - [Turbopack Sucks][§2.5]
+- [Seamlessly Ditching Next.js and Vercel at Work][§3]
+ - [`next/metadata` is Great][§3.1]
+ - [`next/og` is Good Too][§3.2]
+- [My Experience Feels Like the Usual][§4]
+- [Prefer Tools that Respect You][§5]
+
+
+
+[§1]: #technical-review
+
+A Technical Review, What are Server Components?
+
+The pitch of RSC is that components are put into two categories,
+"server" components and "client"
+components. Server components don't have `useState`, `useEffect`, but can be
+`async function`s and refer to backend tools like directly calling into a
+database. Client components are the existing
+model, where there is code on the backend to generate HTML text and frontend
+code to manage the DOM using `window.document.*`.
+
+> The first disaster: naming!! React is now using the words
+> "server" and "client" to refer to
+> a very specific things, ignoring their existing definitions. This would be
+> fine, except Client components can run on the backend
+> too! In this article, I'll be using the terms "backend" and
+> "frontend" to describe the two execution environments that web apps
+> exist in: a Node.js process and a Web browser, respectively.
+
+This Server /Client component model
+is interesting. Since built-ins like ` ` get serialized across the
+network, data fetching can be very trivially modeled with async server components , and the fallback UI works as if it were
+client-side.
+
+```tsx filename="src/app/[username]/page.tsx" tint="server"
+// For this article, server components will be highlighted in red
+export default async function Page({ params }) {
+ // Page params are given as a resolved promise
+ const { username } = await params;
+
+ // The components `UserInfo` and `UserPostList` will be run at the same
+ // time. Once `UserInfo` is ready, the visitor will see the page with a
+ // `PostListSkeleton` if the post list is not yet ready.
+ return
+
+
+ }>
+
+
+
+}
+
+// Waterfalls are avoided by having multiple components, which
+// are all evaluated at the same time.
+
+async function UserInfo({ username }) {
+ const user = await fetchUserInfo(username);
+ return <>
+ {user.displayName}
+ {user.bio ? : ""}
+ >
+}
+
+async function UserPostList({ username }) {
+ const posts = await fetchUserPostList(username);
+ return /* post list ui omitted for brevity */;
+}
+```
+
+If we ignore the 40kB gzipped bundle size of React itself, the above example
+has zero JavaScript for the UI and data fetching — it just streams the
+markup! For example, the imagined markdown parser within the ` `
+component stays on the backend. When an interactive frontend is needed, Client
+components can be created by putting them in a file starting with `"use
+client"`.
+
+```tsx filename="src/components/CopyButton.tsx" tint="client"
+"use client"; // This comment marks the file for client-side bundling.
+
+export function CopyButton({ url }) {
+ return <>
+ {url}
+ {
+ const full = new URL(url, location.href);
+ navigator.clipboard.writeText(full.href);
+ // omitting error handling, success ui, styles
+ }}>copy
+ >
+}
+```
+```tsx filename="src/app/q+a/Card.tsx" tint="server"
+export function Card() {
+ return
+
+ {/* Make the browser import the copy button */}
+
+
+
+ {/* Process markdown on the backend */}
+
+
+
+}
+```
+
+[§2]: #real-world-pitfalls
+
+Real-world Pitfalls of the App Router
+
+After quitting [Bun] as a runtime engineer (I implemented [Server Components
+bundling] and [a RSC template][bun-rsc] there), I joined a small company working on the
+front lines: a Next.js app with a Hono backend. The following notes are
+simplifications from the real world problems I've encountered when trying to
+maintain and develop new features. As a result of all of these, everyone's time
+is wasted either working around design flaws, or explaining to each other why
+what should be a non-issue is an immovable object.
+
+[Bun]: https://bun.com
+[Server Components bundling]: https://github.com/oven-sh/bun/blob/67f0c3e016aa479738469adac2b79a1862b88122/src/bake/bake.d.ts
+[bun-rsc]: https://github.com/oven-sh/bun/tree/e7790894d92b730758ecadf971cb935063508dfb/src/bake/bun-framework-react
+
+[§2.1]: #optimistic-updates
+
+Optimistic Updates are Impossible
+
+The Next.js documentation for performing mutations [does not mention optimistic
+updates][nextjs-updating-data]; it appears this case was not thought about.
+Components rendered by the React Server , by design, can
+not be modified after mounting. Elements that could change need to be inside a
+client component, but data fetching cannot happen on the client components,
+even during SSR on the backend. This results in awkwardly small server
+components that only do data fetching and then have a client component that
+contains a mostly-static version of the page.
+
+```tsx filename="src/app/user/[username]/page.tsx" tint="server"
+
+export default async function Page() {
+ const user = await fetchUserInfo(username);
+ return
+
+ ;
+}
+```
+```tsx filename="src/app/user/[username]/UserProfile.tsx" tint="client"
+
+"use client"; // Must separate the client code into a second file!
+
+export function UserProfile({ user: initialUser }) {
+ // There are many great state management libraries out there;
+ // for simplicity, this example will use one state cell.
+ const [user, optimisticUpdateUser] = useState(initialUser);
+
+ async function onEdit(newUser) {
+ optimisticUpdateUser(newUser);
+ const resp = await fetch("...", {
+ method: 'POST',
+ body: JSON.stringify(newUser),
+ ... // (headers, credentials, tracing, and more)
+ })
+ if (!resp.ok) /* always remember to test for errors! */
+ }
+
+ return {/* user interface with editable fields... */} :
+}
+```
+
+As more of the page needs interactivity, it gets messier trying to keep the
+static parts truly server-side. On the work app, nearly every piece of UI
+displays some dynamic data. A [`WebSocket`][ws] synchronizes data live as it
+updates (for example, a user card's online state along with their basic
+profile). Since these component setups are harder to understand and maintain
+for engineers, almost all of our pages are entirely `"use client"` with a
+`page.tsx` that defines the data fetching.
+
+A more concrete example of what this looks like in practice with the
+data-fetching library we use at work, [TanStack Query].
+
+[TanStack Query]: https://github.com/tanstack/query#readme
+
+```ts filename="src/queries/users.ts"
+// At work, there is a helper function `defineQuery` for type safety.
+// Fetchers are trivial and can run on the backend or the frontend.
+export const queryUserInfo = (username) => ({
+ queryKey: ['user', username],
+ queryFn: async ({ ... }) => /* fetch data */
+});
+```
+```tsx filename="src/app/user/[username]/page.tsx" tint="server"
+export default async function Page({ params }) {
+ const { username } = await params;
+
+ // There's no global state in the React Server. Since layouts
+ // are executed in parallel, the TanStack `QueryClient` has to
+ // be reconstructed multiple times per route.
+ const queryClient = new QueryClient();
+ await queryClient.ensureQueryData(queryUserInfo(username));
+
+ // HydrationBoundary is a client component that passes JSON
+ // data from the React server to the client component.
+ return
+
+ ;
+}
+```
+```tsx filename="src/app/user/[username]/ClientPage.tsx" tint="client"
+"use client";
+export function ClientPage() {
+ const { username } = useParams();
+ const { data: user } = useSuspenseQuery(queryUserInfo(username));
+
+ // ... some hooks
+
+ return
+ {/* ... an interactive web page */}
+ ;
+}
+```
+
+This example has to be three separate files because of the rules of server
+component bundling. (The client component needs `"use client"`, and server
+component files often can't be imported on the client due to server-only
+imports.). In the Pages router, this could've been a single file because of the
+tree-shaking that `getStaticProps` and `getServerSideProps` has.
+
+[ws]: https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API
+[nextjs-updating-data]: https://nextjs.org/docs/app/getting-started/updating-data
+
+
+[§2.2]: #redundant-fetches
+
+Every Navigation is Another Fetch
+
+Since the App Router starts every page as a server component, with (ideally)
+small areas of interactivity, a navigation to a new page *has* to fetch the
+Next.js server, regardless of what data the client already has available! Even
+with a a `loading.tsx` file, opening `/`, navigating to `/other`, and then
+going back to `/` will show the loading state while it re-fetches the homepage.
+
+The only case this works is for **perfectly static content**, where instant
+navigations and prefetching work great. But **web apps are not static**, they
+have lots of dynamic content. Being logged in affects the homepage, which is
+infuriating because the client literally has everything needed to display the
+page instantly. It's not like the cookies changed.
+
+> **aside**: In further testing on a blank project, I observe cases where the
+> Next frontend code would pre-fetch routes, but **without any real contents**.
+> On the hello world example, this was a 1.8kB RSC payload that pointed to 2
+> different JS chunks 4 separate times. This is just pure waste of our
+> bandwidth and egress, especially considering all of this information is
+> re-fetched when I actually click the link.
+>
+> ```json whitespace="pre-wrap"
+> 1:"$Sreact.fragment"
+> 2:I[39756,["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/7dd66bdf8a7e5707.js"],"default"]
+> 3:I[37457,["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/7dd66bdf8a7e5707.js"],"default"]
+> 4:I[97367,["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/7dd66bdf8a7e5707.js"],"ViewportBoundary"]
+> 6:I[97367,["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/7dd66bdf8a7e5707.js"],"MetadataBoundary"]
+> 7:"$Sreact.suspense"
+> 0:{"b":"TdwnOXsfOJapNex_HjHGt","f":[["children","other",["other",{"children":["__PAGE__",{}]}],["other",["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":null},[["$","div","l",{"children":"loading..."}],[],[]],false],["$","$1","h",{"children":[null,["$","$1","KCFxAJdIDH3BlYXAHsbcVv",{"children":[["$","$L4",null,{"children":"$L5"}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],["$","$L6","KCFxAJdIDH3BlYXAHsbcVm",{"children":["$","div",null,{"hidden":true,"children":["$","$7",null,{"fallback":null,"children":"$L8"}]}]}]]}],false]],"S":false}
+> 5:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
+> 9:I[27201,["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/7dd66bdf8a7e5707.js"],"IconMark"]
+> 8:[["$","title","0",{"children":"Create Next App"}],["$","meta","1",{"name":"description","content":"Generated by create next app"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.0b3bf435.ico","sizes":"256x256","type":"image/x-icon"}],["$","$L9","3",{}]]
+> ```
+>
+> In review, I found there is actually some content in here: the loading state.
+> Do you see it?
+>
+> ```json
+> ["$","div","l",{"children":"loading..."}]
+> ```
+>
+> It's still a lot of waste, since all of this data gets re-emitted in the
+> actual page RSC.
+
+The solution to this appears to be [`staleTime`][nextjs-stale], but it's marked
+experimental and "not recommended for production". The fact this is a
+non-default afterthought configuration option is embarassing. Even it we used
+it, you cannot make multiple pages that refer to the same underlying data share
+any of it.
+
+One form of loading state that cannot be represented with the App Router is
+having a page such as a page like a git project's issue page, and clicking on a
+user name to navigate to their profile page. With `loading.tsx`, the entire
+page is a skeleton, but when modeling these queries with TanStack Query it is
+possible to show the username and avatar instantly while the user's bio and
+repositories are fetched in. Server components don't support this form of
+navigation because the data is only available in rendered components, so it
+must be re-fetched.
+
+[nextjs-stale]: https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes
+[nextjs-stale-bug]: https://github.com/vercel/next.js/issues/70661
+
+In our Next.js site, we have this line of code on our server component data
+fetchers to make soft navigations faster by skipping the data fetch phase all
+together.
+
+```tsx filename="src/util/tanstack-query-helpers.server.ts" tint="server"
+export function serverSidePrefetchQueries(queries) {
+ if ((await headers()).get("next-url")) {
+ // This is a soft-navigation. SKIP the prefetching to make it faster.
+ // The client might already have this data, and if not, they have the
+ // loading state. Ideally, this server request wouldn't exist -- The
+ // client side has nearly ALL the code since the app is written mostly
+ // as client components. Kind of a design flaw of the App router TBH.
+ return;
+ }
+ // ... data prefetching-logic ...
+}
+```
+
+In addition to this, `loading.tsx` should contain the `useQuery` calls so that
+while the network request for the empty RSC happens, the data is being fetched
+if it actually is needed. In fact, the `loading.tsx` state can just be the
+actual client component, and you'll see the client page.
+
+```tsx filename="src/app/user/[username]/loading.tsx" tint="client"
+"use client";
+export default function PageLoadingSkeleton() {
+ return ;
+}
+```
+
+> At work, we just make our `loading.tsx` files contain the `useQuery`
+> calls and show a skeleton. This is because when Next.js loads the actual Server
+> Component, no matter what, the entire page re-mounts. No VDOM diffing here,
+> meaning all hooks (`useState`) will reset slightly after the request
+> completes. I tried to reproduce a simple case where I was *begging* Next.js to
+> just *update the existing DOM* and preserve state, but it just doesn't.
+> Thankfully, the time the blank RSC call takes is short enough.
+
+[§2.3]: #layout-restrictions
+
+Layouts are Artificially Restricted
+
+Layouts can perform data fetching, but they can't observe or alter the request
+in any way. This is done so that Next.js can fetch and cache layouts whenever they
+wants. In every other framework, layouts are just regular components that have
+no feature difference compared to page components.
+
+Fetching layouts in isolation is a cute idea, but it ends up being silly
+because it also means that any data fetching has to be re-done per layout. You
+can't share a `QueryClient`; instead, you must rely on their [monkey-patched
+`fetch`][nextjs-fetch] to cache the same `GET` request like they promise.
+
+When a coworker asks me about why Next.js rejects some code, I've given up on
+explaining the technical intricacies and just say *"It's a Next.js Skill Issue,
+I'm going to blow it up soon don't worry."* These rules are too hard for normal
+developers to understand.
+
+[nextjs-fetch]: https://nextjs.org/docs/app/api-reference/functions/fetch
+
+[§2.4]: #rsc-payload
+
+You Still Download All the Content Twice
+
+Unlike the ["Islands Architecture"][islands], Server Components still have to
+be hydrated on the frontend to support `Suspense` and preserving client
+component state. When doing soft navigations, the "RSC Payload" (which is not
+HTML at all) is retrieved by `fetch`. On a fresh reload, HTML is needed for the
+[first paint], but the information about Client components and `Suspense` is
+not contained within that HTML. React's solution is to **send a second copy of
+the entire page's markup**. An example of what a Next.js production server
+would send in a dynamic page render would be something like this:
+
+[first paint]: https://web.dev/articles/fcp
+
+```html filename="GET /user/clover"
+
+
+
+ {link and meta tags}
+
+
+ {server side render}
+
+
+
+
+
+ {server side render of a Suspense boundary}
+
+
+
+
+
+
+```
+
+This solution **doubles the size of the initial HTML payload**. Except it's
+worse, because the RSC payload includes JSON quoted in JS string literals, which
+format is much less efficient than HTML. While it seems to compress fine
+with brotli and render fast in the browser, this is wasteful. With the
+hydration pattern, at least the data locally could be re-used for interactivity
+and other pages.
+
+Even on pages that have little to no interactivity, you pay the cost. To use
+the Next.js documentation as an example, loading [its
+homepage](https://nextjs.org/docs) loads an page that is around 750kB (250kB of
+HTML and the 500kB of script tags), and content is in there twice.
+
+You can verify that by pressing Cmd + Opt + u
+on Mac or Ctrl + u on other platforms. And then
+Cmd / Ctrl + f to locate any string of the
+blog, such as "building full-stack web applications". It's there twice. And
+**there is no way around this**, since it's a fundamental piece of React Server
+Components.
+
+This RSC format certainly has more waste. But I really don't feel like digging into
+why the string `/_next/static/chunks/6192a3719cda7dcc.js` appears 27 separate
+times. What the hell, guys? Is your bandwidth free???
+
+[islands]: https://www.patterns.dev/vanilla/islands-architecture/
+
+[§2.5]: #turbopack
+
+Turbopack Sucks
+
+This section is not constructive.
+
+- Turbopack isn't fast
+- Turbopack emits code that is hard to debug in a debugger (in development mode)
+- Turbopack throws bad error messages in many cases
+
+I wouldn't have given this point a section in the blog normally, but I want to
+point out three actual examples directly from the project.
+
+The first is a place where during some refactoring to satisfy the Server/Client
+component models, I accidentally made a Client component `async`. This one was
+quite anoying because it didn't say at all where the issue was, but only
+contained the server stack trace.
+
+
+
+Another case of a terrible error message:
+
+
+
+> After fixing the underlying issue in this second error (which I cannot recall),
+> the Dev server hung and had to be restarted to recover.
+
+The final one is the dozen times I place a debugger breakpoint and the
+variable name `hello` gets turned into
+`__TURBOPACK__imported__module__$5b$project$5d2f$client$2f$src$2f$utils$2f$filename$2e$ts__$5b$app$2d$client$5d$__$28$ecmascript$29$__["hello"]`
+and other bullshit.
+
+Okay. This all sucks. What can we do?
+
+[§3]: #ditching-nextjs
+
+Seamlessly Ditching Next.js and Vercel at Work
+
+There are two types of web projects:
+
+- A web site with mostly static content.
+- A web app with majorly dynamic and interactive components.
+
+And Next.js is the wrong tool for both of these jobs. If you're in the first
+category with a static web site, go for [Astro] or [Fresh]. For everyone who
+needs the full power of React, this section is about how I replaced the vendor
+locked Next with [TanStack Start], incrementally and seamlessly.
+
+[Astro]: https://astro.build/
+[Fresh]: https://fresh.deno.dev/
+[TanStack Start]: https://tanstack.com/start/latest
+
+It started with this Vite config.
+
+```ts filename="vite.config.ts"
+const config = defineConfig(({ mode }) => {
+ const env = loadEnv(mode, process.cwd(), "NEXT_PUBLIC_");
+ return {
+ // Use the Next.js default port 3000
+ server: { port: 3000 },
+ // Use the Next.js default env prefix "NEXT_PUBLIC_"
+ define: Object.fromEntries(Object.entries(env).map(
+ ([k, v]) => [`process.env.${k}`, JSON.stringify(v)])),
+ plugins: [
+ viteTsConfigPaths({ projects: ["./tsconfig.json"] }),
+ tailwindcss(),
+ // For ease of understanding from coworkers, I started porting
+ // the routes in `src/tanstack-routes`. When the migration was
+ // done, it would go back to the default `src/routes`.
+ tanstackStart({
+ router: { routesDirectory: "src/tanstack-routes" },
+ }),
+ viteReact(),
+ ],
+ resolve: {
+ // The key to the incremental migration: redirect `next` elsewhere
+ alias: { next: path.resolve("./src/tanstack-next/") },
+ conditions: ["tanstack"],
+ extensions: [
+ // Allow a file named like `utils/session.tanstack.ts` to
+ // override `utils/session.ts` when imported.
+ ".tanstack.tsx", ".tanstack.ts",
+ // Default import extensions
+ ".mjs", ".js", ".mts", ".ts",
+ ".jsx", ".tsx", ".json",
+ ],
+ },
+ };
+});
+```
+
+Then, I looked for every usage of a Next.js API, and either removed it or made
+a stub for TanStack. For example, `src/tanstack-next/link.tsx` implements
+`next/link`:
+
+```tsx filename="src/tanstack-next/link.tsx"
+import { Link } from "@tanstack/react-router";
+import type { LinkProps } from "next/link";
+
+export default function LinkAdapter({ href, ...rest }: LinkProps) {
+ return ;
+}
+```
+
+> Some of these stubs can be extremely simple. Starting out, my implementation
+> of `useRouter` was just `return {}`, but later I had to add a couple methods
+> to the object. The code here doesn't have to be clean, because it is
+> temporary.
+
+Now, the new site can import nearly every client component by either stubbing
+out the Next.js APIs it needs, or by using the `.tanstack.ts` extension to
+re-implement logic on a file-by-file basis. And shortly after, I got the site's
+homepage to work in TanStack Start, and we merged the branch.
+
+
+
+> This first PR only supported one of our pages, and was able to do it in a
+> thousand lines of added code, and 40 lines deleted. I had previous patches to
+> remove the few uses of `next/image` and `next/font`.
+
+What was left was porting every other route over. The one thing we lose in
+migrating from Next.js to any other framework is the ability to `await`
+data-fetching functions in the UI. In practice, moving every route into a
+`loader` function made it much more clear what happened when a page was SSR'd.
+For pages that had multiple fetches, these could be combined into a single,
+special API call that would return all of the relevant data for that page.
+
+To re-iterate in bold font: The
+migration path from Server Components is to just simplify your code — RSC
+inherently drives you down a chaotic road of things you do not need .
+Nearly every complex part of our site got easier to understand for all
+engineers. The exception to this was having everyone get used to the new file
+system routing conventions. With enough examples, we all got the hang of it.
+
+With the incremental migration in place, new code did not break the existing
+deployment. TanStack slowly took over the codebase, and we eventually deleted
+all of the Next.js stubs and gained all of the beautiful [type-safety features]
+that the TanStack Router provides. At the end, the site performed faster from
+every angle: Development Mode, Production page load times, Soft navigations,
+and at a lower price than our Next depoyment with Vercel.
+
+[type-safety features]: https://tanstack.com/router/v1/docs/framework/react/guide/type-safety
+
+We're not the only ones seeing the change. While I try and keep myself off of
+social media, someone sent me [the results of Brian Anglin's work at
+Superwall][superwall-twitter], showing incredible CPU reductions on TanStack
+Start. I also recall ChatGPT switching from Next.js to Remix (random online
+chatter: [[1][chatgpt-1]] [[2][chatgpt-2]] [[3][chatgpt-3]]) a year ago.
+
+[superwall-twitter]: https://twitter.com/BriansAngles/status/1978834116079436242#m
+[chatgpt-1]: https://xcancel.com/ryanflorence/status/1831379475654947233
+[chatgpt-2]: https://old.reddit.com/r/reactjs/comments/1f97zgr/chatgpt_migrates_from_nextjs_to_remix
+[chatgpt-3]: https://old.reddit.com/r/nextjs/comments/1f92jdv/chatgptcom_switched_from_nextjs_to_remix
+
+[§3.1]: #next-metadata
+
+next/metadata is Great
+
+In my opinion, this is one of the only good APIs Next.js has, and was the one
+place in our code where moving to TanStack made things harder to do. Instead of
+worsening the code, I just ported their metadata API into a regular function,
+so everyone can use it. Originally, I had a 1:1 port on NPM, but earlier this
+year I simplified it's API into one short and understandable
+file. As of this blog post, I have added a TanStack-compatible
+`meta.toTags` API, which can be installed from [JSR][lib-jsr], [NPM][lib-npm],
+or simply copied into your project.
+
+> **notice**: Due to time constraints with writing this article, the library
+> has not yet been updated. I'll probably get around to it by the end of this
+> week (Oct 24th). As a placeholder, I'm able to share the version that is used
+> at work to my website: [`meta.tanstack.ts`](https://paperclover.net/file/2025/blog-everyone-hates-nextjs/meta.tanstack.ts).
+
+```tsx
+// once in your project
+import * as meta from "@clo/lib/meta.ts";
+
+export const defineHead = meta.toTags.bind(null, {
+ // site-wide options
+ base: new URL("https://paperclover.net"),
+ titleTemplate: (title) => [title, "paper clover"]
+ .filter(Boolean).join(' | '),
+ // ...
+});
+
+// for each page...
+export const Route = createFileRoute("/blog")({
+ head: () =>
+ defineHead({
+ title: "clover's blog", // templated with `titleTemplate`
+ description: "a catgirl meows about her technology viewpoints",
+ canonical: "/blog", // joined with `base`
+
+ // When specified, configures Open Graph and Twitter embed,
+ // using the page title and description as the default.
+ // The defaults are good, but it supports more options.
+ embed: {},
+
+ // Every exotic meta tag is done with a JSX fragment. This
+ // doesn't render React, it just loops through the tags.
+ // My goal was to cover the most common 99% of uses.
+ extra: <>
+ ,
+ >,
+ }),
+
+ component: Page,
+});
+
+function Page() {
+ ...
+}
+```
+
+My version wasn't concerned with covering the entire space of Next.js's metadata
+object, but instead uses inline JSX to fill that gap.
+
+[lib-jsr]: https://jsr.io/@clo/lib
+[lib-npm]: https://npmjs.com/@paperclover/lib
+
+[§3.2]: #vercel-og
+
+next/og is Good Too
+
+No strong opinions. I just want to remind everyone that the `@vercel/og` package exists.
+
+[§4]: #experience-feels-like-the-usual
+
+My Experience Feels like the Usual
+
+At the Next.js Conf 2024, everyone there was raving about Server Components. I
+forget exactly who I talked to, but the big people were all in on this. I,
+having implemented the bundler end of RSC, saw a couple of the problems in the
+format. With Next 15 "stabilizing" the App Router last year, many companies are
+building their products on it, realizing these pitfalls first-hand.
+
+I came into the Next.js game late, only starting in June with version 15.
+But everyone I've talked to at events sympathize with my notes. All the people
+I talked to on the subject at Bun's 1.3 Party agreed with me. Even some people
+at Vercel told me they don't like how Next.js is to actually use.
+
+I hope as TanStack Start stabilizes, it becomes the Next.js replacement everyone
+wants.
+
+[§5]: #prefer-respectful-tools
+
+Prefer Tools that Respect You
+
+A lot of in the JavaScript ecosystem is a mess. That mess is why web
+development gets made fun of. There were a lot of times I thought that working
+with the web was an unrecoverable mess, but the mess was actually just the
+commonly-used libraries I surrounded myself with. When that is peeled back,
+modern web development technologies are awesome.
+
+I've been making this website from scratch without any framework since late
+2024, by writing systems like my own [TUI progress widget][progress], [static
+file proxy][file-cache], incremental build system, and many more components.
+Working on this code has produced some of my best coding sessions (by
+happiness) in years. The viewers of *[paper clover]* get a better quality
+website; the mini-libraries I create get [extracted for public use][lib],
+everyone wins.
+
+This level of from-scratch is too much for most people, especially at the
+workplace. I say that at the minimum, we should only give our attention and
+money to high quality tools that respect us. And Next.js and the company behind
+it, Vercel, are not that.
+
+If you use Next.js, and feel that the experience doesn't remind you of respect
+too, consider whether you and your colleagues want to continue supporting their
+[serverless empire]. The Vite ecosystem seems pretty decent to build on right
+now, but I still have little experience in using their tools at scale in
+production. The [Vite+ launch from Void0][vite-plus] seems interesting, but
+only time will tell if these venture-funded tools will respect us (end-users
+and developers) long term.
+
+Next.js Conf 2025, as of writing, is [tomorrow][next-conf]. Instead of
+purchasing a $800 ticket, I decided to put that money [toward the TanStack
+team][tanstack-donate] for [respecting and improving the web development
+ecosystem][tanstack-ethos].
+
+[paper clover]: https://paperclover.net/
+[lib]: https://git.paperclover.net/clo/sitegen/src/branch/master/lib#readme
+[progress]: https://git.paperclover.net/clo/sitegen/src/branch/master/lib/progress.ts
+[file-cache]: https://git.paperclover.net/clo/sitegen/src/branch/master/src/file-viewer/cache.ts
+
+[next-conf]: https://nextjs.org/conf
+[vite-plus]: https://viteplus.dev/
+[tanstack-ethos]: https://tanstack.com/ethos
+[tanstack-donate]: https://github.com/sponsors/tannerlinsley
+[serverless empire]: https://youtu.be/SCIfWhAheVw
+
+## What the Future Holds
+
+Slowly, I've been replacing many pieces of software that disrespect me with
+better alternatives. Some examples of this are GitHub, Visual Studio Code,
+DaVinci Resolve, Discord, Google Drive/Workspace, along many more. I plan to
+write more on this blog about the technical things I do (that progress library,
+the purpose of my own site generator, learnings from my current job), including
+some of my past projects at Bun (details on HMR, the crash reporter, and the
+crazy system for bundling built-in modules). If it interests you, please
+subscribe to the email list:
+
+click here to send an email to subscribe@paperclover.net, requesting that you would like to be added to the mailing list. (i manage this mailing list manually)
+
+[back to top](#top) — [ask a question about this article](/q+a)
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/blog/pages/webdev/marko-intro.markodown b/src/blog/pages/webdev/marko-intro.markodown
deleted file mode 100644
index 8a7df80aeb80d2c561975c3a6ba5ed5c42f22672..0000000000000000000000000000000000000000
--- a/src/blog/pages/webdev/marko-intro.markodown
+++ /dev/null
@@ -1,339 +0,0 @@
-export const blog: BlogMeta = {
- title: "Marko is the coziest HTML templating language",
- desc: "...todo...",
- created: "2025-06-13",
- draft: true,
-};
-export const meta = formatBlogMeta(blob);
-export * as layout from "@/blog/layout.tsx";
-
-I've been recently playing around [Marko], and after adding limited support
-for it in my website generator, [sitegen], I instantly fell in love with how
-minimalistic it is in comparison to JSX, Astro components, and Svelte.
-
-[Marko]: https://next.markojs.com
-[sitegen]: https://paperclover.dev/clo/sitegen
-
-## Introduction to Marko
-
-If JSX was taking HTML and shoving its syntax into JavaScript, Marko is shoving
-JavaScript into HTML. Attributes are JavaScript expressions.
-
-```marko
-
- // `input` is like props, but given in the top-level scope
-
- // Interpolation with JS template string syntax
- ${formatTimeNicely(input.date)}
-
-
-
- // Capital letter variables for imported components
-
-
- // Components also can be auto-imported by lowercase.
- // This will look upwards for a `tags/` folder containing
- // "custom-footer.marko", similar to how Node.js finds
- // package names in all upwards `node_modules` folders.
-
-
-
-// ESM `import` / `export` just work as expected.
-// I prefer my imports at the end, to highlight the markup.
-import MarkdownContent from "./MarkdownContent.marko";
-import { formatTimeNicely } from "../date-helpers.ts";
-```
-
-Tags with the `value` attribute have a shorthand, which is used by the built-in
-`` for conditional rendering.
-
-```marko
-// Sugar for
-
-
-// and it composes amazingly to the 'if' built-in
-
-
-
-```
-
-Tags can also return values into the scope for use in the template using `/`, such as `` for unique ID generation. This is available to components that ` `.
-
-```
-
-
-
-click me!>
-// ^ oh, you can also omit the
-// closing tag name if you want.
-```
-
-It's important that I started with the two forms of "Tag I/O": `=` for input
-and `/` for output. With those building blocks, we introduce local variables
-with `const`
-
-```
-
-
-// This is how you insert raw HTML to the document
-
-
-// It supports all of the cozy destructuring syntax JS has
-
-```
-
-Unlike JSX, when you pass content within a tag (`input.content` instead of
-JSX's `children`), instead of it being a JSX element, it is actually a
-function. This means that the `for` tag can render the content multiple times.
-
-```
-
-
- // Renders a new random number for each iteration.
- ${Math.random()}
- >
-
-```
-
-Since `content` is a function, it can take arguments. This is done with `|`
-
-```
-my friends
-
- // I tend to omit the closing tag names for the built-in control
- // flow tags, but I keep them for HTML tags. It's kinda like how
- // in JavaScript you just write `}` to close your `if`s and loops.
- //
- // Anyways also has 'of'
-
- ${item.name}
- >
-
- // They support the same syntax JavaScript function params allows,
- // so you can have destructuring here too, and multiple params.
-
- // By the way you can also use emmet-style class and ID shorthands.
- My #${index + 1} friend is ${name}
- >
-
-```
-
-Instead of named slots, Marko has attribute tags. These are more powerful than
-slots since they are functions, and can also act as sugar for more complicated
-attributes.
-
-```
-
- <@header variant="big">
- the next big thing
- @header>
-
- body text...
-
-
-// The `input` variable inside of is:
-//
-// {
-// title: "Welcome",
-// header: {
-// content: /* function rendering "the next big thing " */,
-// variant: "big",
-// },
-// content: /* function rendering "body text
" */
-// }
-```
-
-This layout could be implemented as such:
-
-```marko
-
-
-
-
- // Instead of assigning to a variable with a capital letter,
- // template interpolation works on tag names. This can also
- // be a string to render the native HTML tag of that kind.
- <${content} />
-
-
- >
-
- <${input.content} />
-
-```
-
-The last syntax feature missing is calling a tag with parameters. That is done
-just like a regular function call, with '('.
-
-```
-
-```
-
-In fact, attributes can just be sugar over this syntax. (this technically isn't
-true but it's close enough for the example)
-
-```
-
-
-// is equal to
-
-
-```
-
-All of the above is about how Marko's syntax works, and how it performs HTML
-generation with components. Marko also allows interactive components, but an
-explaination of that is beyond the scope of this page, mostly since I have not
-used it. A brief example of it, modified from their documentation.
-
-```marko
-// Reactive variables with just work...
-
-${basicCounter}
-// ...but a counter is boring.
-
-
-
-// 'by' is like React JSX's "key" property, but it's optional.
-
-
-// Form example
-
-
-```
-
-Usage on `paperclover.net`
-
-Using Marko for HTML generation is quite easy. `.marko` files can be compiled
-into `.js` using the `@marko/compiler` library.
-
-```ts
-const src = fs.readFileSync("page.marko", "utf8");
-const compile = marko.compileSync(src, filepath);
-fs.writeFileSync("page.js", compile.code);
-
-const page = require("./page.js");
-console.info(page);
-
-import * as fs from "node:fs";
-import * as marko from "@marko/compiler";
-```
-
-To get client side JavaScript, an option can be passed to the Marko compiler to
-generate the client side code. While it is a big selling point of Marko, I do
-not use any of their client side features, instead deferring to manually-written
-frontend scripts. This is because that is how my website has been for years,
-statically generated. And for websites like mine that are content focused, this
-is the correct way to do things.
-
-Since I have a custom HTML generation library (built on JSX and some React-like
-patterns), I have written a simple integration for it to utilize Marko
-components, which is loaded by replacing the generated import to `marko/html`,
-which lets me overwrite functions like `createTemplate` (to change the signature
-of a component), `dynamicTag` (to allow Marko to render non-Marko components),
-and `fork` (to enable async integration with the rendering framework). An
-additional feature of this is I have a Node.js loader hook to allow importing
-these files directly.
-
-```tsx
-function Page() {
- const q = Question.getByDate(new Date("2025-06-07 12:12 EST"));
- return
-
example question
-
- ;
-}
-
-// The synchronous render can be used because `Page` and `question.marko`
-// do not await any promises (SQLite runs synchronously)
-console.info(render.sync( ).text);
-
-import * as render from "#engine/render";
-import QuestionRender from "@/q+a/tags/question.marko";
-import { Question } from "@/q+a/models/Question.ts";
-```
-
-Here is the `question.marko` tag used to render [questions on the clover q+a](/q+a).
-
-```marko
-// Renders a `Question` entry including its markdown body.
-export interface Input {
- question: Question;
- admin?: boolean;
-}
-
-// 2024-12-31 05:00:00 EST
-export const transitionDate = 1735639200000;
-
-
-
-
-<${"e-"}
- f=(date > transitionDate ? true : undefined)
- id=admin ? `q${id}` : undefined
->
-
- [EDIT]
- >
-
- ${formatQuestionTimestamp(date)}
-
-
-
->
-
-// this singleton script will make all the '' tags clickable.
-client import "./clickable-links.client.ts";
-
-import type { Question } from "@/q+a/models/Question.ts";
-import { formatQuestionTimestamp, formatQuestionISOTimestamp } from "@/q+a/format.ts";
-import { CloverMarkdown } from "@/q+a/clover-markdown.tsx";
-```
-
-The integration is great, `client import` is quite a magical concept, and I've
-tuned it to do the expected thing in my framework.
-
-import { type BlogMeta, formatBlogMeta } from '@/blog/helpers.ts';
diff --git a/src/blog/tags/heading.tsx b/src/blog/tags/heading.tsx
new file mode 100644
index 0000000000000000000000000000000000000000..c396a93a3fb3f1206db13e248cadf2401131aad3
--- /dev/null
+++ b/src/blog/tags/heading.tsx
@@ -0,0 +1,10 @@
+export default function ({ level: Level, slug, children }) {
+ return (
+ <>
+
+ §
+ {children}
+
+ >
+ );
+}
diff --git a/src/blog/tags/table-of-contents.tsx b/src/blog/tags/table-of-contents.tsx
new file mode 100644
index 0000000000000000000000000000000000000000..ab53d242d8a5415915a57eb194ced68b0322259b
--- /dev/null
+++ b/src/blog/tags/table-of-contents.tsx
@@ -0,0 +1,8 @@
+export default function ({ children }) {
+ return (
+
+
Contents:
+ {children}
+
+ );
+}
diff --git a/src/deploy.ts b/src/deploy.ts
deleted file mode 100644
index 1fe508bea73ad73a38abc3896167f6867b847054..0000000000000000000000000000000000000000
--- a/src/deploy.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-export async function main() {
- await rsync.spawn({
- cwd: Path.resolve(import.meta.dirname).parent!.toString(),
- args: [
- "-a",
- "--progress",
- "clo@zenith:/mnt/storage1/clover/Documents/Config/paperclover/cache.sqlite",
- ".clover/",
- ],
- progress: progress.start("download file cache"),
- });
- await rsync.spawn({
- cwd: Path.resolve(import.meta.dirname).parent!.toString(),
- args: [
- "-a",
- "--progress",
- "clo@paperclover.net:~/paperclover.net/.clover/questions.sqlite",
- ".clover/",
- ],
- progress: progress.start("download questions state"),
- });
-
- // cannot call incr.restore until database calls are
- // considered in the watch graph.
- // await incr.restore()
- await incr.compile(generate);
-
- await rsync.spawn({
- cwd: Path.resolve(import.meta.dirname).parent!.toString(),
- args: [
- "-a",
- "-r",
- "--progress",
- "--delete",
- "--exclude=node_modules",
- "--exclude=.clover",
- "package.json",
- "package-lock.json",
- ".clover/o/",
- "paperclover.net:~/paperclover.net/",
- ],
- progress: progress.start("copy site files"),
- });
- await subprocess.spawnAndWait({
- stdio: "inherit",
- cmd: [
- "ssh",
- "paperclover.net",
- "cd paperclover.net && " +
- "npm i &&" +
- "pm2 restart site",
- ],
- });
-}
-
-import * as incr from "../framework/incremental.ts";
-import { generate } from "../framework/generate.ts";
-import * as progress from "lib/progress.ts";
-import * as subprocess from "lib/subprocess.ts";
-import * as rsync from "./file-viewer/rsync.ts";
-import { Path } from "#sitegen/path";
diff --git a/src/file-viewer/highlight-grammar/html.plist b/src/file-viewer/highlight-grammar/html.plist
new file mode 100644
index 0000000000000000000000000000000000000000..228353f83f1b10a6f1588c0bb6e10696065b59f6
--- /dev/null
+++ b/src/file-viewer/highlight-grammar/html.plist
@@ -0,0 +1,4215 @@
+
+
+
+
+ fileTypes
+
+ html
+ htm
+ shtml
+ xhtml
+ inc
+ tmpl
+ tpl
+
+ firstLineMatch
+ <(?i:(!DOCTYPE\s*)?html)
+ injections
+
+ R:text.html - (comment.block, text.html meta.embedded, meta.tag.*.*.html, meta.tag.*.*.*.html, meta.tag.*.*.*.*.html)
+
+ comment
+ Uses R: to ensure this matches after any other injections.
+ patterns
+
+
+ match
+ <
+ name
+ invalid.illegal.bad-angle-bracket.html
+
+
+
+
+ keyEquivalent
+ ^~H
+ name
+ HTML
+ patterns
+
+
+ include
+ #xml-processing
+
+
+ include
+ #comment
+
+
+ include
+ #doctype
+
+
+ include
+ #cdata
+
+
+ include
+ #tags-valid
+
+
+ include
+ #tags-invalid
+
+
+ include
+ #entities
+
+
+ repository
+
+ attribute
+
+ patterns
+
+
+ begin
+ (s(hape|cope|t(ep|art)|ize(s)?|p(ellcheck|an)|elected|lot|andbox|rc(set|doc|lang)?)|h(ttp-equiv|i(dden|gh)|e(ight|aders)|ref(lang)?)|n(o(nce|validate|module)|ame)|c(h(ecked|arset)|ite|o(nt(ent(editable)?|rols)|ords|l(s(pan)?|or))|lass|rossorigin)|t(ype(mustmatch)?|itle|a(rget|bindex)|ranslate)|i(s(map)?|n(tegrity|putmode)|tem(scope|type|id|prop|ref)|d)|op(timum|en)|d(i(sabled|r(name)?)|ownload|e(coding|f(er|ault))|at(etime|a)|raggable)|usemap|p(ing|oster|la(ysinline|ceholder)|attern|reload)|enctype|value|kind|for(m(novalidate|target|enctype|action|method)?)?|w(idth|rap)|l(ist|o(op|w)|a(ng|bel))|a(s(ync)?|c(ce(sskey|pt(-charset)?)|tion)|uto(c(omplete|apitalize)|play|focus)|l(t|low(usermedia|paymentrequest|fullscreen))|bbr)|r(ows(pan)?|e(versed|quired|ferrerpolicy|l|adonly))|m(in(length)?|u(ted|ltiple)|e(thod|dia)|a(nifest|x(length)?)))(?![\w:-])
+ beginCaptures
+
+ 0
+
+ name
+ entity.other.attribute-name.html
+
+
+ comment
+ HTML5 attributes, not event handlers
+ end
+ (?=\s*+[^=\s])
+ name
+ meta.attribute.$1.html
+ patterns
+
+
+ include
+ #attribute-interior
+
+
+
+
+ begin
+ style(?![\w:-])
+ beginCaptures
+
+ 0
+
+ name
+ entity.other.attribute-name.html
+
+
+ comment
+ HTML5 style attribute
+ end
+ (?=\s*+[^=\s])
+ name
+ meta.attribute.style.html
+ patterns
+
+
+ begin
+ =
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.separator.key-value.html
+
+
+ end
+ (?<=[^\s=])(?!\s*=)|(?=/?>)
+ patterns
+
+
+ begin
+ (?=[^\s=<>`/]|/(?!>))
+ end
+ (?!\G)
+ name
+ meta.embedded.line.css
+ patterns
+
+
+ captures
+
+ 0
+
+ name
+ source.css
+
+
+ match
+ ([^\s"'=<>`/]|/(?!>))+
+ name
+ string.unquoted.html
+
+
+ begin
+ "
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.begin.html
+
+
+ contentName
+ source.css
+ end
+ (")
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.end.html
+
+ 1
+
+ name
+ source.css
+
+
+ name
+ string.quoted.double.html
+ patterns
+
+
+ include
+ #entities
+
+
+
+
+ begin
+ '
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.begin.html
+
+
+ contentName
+ source.css
+ end
+ (')
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.end.html
+
+ 1
+
+ name
+ source.css
+
+
+ name
+ string.quoted.single.html
+ patterns
+
+
+ include
+ #entities
+
+
+
+
+
+
+ match
+ =
+ name
+ invalid.illegal.unexpected-equals-sign.html
+
+
+
+
+
+
+ begin
+ on(s(croll|t(orage|alled)|u(spend|bmit)|e(curitypolicyviolation|ek(ing|ed)|lect))|hashchange|c(hange|o(ntextmenu|py)|u(t|echange)|l(ick|ose)|an(cel|play(through)?))|t(imeupdate|oggle)|in(put|valid)|o(nline|ffline)|d(urationchange|r(op|ag(start|over|e(n(ter|d)|xit)|leave)?)|blclick)|un(handledrejection|load)|p(opstate|lay(ing)?|a(ste|use|ge(show|hide))|rogress)|e(nded|rror|mptied)|volumechange|key(down|up|press)|focus|w(heel|aiting)|l(oad(start|e(nd|d(data|metadata)))?|anguagechange)|a(uxclick|fterprint|bort)|r(e(s(ize|et)|jectionhandled)|atechange)|m(ouse(o(ut|ver)|down|up|enter|leave|move)|essage(error)?)|b(efore(unload|print)|lur))(?![\w:-])
+ beginCaptures
+
+ 0
+
+ name
+ entity.other.attribute-name.html
+
+
+ comment
+ HTML5 attributes, event handlers
+ end
+ (?=\s*+[^=\s])
+ name
+ meta.attribute.event-handler.$1.html
+ patterns
+
+
+ begin
+ =
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.separator.key-value.html
+
+
+ end
+ (?<=[^\s=])(?!\s*=)|(?=/?>)
+ patterns
+
+
+ begin
+ (?=[^\s=<>`/]|/(?!>))
+ end
+ (?!\G)
+ name
+ meta.embedded.line.js
+ patterns
+
+
+ captures
+
+ 0
+
+ name
+ source.js
+
+ 1
+
+ patterns
+
+
+ include
+ source.js
+
+
+
+
+ match
+ (([^\s"'=<>`/]|/(?!>))+)
+ name
+ string.unquoted.html
+
+
+ begin
+ "
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.begin.html
+
+
+ contentName
+ source.js
+ end
+ (")
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.end.html
+
+ 1
+
+ name
+ source.js
+
+
+ name
+ string.quoted.double.html
+ patterns
+
+
+ captures
+
+ 0
+
+ patterns
+
+
+ include
+ source.js
+
+
+
+
+ match
+ ([^\n"/]|/(?![/*]))+
+
+
+ begin
+ //
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.comment.js
+
+
+ end
+ (?=")|\n
+ name
+ comment.line.double-slash.js
+
+
+ begin
+ /\*
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.comment.begin.js
+
+
+ end
+ (?=")|\*/
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.comment.end.js
+
+
+ name
+ comment.block.js
+
+
+
+
+ begin
+ '
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.begin.html
+
+
+ contentName
+ source.js
+ end
+ (')
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.end.html
+
+ 1
+
+ name
+ source.js
+
+
+ name
+ string.quoted.single.html
+ patterns
+
+
+ captures
+
+ 0
+
+ patterns
+
+
+ include
+ source.js
+
+
+
+
+ match
+ ([^\n'/]|/(?![/*]))+
+
+
+ begin
+ //
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.comment.js
+
+
+ end
+ (?=')|\n
+ name
+ comment.line.double-slash.js
+
+
+ begin
+ /\*
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.comment.begin.js
+
+
+ end
+ (?=')|\*/
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.comment.end.js
+
+
+ name
+ comment.block.js
+
+
+
+
+
+
+ match
+ =
+ name
+ invalid.illegal.unexpected-equals-sign.html
+
+
+
+
+
+
+ begin
+ (data-[a-z\-]+)(?![\w:-])
+ beginCaptures
+
+ 0
+
+ name
+ entity.other.attribute-name.html
+
+
+ comment
+ HTML5 attributes, data-*
+ end
+ (?=\s*+[^=\s])
+ name
+ meta.attribute.data-x.$1.html
+ patterns
+
+
+ include
+ #attribute-interior
+
+
+
+
+ begin
+ (align|bgcolor|border)(?![\w:-])
+ beginCaptures
+
+ 0
+
+ name
+ invalid.deprecated.entity.other.attribute-name.html
+
+
+ comment
+ HTML attributes, deprecated
+ end
+ (?=\s*+[^=\s])
+ name
+ meta.attribute.$1.html
+ patterns
+
+
+ include
+ #attribute-interior
+
+
+
+
+ begin
+ ([^\x{0020}"'<>/=\x{0000}-\x{001F}\x{007F}-\x{009F}\x{FDD0}-\x{FDEF}\x{FFFE}\x{FFFF}\x{1FFFE}\x{1FFFF}\x{2FFFE}\x{2FFFF}\x{3FFFE}\x{3FFFF}\x{4FFFE}\x{4FFFF}\x{5FFFE}\x{5FFFF}\x{6FFFE}\x{6FFFF}\x{7FFFE}\x{7FFFF}\x{8FFFE}\x{8FFFF}\x{9FFFE}\x{9FFFF}\x{AFFFE}\x{AFFFF}\x{BFFFE}\x{BFFFF}\x{CFFFE}\x{CFFFF}\x{DFFFE}\x{DFFFF}\x{EFFFE}\x{EFFFF}\x{FFFFE}\x{FFFFF}\x{10FFFE}\x{10FFFF}]+)
+ beginCaptures
+
+ 0
+
+ name
+ entity.other.attribute-name.html
+
+
+ comment
+ Anything else that is valid
+ end
+ (?=\s*+[^=\s])
+ name
+ meta.attribute.unrecognized.$1.html
+ patterns
+
+
+ include
+ #attribute-interior
+
+
+
+
+ match
+ [^\s>]+
+ name
+ invalid.illegal.character-not-allowed-here.html
+
+
+
+ attribute-interior
+
+ patterns
+
+
+ begin
+ =
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.separator.key-value.html
+
+
+ end
+ (?<=[^\s=])(?!\s*=)|(?=/?>)
+ patterns
+
+
+ match
+ ([^\s"'=<>`/]|/(?!>))+
+ name
+ string.unquoted.html
+
+
+ begin
+ "
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.begin.html
+
+
+ end
+ "
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.end.html
+
+
+ name
+ string.quoted.double.html
+ patterns
+
+
+ include
+ #entities
+
+
+
+
+ begin
+ '
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.begin.html
+
+
+ end
+ '
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.end.html
+
+
+ name
+ string.quoted.single.html
+ patterns
+
+
+ include
+ #entities
+
+
+
+
+ match
+ =
+ name
+ invalid.illegal.unexpected-equals-sign.html
+
+
+
+
+
+ cdata
+
+ begin
+ <!\[CDATA\[
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.begin.html
+
+
+ contentName
+ string.other.inline-data.html
+ end
+ ]]>
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.metadata.cdata.html
+
+ comment
+
+ begin
+ <!--
+ captures
+
+ 0
+
+ name
+ punctuation.definition.comment.html
+
+
+ end
+ -->
+ name
+ comment.block.html
+ patterns
+
+
+ match
+ \G-?>
+ name
+ invalid.illegal.characters-not-allowed-here.html
+
+
+ match
+ <!--(?!>)|<!-(?=-->)
+ name
+ invalid.illegal.characters-not-allowed-here.html
+
+
+ match
+ --!>
+ name
+ invalid.illegal.characters-not-allowed-here.html
+
+
+
+ core-minus-invalid
+
+ comment
+ This should be the root pattern array includes minus #tags-invalid
+ patterns
+
+
+ include
+ #xml-processing
+
+
+ include
+ #comment
+
+
+ include
+ #doctype
+
+
+ include
+ #cdata
+
+
+ include
+ #tags-valid
+
+
+ include
+ #entities
+
+
+
+ doctype
+
+ begin
+ <!(?=(?i:DOCTYPE\s))
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.begin.html
+
+
+ end
+ >
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.metadata.doctype.html
+ patterns
+
+
+ match
+ \G(?i:DOCTYPE)
+ name
+ entity.name.tag.html
+
+
+ begin
+ "
+ end
+ "
+ name
+ string.quoted.double.html
+
+
+ match
+ [^\s>]+
+ name
+ entity.other.attribute-name.html
+
+
+
+ entities
+
+ patterns
+
+
+ captures
+
+ 1
+
+ name
+ punctuation.definition.entity.html
+
+ 912
+
+ name
+ punctuation.definition.entity.html
+
+
+ comment
+ Yes this is a bit ridiculous, there are quite a lot of these
+ match
+ (?x)
+ (&) (?=[a-zA-Z])
+ (
+ (a(s(ymp(eq)?|cr|t)|n(d(slope|d|v|and)?|g(s(t|ph)|zarr|e|le|rt(vb(d)?)?|msd(a(h|c|d|e|f|a|g|b))?)?)|c(y|irc|d|ute|E)?|tilde|o(pf|gon)|uml|p(id|os|prox(eq)?|e|E|acir)?|elig|f(r)?|w(conint|int)|l(pha|e(ph|fsym))|acute|ring|grave|m(p|a(cr|lg))|breve)|A(s(sign|cr)|nd|MP|c(y|irc)|tilde|o(pf|gon)|uml|pplyFunction|fr|Elig|lpha|acute|ring|grave|macr|breve))
+ | (B(scr|cy|opf|umpeq|e(cause|ta|rnoullis)|fr|a(ckslash|r(v|wed))|reve)|b(s(cr|im(e)?|ol(hsub|b)?|emi)|n(ot|e(quiv)?)|c(y|ong)|ig(s(tar|qcup)|c(irc|up|ap)|triangle(down|up)|o(times|dot|plus)|uplus|vee|wedge)|o(t(tom)?|pf|wtie|x(h(d|u|D|U)?|times|H(d|u|D|U)?|d(R|l|r|L)|u(R|l|r|L)|plus|D(R|l|r|L)|v(R|h|H|l|r|L)?|U(R|l|r|L)|V(R|h|H|l|r|L)?|minus|box))|Not|dquo|u(ll(et)?|mp(e(q)?|E)?)|prime|e(caus(e)?|t(h|ween|a)|psi|rnou|mptyv)|karow|fr|l(ock|k(1(2|4)|34)|a(nk|ck(square|triangle(down|left|right)?|lozenge)))|a(ck(sim(eq)?|cong|prime|epsilon)|r(vee|wed(ge)?))|r(eve|vbar)|brk(tbrk)?))
+ | (c(s(cr|u(p(e)?|b(e)?))|h(cy|i|eck(mark)?)|ylcty|c(irc|ups(sm)?|edil|a(ps|ron))|tdot|ir(scir|c(eq|le(d(R|circ|S|dash|ast)|arrow(left|right)))?|e|fnint|E|mid)?|o(n(int|g(dot)?)|p(y(sr)?|f|rod)|lon(e(q)?)?|m(p(fn|le(xes|ment))?|ma(t)?))|dot|u(darr(l|r)|p(s|c(up|ap)|or|dot|brcap)?|e(sc|pr)|vee|wed|larr(p)?|r(vearrow(left|right)|ly(eq(succ|prec)|vee|wedge)|arr(m)?|ren))|e(nt(erdot)?|dil|mptyv)|fr|w(conint|int)|lubs(uit)?|a(cute|p(s|c(up|ap)|dot|and|brcup)?|r(on|et))|r(oss|arr))|C(scr|hi|c(irc|onint|edil|aron)|ircle(Minus|Times|Dot|Plus)|Hcy|o(n(tourIntegral|int|gruent)|unterClockwiseContourIntegral|p(f|roduct)|lon(e)?)|dot|up(Cap)?|OPY|e(nterDot|dilla)|fr|lo(seCurly(DoubleQuote|Quote)|ckwiseContourIntegral)|a(yleys|cute|p(italDifferentialD)?)|ross))
+ | (d(s(c(y|r)|trok|ol)|har(l|r)|c(y|aron)|t(dot|ri(f)?)|i(sin|e|v(ide(ontimes)?|onx)?|am(s|ond(suit)?)?|gamma)|Har|z(cy|igrarr)|o(t(square|plus|eq(dot)?|minus)?|ublebarwedge|pf|wn(harpoon(left|right)|downarrows|arrow)|llar)|d(otseq|a(rr|gger))?|u(har|arr)|jcy|e(lta|g|mptyv)|f(isht|r)|wangle|lc(orn|rop)|a(sh(v)?|leth|rr|gger)|r(c(orn|rop)|bkarow)|b(karow|lac)|Arr)|D(s(cr|trok)|c(y|aron)|Scy|i(fferentialD|a(critical(Grave|Tilde|Do(t|ubleAcute)|Acute)|mond))|o(t(Dot|Equal)?|uble(Right(Tee|Arrow)|ContourIntegral|Do(t|wnArrow)|Up(DownArrow|Arrow)|VerticalBar|L(ong(RightArrow|Left(RightArrow|Arrow))|eft(RightArrow|Tee|Arrow)))|pf|wn(Right(TeeVector|Vector(Bar)?)|Breve|Tee(Arrow)?|arrow|Left(RightVector|TeeVector|Vector(Bar)?)|Arrow(Bar|UpArrow)?))|Zcy|el(ta)?|D(otrahd)?|Jcy|fr|a(shv|rr|gger)))
+ | (e(s(cr|im|dot)|n(sp|g)|c(y|ir(c)?|olon|aron)|t(h|a)|o(pf|gon)|dot|u(ro|ml)|p(si(v|lon)?|lus|ar(sl)?)|e|D(ot|Dot)|q(s(im|lant(less|gtr))|c(irc|olon)|u(iv(DD)?|est|als)|vparsl)|f(Dot|r)|l(s(dot)?|inters|l)?|a(ster|cute)|r(Dot|arr)|g(s(dot)?|rave)?|x(cl|ist|p(onentiale|ectation))|m(sp(1(3|4))?|pty(set|v)?|acr))|E(s(cr|im)|c(y|irc|aron)|ta|o(pf|gon)|NG|dot|uml|TH|psilon|qu(ilibrium|al(Tilde)?)|fr|lement|acute|grave|x(ists|ponentialE)|m(pty(SmallSquare|VerySmallSquare)|acr)))
+ | (f(scr|nof|cy|ilig|o(pf|r(k(v)?|all))|jlig|partint|emale|f(ilig|l(ig|lig)|r)|l(tns|lig|at)|allingdotseq|r(own|a(sl|c(1(2|8|3|4|5|6)|78|2(3|5)|3(8|4|5)|45|5(8|6)))))|F(scr|cy|illed(SmallSquare|VerySmallSquare)|o(uriertrf|pf|rAll)|fr))
+ | (G(scr|c(y|irc|edil)|t|opf|dot|T|Jcy|fr|amma(d)?|reater(Greater|SlantEqual|Tilde|Equal(Less)?|FullEqual|Less)|g|breve)|g(s(cr|im(e|l)?)|n(sim|e(q(q)?)?|E|ap(prox)?)|c(y|irc)|t(c(c|ir)|dot|quest|lPar|r(sim|dot|eq(qless|less)|less|a(pprox|rr)))?|imel|opf|dot|jcy|e(s(cc|dot(o(l)?)?|l(es)?)?|q(slant|q)?|l)?|v(nE|ertneqq)|fr|E(l)?|l(j|E|a)?|a(cute|p|mma(d)?)|rave|g(g)?|breve))
+ | (h(s(cr|trok|lash)|y(phen|bull)|circ|o(ok(leftarrow|rightarrow)|pf|arr|rbar|mtht)|e(llip|arts(uit)?|rcon)|ks(earow|warow)|fr|a(irsp|lf|r(dcy|r(cir|w)?)|milt)|bar|Arr)|H(s(cr|trok)|circ|ilbertSpace|o(pf|rizontalLine)|ump(DownHump|Equal)|fr|a(cek|t)|ARDcy))
+ | (i(s(cr|in(s(v)?|dot|v|E)?)|n(care|t(cal|prod|e(rcal|gers)|larhk)?|odot|fin(tie)?)?|c(y|irc)?|t(ilde)?|i(nfin|i(nt|int)|ota)?|o(cy|ta|pf|gon)|u(kcy|ml)|jlig|prod|e(cy|xcl)|quest|f(f|r)|acute|grave|m(of|ped|a(cr|th|g(part|e|line))))|I(scr|n(t(e(rsection|gral))?|visible(Comma|Times))|c(y|irc)|tilde|o(ta|pf|gon)|dot|u(kcy|ml)|Ocy|Jlig|fr|Ecy|acute|grave|m(plies|a(cr|ginaryI))?))
+ | (j(s(cr|ercy)|c(y|irc)|opf|ukcy|fr|math)|J(s(cr|ercy)|c(y|irc)|opf|ukcy|fr))
+ | (k(scr|hcy|c(y|edil)|opf|jcy|fr|appa(v)?|green)|K(scr|c(y|edil)|Hcy|opf|Jcy|fr|appa))
+ | (l(s(h|cr|trok|im(e|g)?|q(uo(r)?|b)|aquo)|h(ar(d|u(l)?)|blk)|n(sim|e(q(q)?)?|E|ap(prox)?)|c(y|ub|e(il|dil)|aron)|Barr|t(hree|c(c|ir)|imes|dot|quest|larr|r(i(e|f)?|Par))?|Har|o(ng(left(arrow|rightarrow)|rightarrow|mapsto)|times|z(enge|f)?|oparrow(left|right)|p(f|lus|ar)|w(ast|bar)|a(ng|rr)|brk)|d(sh|ca|quo(r)?|r(dhar|ushar))|ur(dshar|uhar)|jcy|par(lt)?|e(s(s(sim|dot|eq(qgtr|gtr)|approx|gtr)|cc|dot(o(r)?)?|g(es)?)?|q(slant|q)?|ft(harpoon(down|up)|threetimes|leftarrows|arrow(tail)?|right(squigarrow|harpoons|arrow(s)?))|g)?|v(nE|ertneqq)|f(isht|loor|r)|E(g)?|l(hard|corner|tri|arr)?|a(ng(d|le)?|cute|t(e(s)?|ail)?|p|emptyv|quo|rr(sim|hk|tl|pl|fs|lp|b(fs)?)?|gran|mbda)|r(har(d)?|corner|tri|arr|m)|g(E)?|m(idot|oust(ache)?)|b(arr|r(k(sl(d|u)|e)|ac(e|k))|brk)|A(tail|arr|rr))|L(s(h|cr|trok)|c(y|edil|aron)|t|o(ng(RightArrow|left(arrow|rightarrow)|rightarrow|Left(RightArrow|Arrow))|pf|wer(RightArrow|LeftArrow))|T|e(ss(Greater|SlantEqual|Tilde|EqualGreater|FullEqual|Less)|ft(Right(Vector|Arrow)|Ceiling|T(ee(Vector|Arrow)?|riangle(Bar|Equal)?)|Do(ubleBracket|wn(TeeVector|Vector(Bar)?))|Up(TeeVector|DownVector|Vector(Bar)?)|Vector(Bar)?|arrow|rightarrow|Floor|A(ngleBracket|rrow(RightArrow|Bar)?)))|Jcy|fr|l(eftarrow)?|a(ng|cute|placetrf|rr|mbda)|midot))
+ | (M(scr|cy|inusPlus|opf|u|e(diumSpace|llintrf)|fr|ap)|m(s(cr|tpos)|ho|nplus|c(y|omma)|i(nus(d(u)?|b)?|cro|d(cir|dot|ast)?)|o(dels|pf)|dash|u(ltimap|map)?|p|easuredangle|DDot|fr|l(cp|dr)|a(cr|p(sto(down|up|left)?)?|l(t(ese)?|e)|rker)))
+ | (n(s(hort(parallel|mid)|c(cue|e|r)?|im(e(q)?)?|u(cc(eq)?|p(set(eq(q)?)?|e|E)?|b(set(eq(q)?)?|e|E)?)|par|qsu(pe|be)|mid)|Rightarrow|h(par|arr|Arr)|G(t(v)?|g)|c(y|ong(dot)?|up|edil|a(p|ron))|t(ilde|lg|riangle(left(eq)?|right(eq)?)|gl)|i(s(d)?|v)?|o(t(ni(v(c|a|b))?|in(dot|v(c|a|b)|E)?)?|pf)|dash|u(m(sp|ero)?)?|jcy|p(olint|ar(sl|t|allel)?|r(cue|e(c(eq)?)?)?)|e(s(im|ear)|dot|quiv|ar(hk|r(ow)?)|xist(s)?|Arr)?|v(sim|infin|Harr|dash|Dash|l(t(rie)?|e|Arr)|ap|r(trie|Arr)|g(t|e))|fr|w(near|ar(hk|r(ow)?)|Arr)|V(dash|Dash)|l(sim|t(ri(e)?)?|dr|e(s(s)?|q(slant|q)?|ft(arrow|rightarrow))?|E|arr|Arr)|a(ng|cute|tur(al(s)?)?|p(id|os|prox|E)?|bla)|r(tri(e)?|ightarrow|arr(c|w)?|Arr)|g(sim|t(r)?|e(s|q(slant|q)?)?|E)|mid|L(t(v)?|eft(arrow|rightarrow)|l)|b(sp|ump(e)?))|N(scr|c(y|edil|aron)|tilde|o(nBreakingSpace|Break|t(R(ightTriangle(Bar|Equal)?|everseElement)|Greater(Greater|SlantEqual|Tilde|Equal|FullEqual|Less)?|S(u(cceeds(SlantEqual|Tilde|Equal)?|perset(Equal)?|bset(Equal)?)|quareSu(perset(Equal)?|bset(Equal)?))|Hump(DownHump|Equal)|Nested(GreaterGreater|LessLess)|C(ongruent|upCap)|Tilde(Tilde|Equal|FullEqual)?|DoubleVerticalBar|Precedes(SlantEqual|Equal)?|E(qual(Tilde)?|lement|xists)|VerticalBar|Le(ss(Greater|SlantEqual|Tilde|Equal|Less)?|ftTriangle(Bar|Equal)?))?|pf)|u|e(sted(GreaterGreater|LessLess)|wLine|gative(MediumSpace|Thi(nSpace|ckSpace)|VeryThinSpace))|Jcy|fr|acute))
+ | (o(s(cr|ol|lash)|h(m|bar)|c(y|ir(c)?)|ti(lde|mes(as)?)|S|int|opf|d(sold|iv|ot|ash|blac)|uml|p(erp|lus|ar)|elig|vbar|f(cir|r)|l(c(ir|ross)|t|ine|arr)|a(st|cute)|r(slope|igof|or|d(er(of)?|f|m)?|v|arr)?|g(t|on|rave)|m(i(nus|cron|d)|ega|acr))|O(s(cr|lash)|c(y|irc)|ti(lde|mes)|opf|dblac|uml|penCurly(DoubleQuote|Quote)|ver(B(ar|rac(e|ket))|Parenthesis)|fr|Elig|acute|r|grave|m(icron|ega|acr)))
+ | (p(s(cr|i)|h(i(v)?|one|mmat)|cy|i(tchfork|v)?|o(intint|und|pf)|uncsp|er(cnt|tenk|iod|p|mil)|fr|l(us(sim|cir|two|d(o|u)|e|acir|mn|b)?|an(ck(h)?|kv))|ar(s(im|l)|t|a(llel)?)?|r(sim|n(sim|E|ap)|cue|ime(s)?|o(d|p(to)?|f(surf|line|alar))|urel|e(c(sim|n(sim|eqq|approx)|curlyeq|eq|approx)?)?|E|ap)?|m)|P(s(cr|i)|hi|cy|i|o(incareplane|pf)|fr|lusMinus|artialD|r(ime|o(duct|portion(al)?)|ecedes(SlantEqual|Tilde|Equal)?)?))
+ | (q(scr|int|opf|u(ot|est(eq)?|at(int|ernions))|prime|fr)|Q(scr|opf|UOT|fr))
+ | (R(s(h|cr)|ho|c(y|edil|aron)|Barr|ight(Ceiling|T(ee(Vector|Arrow)?|riangle(Bar|Equal)?)|Do(ubleBracket|wn(TeeVector|Vector(Bar)?))|Up(TeeVector|DownVector|Vector(Bar)?)|Vector(Bar)?|arrow|Floor|A(ngleBracket|rrow(Bar|LeftArrow)?))|o(undImplies|pf)|uleDelayed|e(verse(UpEquilibrium|E(quilibrium|lement)))?|fr|EG|a(ng|cute|rr(tl)?)|rightarrow)|r(s(h|cr|q(uo(r)?|b)|aquo)|h(o(v)?|ar(d|u(l)?))|nmid|c(y|ub|e(il|dil)|aron)|Barr|t(hree|imes|ri(e|f|ltri)?)|i(singdotseq|ng|ght(squigarrow|harpoon(down|up)|threetimes|left(harpoons|arrows)|arrow(tail)?|rightarrows))|Har|o(times|p(f|lus|ar)|a(ng|rr)|brk)|d(sh|ca|quo(r)?|ldhar)|uluhar|p(polint|ar(gt)?)|e(ct|al(s|ine|part)?|g)|f(isht|loor|r)|l(har|arr|m)|a(ng(d|e|le)?|c(ute|e)|t(io(nals)?|ail)|dic|emptyv|quo|rr(sim|hk|c|tl|pl|fs|w|lp|ap|b(fs)?)?)|rarr|x|moust(ache)?|b(arr|r(k(sl(d|u)|e)|ac(e|k))|brk)|A(tail|arr|rr)))
+ | (s(s(cr|tarf|etmn|mile)|h(y|c(hcy|y)|ort(parallel|mid)|arp)|c(sim|y|n(sim|E|ap)|cue|irc|polint|e(dil)?|E|a(p|ron))?|t(ar(f)?|r(ns|aight(phi|epsilon)))|i(gma(v|f)?|m(ne|dot|plus|e(q)?|l(E)?|rarr|g(E)?)?)|zlig|o(pf|ftcy|l(b(ar)?)?)|dot(e|b)?|u(ng|cc(sim|n(sim|eqq|approx)|curlyeq|eq|approx)?|p(s(im|u(p|b)|et(neq(q)?|eq(q)?)?)|hs(ol|ub)|1|n(e|E)|2|d(sub|ot)|3|plus|e(dot)?|E|larr|mult)?|m|b(s(im|u(p|b)|et(neq(q)?|eq(q)?)?)|n(e|E)|dot|plus|e(dot)?|E|rarr|mult)?)|pa(des(uit)?|r)|e(swar|ct|tm(n|inus)|ar(hk|r(ow)?)|xt|mi|Arr)|q(su(p(set(eq)?|e)?|b(set(eq)?|e)?)|c(up(s)?|ap(s)?)|u(f|ar(e|f))?)|fr(own)?|w(nwar|ar(hk|r(ow)?)|Arr)|larr|acute|rarr|m(t(e(s)?)?|i(d|le)|eparsl|a(shp|llsetminus))|bquo)|S(scr|hort(RightArrow|DownArrow|UpArrow|LeftArrow)|c(y|irc|edil|aron)?|tar|igma|H(cy|CHcy)|opf|u(c(hThat|ceeds(SlantEqual|Tilde|Equal)?)|p(set|erset(Equal)?)?|m|b(set(Equal)?)?)|OFTcy|q(uare(Su(perset(Equal)?|bset(Equal)?)|Intersection|Union)?|rt)|fr|acute|mallCircle))
+ | (t(s(hcy|c(y|r)|trok)|h(i(nsp|ck(sim|approx))|orn|e(ta(sym|v)?|re(4|fore))|k(sim|ap))|c(y|edil|aron)|i(nt|lde|mes(d|b(ar)?)?)|o(sa|p(cir|f(ork)?|bot)?|ea)|dot|prime|elrec|fr|w(ixt|ohead(leftarrow|rightarrow))|a(u|rget)|r(i(sb|time|dot|plus|e|angle(down|q|left(eq)?|right(eq)?)?|minus)|pezium|ade)|brk)|T(s(cr|trok)|RADE|h(i(nSpace|ckSpace)|e(ta|refore))|c(y|edil|aron)|S(cy|Hcy)|ilde(Tilde|Equal|FullEqual)?|HORN|opf|fr|a(u|b)|ripleDot))
+ | (u(scr|h(ar(l|r)|blk)|c(y|irc)|t(ilde|dot|ri(f)?)|Har|o(pf|gon)|d(har|arr|blac)|u(arr|ml)|p(si(h|lon)?|harpoon(left|right)|downarrow|uparrows|lus|arrow)|f(isht|r)|wangle|l(c(orn(er)?|rop)|tri)|a(cute|rr)|r(c(orn(er)?|rop)|tri|ing)|grave|m(l|acr)|br(cy|eve)|Arr)|U(scr|n(ion(Plus)?|der(B(ar|rac(e|ket))|Parenthesis))|c(y|irc)|tilde|o(pf|gon)|dblac|uml|p(si(lon)?|downarrow|Tee(Arrow)?|per(RightArrow|LeftArrow)|DownArrow|Equilibrium|arrow|Arrow(Bar|DownArrow)?)|fr|a(cute|rr(ocir)?)|ring|grave|macr|br(cy|eve)))
+ | (v(s(cr|u(pn(e|E)|bn(e|E)))|nsu(p|b)|cy|Bar(v)?|zigzag|opf|dash|prop|e(e(eq|bar)?|llip|r(t|bar))|Dash|fr|ltri|a(ngrt|r(s(igma|u(psetneq(q)?|bsetneq(q)?))|nothing|t(heta|riangle(left|right))|p(hi|i|ropto)|epsilon|kappa|r(ho)?))|rtri|Arr)|V(scr|cy|opf|dash(l)?|e(e|r(yThinSpace|t(ical(Bar|Separator|Tilde|Line))?|bar))|Dash|vdash|fr|bar))
+ | (w(scr|circ|opf|p|e(ierp|d(ge(q)?|bar))|fr|r(eath)?)|W(scr|circ|opf|edge|fr))
+ | (X(scr|i|opf|fr)|x(s(cr|qcup)|h(arr|Arr)|nis|c(irc|up|ap)|i|o(time|dot|p(f|lus))|dtri|u(tri|plus)|vee|fr|wedge|l(arr|Arr)|r(arr|Arr)|map))
+ | (y(scr|c(y|irc)|icy|opf|u(cy|ml)|en|fr|ac(y|ute))|Y(scr|c(y|irc)|opf|uml|Icy|Ucy|fr|acute|Acy))
+ | (z(scr|hcy|c(y|aron)|igrarr|opf|dot|e(ta|etrf)|fr|w(nj|j)|acute)|Z(scr|c(y|aron)|Hcy|opf|dot|e(ta|roWidthSpace)|fr|acute))
+ )
+ (;)
+
+ name
+ constant.character.entity.named.$2.html
+
+
+ captures
+
+ 1
+
+ name
+ punctuation.definition.entity.html
+
+ 3
+
+ name
+ punctuation.definition.entity.html
+
+
+ match
+ (&)#[0-9]+(;)
+ name
+ constant.character.entity.numeric.decimal.html
+
+
+ captures
+
+ 1
+
+ name
+ punctuation.definition.entity.html
+
+ 3
+
+ name
+ punctuation.definition.entity.html
+
+
+ match
+ (&)#[xX][0-9a-fA-F]+(;)
+ name
+ constant.character.entity.numeric.hexadecimal.html
+
+
+ match
+ &(?=[a-zA-Z0-9]+;)
+ name
+ invalid.illegal.ambiguous-ampersand.html
+
+
+
+ math
+
+ patterns
+
+
+ begin
+ (?i)(<)(math)(?=\s|/?>)(?:(([^"'>]|"[^"]*"|'[^']*')*)(>))?
+ beginCaptures
+
+ 0
+
+ name
+ meta.tag.structure.$2.start.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ patterns
+
+
+ include
+ #attribute
+
+
+
+ 5
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ end
+ (?i)(</)(\2)\s*(>)
+ endCaptures
+
+ 0
+
+ name
+ meta.tag.structure.$2.end.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.element.structure.$2.html
+ patterns
+
+
+ begin
+ (?<!>)\G
+ end
+ >
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.structure.start.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ include
+ #tags
+
+
+
+
+ repository
+
+ attribute
+
+ patterns
+
+
+ begin
+ (s(hift|ymmetric|cript(sizemultiplier|level|minsize)|t(ackalign|retchy)|ide|u(pscriptshift|bscriptshift)|e(parator(s)?|lection)|rc)|h(eight|ref)|n(otation|umalign)|c(haralign|olumn(spa(n|cing)|width|lines|align)|lose|rossout)|i(n(dent(shift(first|last)?|target|align(first|last)?)|fixlinebreakstyle)|d)|o(pen|verflow)|d(i(splay(style)?|r)|e(nomalign|cimalpoint|pth))|position|e(dge|qual(columns|rows))|voffset|f(orm|ence|rame(spacing)?)|width|l(space|ine(thickness|leading|break(style|multchar)?)|o(ngdivstyle|cation)|ength|quote|argeop)|a(c(cent(under)?|tiontype)|l(t(text|img(-(height|valign|width))?)|ign(mentscope)?))|r(space|ow(spa(n|cing)|lines|align)|quote)|groupalign|x(link:href|mlns)|m(in(size|labelspacing)|ovablelimits|a(th(size|color|variant|background)|xsize))|bevelled)(?![\w:-])
+ beginCaptures
+
+ 0
+
+ name
+ entity.other.attribute-name.html
+
+
+ end
+ (?=\s*+[^=\s])
+ name
+ meta.attribute.$1.html
+ patterns
+
+
+ include
+ #attribute-interior
+
+
+
+
+ begin
+ ([^\x{0020}"'<>/=\x{0000}-\x{001F}\x{007F}-\x{009F}\x{FDD0}-\x{FDEF}\x{FFFE}\x{FFFF}\x{1FFFE}\x{1FFFF}\x{2FFFE}\x{2FFFF}\x{3FFFE}\x{3FFFF}\x{4FFFE}\x{4FFFF}\x{5FFFE}\x{5FFFF}\x{6FFFE}\x{6FFFF}\x{7FFFE}\x{7FFFF}\x{8FFFE}\x{8FFFF}\x{9FFFE}\x{9FFFF}\x{AFFFE}\x{AFFFF}\x{BFFFE}\x{BFFFF}\x{CFFFE}\x{CFFFF}\x{DFFFE}\x{DFFFF}\x{EFFFE}\x{EFFFF}\x{FFFFE}\x{FFFFF}\x{10FFFE}\x{10FFFF}]+)
+ beginCaptures
+
+ 0
+
+ name
+ entity.other.attribute-name.html
+
+
+ comment
+ Anything else that is valid
+ end
+ (?=\s*+[^=\s])
+ name
+ meta.attribute.unrecognized.$1.html
+ patterns
+
+
+ include
+ #attribute-interior
+
+
+
+
+ match
+ [^\s>]+
+ name
+ invalid.illegal.character-not-allowed-here.html
+
+
+
+ tags
+
+ patterns
+
+
+ include
+ #comment
+
+
+ include
+ #cdata
+
+
+ captures
+
+ 0
+
+ name
+ meta.tag.structure.math.$2.void.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ patterns
+
+
+ include
+ #attribute
+
+
+
+ 5
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ match
+ (?i)(<)(annotation|annotation-xml|semantics|menclose|merror|mfenced|mfrac|mpadded|mphantom|mroot|mrow|msqrt|mstyle|mmultiscripts|mover|mprescripts|msub|msubsup|msup|munder|munderover|none|mlabeledtr|mtable|mtd|mtr|mlongdiv|mscarries|mscarry|msgroup|msline|msrow|mstack|maction)(?=\s|/?>)(?:(([^"'>]|"[^"]*"|'[^']*')*)(/>))
+ name
+ meta.element.structure.math.$2.html
+
+
+ begin
+ (?i)(<)(annotation|annotation-xml|semantics|menclose|merror|mfenced|mfrac|mpadded|mphantom|mroot|mrow|msqrt|mstyle|mmultiscripts|mover|mprescripts|msub|msubsup|msup|munder|munderover|none|mlabeledtr|mtable|mtd|mtr|mlongdiv|mscarries|mscarry|msgroup|msline|msrow|mstack|maction)(?=\s|/?>)(?:(([^"'>]|"[^"]*"|'[^']*')*)(>))?
+ beginCaptures
+
+ 0
+
+ name
+ meta.tag.structure.math.$2.start.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ patterns
+
+
+ include
+ #attribute
+
+
+
+ 5
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ end
+ (?i)(</)(\2)\s*(>)|(/>)|(?=</\w+)
+ endCaptures
+
+ 0
+
+ name
+ meta.tag.structure.math.$2.end.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ name
+ punctuation.definition.tag.end.html
+
+ 4
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.element.structure.math.$2.html
+ patterns
+
+
+ begin
+ (?<!>)\G
+ end
+ (?=/>)|>
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.structure.start.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ include
+ #tags
+
+
+
+
+ captures
+
+ 0
+
+ name
+ meta.tag.inline.math.$2.void.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ patterns
+
+
+ include
+ #attribute
+
+
+
+ 5
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ match
+ (?i)(<)(mi|mn|mo|ms|mspace|mtext|maligngroup|malignmark)(?=\s|/?>)(?:(([^"'>]|"[^"]*"|'[^']*')*)(/>))
+ name
+ meta.element.inline.math.$2.html
+
+
+ begin
+ (?i)(<)(mi|mn|mo|ms|mspace|mtext|maligngroup|malignmark)(?=\s|/?>)(?:(([^"'>]|"[^"]*"|'[^']*')*)(>))?
+ beginCaptures
+
+ 0
+
+ name
+ meta.tag.inline.math.$2.start.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ patterns
+
+
+ include
+ #attribute
+
+
+
+ 5
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ end
+ (?i)(</)(\2)\s*(>)|(/>)|(?=</\w+)
+ endCaptures
+
+ 0
+
+ name
+ meta.tag.inline.math.$2.end.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ name
+ punctuation.definition.tag.end.html
+
+ 4
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.element.inline.math.$2.html
+ patterns
+
+
+ begin
+ (?<!>)\G
+ end
+ (?=/>)|>
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.inline.start.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ include
+ #tags
+
+
+
+
+ captures
+
+ 0
+
+ name
+ meta.tag.object.math.$2.void.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ patterns
+
+
+ include
+ #attribute
+
+
+
+ 5
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ match
+ (?i)(<)(mglyph)(?=\s|/?>)(?:(([^"'>]|"[^"]*"|'[^']*')*)(/>))
+ name
+ meta.element.object.math.$2.html
+
+
+ begin
+ (?i)(<)(mglyph)(?=\s|/?>)(?:(([^"'>]|"[^"]*"|'[^']*')*)(>))?
+ beginCaptures
+
+ 0
+
+ name
+ meta.tag.object.math.$2.start.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ patterns
+
+
+ include
+ #attribute
+
+
+
+ 5
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ end
+ (?i)(</)(\2)\s*(>)|(/>)|(?=</\w+)
+ endCaptures
+
+ 0
+
+ name
+ meta.tag.object.math.$2.end.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ name
+ punctuation.definition.tag.end.html
+
+ 4
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.element.object.math.$2.html
+ patterns
+
+
+ begin
+ (?<!>)\G
+ end
+ (?=/>)|>
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.object.start.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ include
+ #tags
+
+
+
+
+ captures
+
+ 0
+
+ name
+ meta.tag.other.invalid.void.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ name
+ invalid.illegal.unrecognized-tag.html
+
+ 4
+
+ patterns
+
+
+ include
+ #attribute
+
+
+
+ 6
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ match
+ (?i)(<)(([\w:]+))(?=\s|/?>)(?:(([^"'>]|"[^"]*"|'[^']*')*)(/>))
+ name
+ meta.element.other.invalid.html
+
+
+ begin
+ (?i)(<)((\w[^\s>]*))(?=\s|/?>)(?:(([^"'>]|"[^"]*"|'[^']*')*)(>))?
+ beginCaptures
+
+ 0
+
+ name
+ meta.tag.other.invalid.start.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ name
+ invalid.illegal.unrecognized-tag.html
+
+ 4
+
+ patterns
+
+
+ include
+ #attribute
+
+
+
+ 6
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ end
+ (?i)(</)((\2))\s*(>)|(/>)|(?=</\w+)
+ endCaptures
+
+ 0
+
+ name
+ meta.tag.other.invalid.end.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ name
+ invalid.illegal.unrecognized-tag.html
+
+ 4
+
+ name
+ punctuation.definition.tag.end.html
+
+ 5
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.element.other.invalid.html
+ patterns
+
+
+ begin
+ (?<!>)\G
+ end
+ (?=/>)|>
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.other.invalid.start.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ include
+ #tags
+
+
+
+
+ include
+ #tags-invalid
+
+
+
+
+
+ svg
+
+ patterns
+
+
+ begin
+ (?i)(<)(svg)(?=\s|/?>)(?:(([^"'>]|"[^"]*"|'[^']*')*)(>))?
+ beginCaptures
+
+ 0
+
+ name
+ meta.tag.structure.$2.start.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ patterns
+
+
+ include
+ #attribute
+
+
+
+ 5
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ end
+ (?i)(</)(\2)\s*(>)
+ endCaptures
+
+ 0
+
+ name
+ meta.tag.structure.$2.end.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.element.structure.$2.html
+ patterns
+
+
+ begin
+ (?<!>)\G
+ end
+ >
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.structure.start.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ include
+ #tags
+
+
+
+
+ repository
+
+ attribute
+
+ patterns
+
+
+ begin
+ (s(hape-rendering|ystemLanguage|cale|t(yle|itchTiles|op-(color|opacity)|dDeviation|em(h|v)|artOffset|r(i(ng|kethrough-(thickness|position))|oke(-(opacity|dash(offset|array)|width|line(cap|join)|miterlimit))?))|urfaceScale|p(e(cular(Constant|Exponent)|ed)|acing|readMethod)|eed|lope)|h(oriz-(origin-x|adv-x)|eight|anging|ref(lang)?)|y(1|2|ChannelSelector)?|n(umOctaves|ame)|c(y|o(ntentS(criptType|tyleType)|lor(-(interpolation(-filters)?|profile|rendering))?)|ursor|l(ip(-(path|rule)|PathUnits)?|ass)|a(p-height|lcMode)|x)|t(ype|o|ext(-(decoration|anchor|rendering)|Length)|a(rget(X|Y)?|b(index|leValues))|ransform)|i(n(tercept|2)?|d(eographic)?|mage-rendering)|z(oomAndPan)?|o(p(erator|acity)|ver(flow|line-(thickness|position))|ffset|r(i(ent(ation)?|gin)|der))|d(y|i(splay|visor|ffuseConstant|rection)|ominant-baseline|ur|e(scent|celerate)|x)?|u(1|n(i(code(-(range|bidi))?|ts-per-em)|derline-(thickness|position))|2)|p(ing|oint(s(At(X|Y|Z))?|er-events)|a(nose-1|t(h(Length)?|tern(ContentUnits|Transform|Units))|int-order)|r(imitiveUnits|eserveA(spectRatio|lpha)))|e(n(d|able-background)|dgeMode|levation|x(ternalResourcesRequired|ponent))|v(i(sibility|ew(Box|Target))|-(hanging|ideographic|alphabetic|mathematical)|e(ctor-effect|r(sion|t-(origin-(y|x)|adv-y)))|alues)|k(1|2|3|e(y(Splines|Times|Points)|rn(ing|el(Matrix|UnitLength)))|4)?|f(y|il(ter(Res|Units)?|l(-(opacity|rule))?)|o(nt-(s(t(yle|retch)|ize(-adjust)?)|variant|family|weight)|rmat)|lood-(color|opacity)|r(om)?|x)|w(idth(s)?|ord-spacing|riting-mode)|l(i(ghting-color|mitingConeAngle)|ocal|e(ngthAdjust|tter-spacing)|ang)|a(scent|cc(umulate|ent-height)|ttribute(Name|Type)|zimuth|dditive|utoReverse|l(ignment-baseline|phabetic|lowReorder)|rabic-form|mplitude)|r(y|otate|e(s(tart|ult)|ndering-intent|peat(Count|Dur)|quired(Extensions|Features)|f(X|Y|errerPolicy)|l)|adius|x)?|g(1|2|lyph(Ref|-(name|orientation-(horizontal|vertical)))|radient(Transform|Units))|x(1|2|ChannelSelector|-height|link:(show|href|t(ype|itle)|a(ctuate|rcrole)|role)|ml:(space|lang|base))?|m(in|ode|e(thod|dia)|a(sk(ContentUnits|Units)?|thematical|rker(Height|-(start|end|mid)|Units|Width)|x))|b(y|ias|egin|ase(Profile|line-shift|Frequency)|box))(?![\w:-])
+ beginCaptures
+
+ 0
+
+ name
+ entity.other.attribute-name.html
+
+
+ end
+ (?=\s*+[^=\s])
+ name
+ meta.attribute.$1.html
+ patterns
+
+
+ include
+ #attribute-interior
+
+
+
+
+ begin
+ ([^\x{0020}"'<>/=\x{0000}-\x{001F}\x{007F}-\x{009F}\x{FDD0}-\x{FDEF}\x{FFFE}\x{FFFF}\x{1FFFE}\x{1FFFF}\x{2FFFE}\x{2FFFF}\x{3FFFE}\x{3FFFF}\x{4FFFE}\x{4FFFF}\x{5FFFE}\x{5FFFF}\x{6FFFE}\x{6FFFF}\x{7FFFE}\x{7FFFF}\x{8FFFE}\x{8FFFF}\x{9FFFE}\x{9FFFF}\x{AFFFE}\x{AFFFF}\x{BFFFE}\x{BFFFF}\x{CFFFE}\x{CFFFF}\x{DFFFE}\x{DFFFF}\x{EFFFE}\x{EFFFF}\x{FFFFE}\x{FFFFF}\x{10FFFE}\x{10FFFF}]+)
+ beginCaptures
+
+ 0
+
+ name
+ entity.other.attribute-name.html
+
+
+ comment
+ Anything else that is valid
+ end
+ (?=\s*+[^=\s])
+ name
+ meta.attribute.unrecognized.$1.html
+ patterns
+
+
+ include
+ #attribute-interior
+
+
+
+
+ match
+ [^\s>]+
+ name
+ invalid.illegal.character-not-allowed-here.html
+
+
+
+ tags
+
+ patterns
+
+
+ include
+ #comment
+
+
+ include
+ #cdata
+
+
+ captures
+
+ 0
+
+ name
+ meta.tag.metadata.svg.$2.void.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ patterns
+
+
+ include
+ #attribute
+
+
+
+ 5
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ match
+ (?i)(<)(color-profile|desc|metadata|script|style|title)(?=\s|/?>)(?:(([^"'>]|"[^"]*"|'[^']*')*)(/>))
+ name
+ meta.element.metadata.svg.$2.html
+
+
+ begin
+ (?i)(<)(color-profile|desc|metadata|script|style|title)(?=\s|/?>)(?:(([^"'>]|"[^"]*"|'[^']*')*)(>))?
+ beginCaptures
+
+ 0
+
+ name
+ meta.tag.metadata.svg.$2.start.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ patterns
+
+
+ include
+ #attribute
+
+
+
+ 5
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ end
+ (?i)(</)(\2)\s*(>)|(/>)|(?=</\w+)
+ endCaptures
+
+ 0
+
+ name
+ meta.tag.metadata.svg.$2.end.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ name
+ punctuation.definition.tag.end.html
+
+ 4
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.element.metadata.svg.$2.html
+ patterns
+
+
+ begin
+ (?<!>)\G
+ end
+ (?=/>)|>
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.metadata.start.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ include
+ #tags
+
+
+
+
+ captures
+
+ 0
+
+ name
+ meta.tag.structure.svg.$2.void.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ patterns
+
+
+ include
+ #attribute
+
+
+
+ 5
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ match
+ (?i)(<)(animateMotion|clipPath|defs|feComponentTransfer|feDiffuseLighting|feMerge|feSpecularLighting|filter|g|hatch|linearGradient|marker|mask|mesh|meshgradient|meshpatch|meshrow|pattern|radialGradient|switch|text|textPath)(?=\s|/?>)(?:(([^"'>]|"[^"]*"|'[^']*')*)(/>))
+ name
+ meta.element.structure.svg.$2.html
+
+
+ begin
+ (?i)(<)(animateMotion|clipPath|defs|feComponentTransfer|feDiffuseLighting|feMerge|feSpecularLighting|filter|g|hatch|linearGradient|marker|mask|mesh|meshgradient|meshpatch|meshrow|pattern|radialGradient|switch|text|textPath)(?=\s|/?>)(?:(([^"'>]|"[^"]*"|'[^']*')*)(>))?
+ beginCaptures
+
+ 0
+
+ name
+ meta.tag.structure.svg.$2.start.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ patterns
+
+
+ include
+ #attribute
+
+
+
+ 5
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ end
+ (?i)(</)(\2)\s*(>)|(/>)|(?=</\w+)
+ endCaptures
+
+ 0
+
+ name
+ meta.tag.structure.svg.$2.end.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ name
+ punctuation.definition.tag.end.html
+
+ 4
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.element.structure.svg.$2.html
+ patterns
+
+
+ begin
+ (?<!>)\G
+ end
+ (?=/>)|>
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.structure.start.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ include
+ #tags
+
+
+
+
+ captures
+
+ 0
+
+ name
+ meta.tag.inline.svg.$2.void.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ patterns
+
+
+ include
+ #attribute
+
+
+
+ 5
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ match
+ (?i)(<)(a|animate|discard|feBlend|feColorMatrix|feComposite|feConvolveMatrix|feDisplacementMap|feDistantLight|feDropShadow|feFlood|feFuncA|feFuncB|feFuncG|feFuncR|feGaussianBlur|feMergeNode|feMorphology|feOffset|fePointLight|feSpotLight|feTile|feTurbulence|hatchPath|mpath|set|solidcolor|stop|tspan)(?=\s|/?>)(?:(([^"'>]|"[^"]*"|'[^']*')*)(/>))
+ name
+ meta.element.inline.svg.$2.html
+
+
+ begin
+ (?i)(<)(a|animate|discard|feBlend|feColorMatrix|feComposite|feConvolveMatrix|feDisplacementMap|feDistantLight|feDropShadow|feFlood|feFuncA|feFuncB|feFuncG|feFuncR|feGaussianBlur|feMergeNode|feMorphology|feOffset|fePointLight|feSpotLight|feTile|feTurbulence|hatchPath|mpath|set|solidcolor|stop|tspan)(?=\s|/?>)(?:(([^"'>]|"[^"]*"|'[^']*')*)(>))?
+ beginCaptures
+
+ 0
+
+ name
+ meta.tag.inline.svg.$2.start.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ patterns
+
+
+ include
+ #attribute
+
+
+
+ 5
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ end
+ (?i)(</)(\2)\s*(>)|(/>)|(?=</\w+)
+ endCaptures
+
+ 0
+
+ name
+ meta.tag.inline.svg.$2.end.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ name
+ punctuation.definition.tag.end.html
+
+ 4
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.element.inline.svg.$2.html
+ patterns
+
+
+ begin
+ (?<!>)\G
+ end
+ (?=/>)|>
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.inline.start.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ include
+ #tags
+
+
+
+
+ captures
+
+ 0
+
+ name
+ meta.tag.object.svg.$2.void.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ patterns
+
+
+ include
+ #attribute
+
+
+
+ 5
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ match
+ (?i)(<)(circle|ellipse|feImage|foreignObject|image|line|path|polygon|polyline|rect|symbol|use|view)(?=\s|/?>)(?:(([^"'>]|"[^"]*"|'[^']*')*)(/>))
+ name
+ meta.element.object.svg.$2.html
+
+
+ begin
+ (?i)(<)(a|circle|ellipse|feImage|foreignObject|image|line|path|polygon|polyline|rect|symbol|use|view)(?=\s|/?>)(?:(([^"'>]|"[^"]*"|'[^']*')*)(>))?
+ beginCaptures
+
+ 0
+
+ name
+ meta.tag.object.svg.$2.start.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ patterns
+
+
+ include
+ #attribute
+
+
+
+ 5
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ end
+ (?i)(</)(\2)\s*(>)|(/>)|(?=</\w+)
+ endCaptures
+
+ 0
+
+ name
+ meta.tag.object.svg.$2.end.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ name
+ punctuation.definition.tag.end.html
+
+ 4
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.element.object.svg.$2.html
+ patterns
+
+
+ begin
+ (?<!>)\G
+ end
+ (?=/>)|>
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.object.start.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ include
+ #tags
+
+
+
+
+ captures
+
+ 0
+
+ name
+ meta.tag.other.svg.$2.void.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ name
+ invalid.deprecated.html
+
+ 4
+
+ patterns
+
+
+ include
+ #attribute
+
+
+
+ 6
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ match
+ (?i)(<)((altGlyph|altGlyphDef|altGlyphItem|animateColor|animateTransform|cursor|font|font-face|font-face-format|font-face-name|font-face-src|font-face-uri|glyph|glyphRef|hkern|missing-glyph|tref|vkern))(?=\s|/?>)(?:(([^"'>]|"[^"]*"|'[^']*')*)(/>))
+ name
+ meta.element.other.svg.$2.html
+
+
+ begin
+ (?i)(<)((altGlyph|altGlyphDef|altGlyphItem|animateColor|animateTransform|cursor|font|font-face|font-face-format|font-face-name|font-face-src|font-face-uri|glyph|glyphRef|hkern|missing-glyph|tref|vkern))(?=\s|/?>)(?:(([^"'>]|"[^"]*"|'[^']*')*)(>))?
+ beginCaptures
+
+ 0
+
+ name
+ meta.tag.other.svg.$2.start.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ name
+ invalid.deprecated.html
+
+ 4
+
+ patterns
+
+
+ include
+ #attribute
+
+
+
+ 6
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ end
+ (?i)(</)((\2))\s*(>)|(/>)|(?=</\w+)
+ endCaptures
+
+ 0
+
+ name
+ meta.tag.other.svg.$2.end.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ name
+ invalid.deprecated.html
+
+ 4
+
+ name
+ punctuation.definition.tag.end.html
+
+ 5
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.element.other.svg.$2.html
+ patterns
+
+
+ begin
+ (?<!>)\G
+ end
+ (?=/>)|>
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.other.start.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ include
+ #tags
+
+
+
+
+ captures
+
+ 0
+
+ name
+ meta.tag.other.invalid.void.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ name
+ invalid.illegal.unrecognized-tag.html
+
+ 4
+
+ patterns
+
+
+ include
+ #attribute
+
+
+
+ 6
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ match
+ (?i)(<)(([\w:]+))(?=\s|/?>)(?:(([^"'>]|"[^"]*"|'[^']*')*)(/>))
+ name
+ meta.element.other.invalid.html
+
+
+ begin
+ (?i)(<)((\w[^\s>]*))(?=\s|/?>)(?:(([^"'>]|"[^"]*"|'[^']*')*)(>))?
+ beginCaptures
+
+ 0
+
+ name
+ meta.tag.other.invalid.start.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ name
+ invalid.illegal.unrecognized-tag.html
+
+ 4
+
+ patterns
+
+
+ include
+ #attribute
+
+
+
+ 6
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ end
+ (?i)(</)((\2))\s*(>)|(/>)|(?=</\w+)
+ endCaptures
+
+ 0
+
+ name
+ meta.tag.other.invalid.end.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ name
+ invalid.illegal.unrecognized-tag.html
+
+ 4
+
+ name
+ punctuation.definition.tag.end.html
+
+ 5
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.element.other.invalid.html
+ patterns
+
+
+ begin
+ (?<!>)\G
+ end
+ (?=/>)|>
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.other.invalid.start.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ include
+ #tags
+
+
+
+
+ include
+ #tags-invalid
+
+
+
+
+
+ tags-invalid
+
+ patterns
+
+
+ begin
+ (</?)((\w[^\s>]*))(?<!/)
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ name
+ invalid.illegal.unrecognized-tag.html
+
+
+ end
+ ((?: ?/)?>)
+ endCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.other.$2.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+
+ tags-valid
+
+ patterns
+
+
+ begin
+ (^[ \t]+)?(?=<(?i:style)\b(?!-))
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.whitespace.embedded.leading.html
+
+
+ end
+ (?!\G)([ \t]*$\n?)?
+ endCaptures
+
+ 1
+
+ name
+ punctuation.whitespace.embedded.trailing.html
+
+
+ patterns
+
+
+ begin
+ (?i)(<)(style)(?=\s|/?>)
+ beginCaptures
+
+ 0
+
+ name
+ meta.tag.metadata.style.start.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+
+ end
+ (?i)((<)/)(style)\s*(>)
+ endCaptures
+
+ 0
+
+ name
+ meta.tag.metadata.style.end.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ source.css
+
+ 3
+
+ name
+ entity.name.tag.html
+
+ 4
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.embedded.block.html
+ patterns
+
+
+ begin
+ \G
+ captures
+
+ 1
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ end
+ (>)
+ name
+ meta.tag.metadata.style.start.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ begin
+ (?!\G)
+ end
+ (?=</(?i:style))
+ name
+ source.css
+ patterns
+
+
+ include
+ source.css
+
+
+
+
+
+
+
+
+ begin
+ (^[ \t]+)?(?=<(?i:script)\b(?!-))
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.whitespace.embedded.leading.html
+
+
+ end
+ (?!\G)([ \t]*$\n?)?
+ endCaptures
+
+ 1
+
+ name
+ punctuation.whitespace.embedded.trailing.html
+
+
+ patterns
+
+
+ begin
+ (<)((?i:script))\b
+ beginCaptures
+
+ 0
+
+ name
+ meta.tag.metadata.script.start.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+
+ end
+ (/)((?i:script))(>)
+ endCaptures
+
+ 0
+
+ name
+ meta.tag.metadata.script.end.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.embedded.block.html
+ patterns
+
+
+ begin
+ \G
+ end
+ (?=/)
+ patterns
+
+
+ begin
+ (>)
+ beginCaptures
+
+ 0
+
+ name
+ meta.tag.metadata.script.start.html
+
+ 1
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ end
+ ((<))(?=/(?i:script))
+ endCaptures
+
+ 0
+
+ name
+ meta.tag.metadata.script.end.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ source.js
+
+
+ patterns
+
+
+ begin
+ \G
+ end
+ (?=</(?i:script))
+ name
+ source.js
+ patterns
+
+
+ begin
+ (^[ \t]+)?(?=//)
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.whitespace.comment.leading.js
+
+
+ end
+ (?!\G)
+ patterns
+
+
+ begin
+ //
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.comment.js
+
+
+ end
+ (?=</script)|\n
+ name
+ comment.line.double-slash.js
+
+
+
+
+ begin
+ /\*
+ captures
+
+ 0
+
+ name
+ punctuation.definition.comment.js
+
+
+ end
+ \*/|(?=</script)
+ name
+ comment.block.js
+
+
+ include
+ source.js
+
+
+
+
+
+
+ begin
+ \G
+ end
+ (?ix:
+ (?=> # Tag without type attribute
+ | type(?=[\s=])
+ (?!\s*=\s*
+ (
+ '' # Empty
+ | "" # Values
+ | ('|"|)
+ (
+ text/ # Text mime-types
+ (
+ javascript(1\.[0-5])?
+ | x-javascript
+ | jscript
+ | livescript
+ | (x-)?ecmascript
+ | babel # Javascript variant currently
+ # recognized as such
+ )
+ | application/ # Application mime-types
+ (
+ (x-)?javascript
+ | (x-)?ecmascript
+ )
+ | module
+ )
+ [\s"'>]
+ )
+ )
+ )
+ )
+ name
+ meta.tag.metadata.script.start.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ begin
+ (?ix:
+ (?=
+ type\s*=\s*
+ ('|"|)
+ text/
+ (
+ x-handlebars
+ | (x-(handlebars-)?|ng-)?template
+ | html
+ )
+ [\s"'>]
+ )
+ )
+ end
+ ((<))(?=/(?i:script))
+ endCaptures
+
+ 0
+
+ name
+ meta.tag.metadata.script.end.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ text.html.basic
+
+
+ patterns
+
+
+ begin
+ \G
+ end
+ (>)
+ endCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.metadata.script.start.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ begin
+ (?!\G)
+ end
+ (?=</(?i:script))
+ name
+ text.html.basic
+ patterns
+
+
+ include
+ text.html.basic
+
+
+
+
+
+
+ begin
+ (?=(?i:type))
+ end
+ (<)(?=/(?i:script))
+ endCaptures
+
+ 0
+
+ name
+ meta.tag.metadata.script.end.html
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+
+ patterns
+
+
+ begin
+ \G
+ end
+ (>)
+ endCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.metadata.script.start.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ begin
+ (?!\G)
+ end
+ (?=</(?i:script))
+ name
+ source.unknown
+
+
+
+
+
+
+
+
+
+
+ begin
+ (?i)(<)(base|link|meta)(?=\s|/?>)
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+
+ end
+ /?>
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.metadata.$2.void.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ begin
+ (?i)(<)(noscript|title)(?=\s|/?>)
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+
+ end
+ >
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.metadata.$2.start.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ begin
+ (?i)(</)(noscript|title)(?=\s|/?>)
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+
+ end
+ >
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.metadata.$2.end.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ begin
+ (?i)(<)(col|hr|input)(?=\s|/?>)
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+
+ end
+ /?>
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.structure.$2.void.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ begin
+ (?i)(<)(address|article|aside|blockquote|body|button|caption|colgroup|datalist|dd|details|dialog|div|dl|dt|fieldset|figcaption|figure|footer|form|head|header|hgroup|html|h[1-6]|label|legend|li|main|map|menu|meter|nav|ol|optgroup|option|output|p|pre|progress|section|select|slot|summary|table|tbody|td|template|textarea|tfoot|th|thead|tr|ul)(?=\s|/?>)
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+
+ end
+ >
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.structure.$2.start.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ begin
+ (?i)(</)(address|article|aside|blockquote|body|button|caption|colgroup|datalist|dd|details|dialog|div|dl|dt|fieldset|figcaption|figure|footer|form|head|header|hgroup|html|h[1-6]|label|legend|li|main|map|menu|meter|nav|ol|optgroup|option|output|p|pre|progress|section|select|slot|summary|table|tbody|td|template|textarea|tfoot|th|thead|tr|ul)(?=\s|/?>)
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+
+ end
+ >
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.structure.$2.end.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ begin
+ (?i)(<)(area|br|wbr)(?=\s|/?>)
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+
+ end
+ /?>
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.inline.$2.void.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ begin
+ (?i)(<)(a|abbr|b|bdi|bdo|cite|code|data|del|dfn|em|i|ins|kbd|mark|q|rp|rt|ruby|s|samp|small|span|strong|sub|sup|time|u|var)(?=\s|/?>)
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+
+ end
+ >
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.inline.$2.start.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ begin
+ (?i)(</)(a|abbr|b|bdi|bdo|cite|code|data|del|dfn|em|i|ins|kbd|mark|q|rp|rt|ruby|s|samp|small|span|strong|sub|sup|time|u|var)(?=\s|/?>)
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+
+ end
+ >
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.inline.$2.end.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ begin
+ (?i)(<)(embed|img|param|source|track)(?=\s|/?>)
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+
+ end
+ /?>
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.object.$2.void.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ begin
+ (?i)(<)(audio|canvas|iframe|object|picture|video)(?=\s|/?>)
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+
+ end
+ >
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.object.$2.start.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ begin
+ (?i)(</)(audio|canvas|iframe|object|picture|video)(?=\s|/?>)
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+
+ end
+ >
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.object.$2.end.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ begin
+ (?i)(<)((basefont|isindex))(?=\s|/?>)
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ name
+ invalid.deprecated.html
+
+
+ end
+ /?>
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.metadata.$2.void.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ begin
+ (?i)(<)((center|frameset|noembed|noframes))(?=\s|/?>)
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ name
+ invalid.deprecated.html
+
+
+ end
+ >
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.structure.$2.start.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ begin
+ (?i)(</)((center|frameset|noembed|noframes))(?=\s|/?>)
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ name
+ invalid.deprecated.html
+
+
+ end
+ >
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.structure.$2.end.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ begin
+ (?i)(<)((acronym|big|blink|font|strike|tt|xmp))(?=\s|/?>)
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ name
+ invalid.deprecated.html
+
+
+ end
+ >
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.inline.$2.start.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ begin
+ (?i)(</)((acronym|big|blink|font|strike|tt|xmp))(?=\s|/?>)
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ name
+ invalid.deprecated.html
+
+
+ end
+ >
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.inline.$2.end.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ begin
+ (?i)(<)((frame))(?=\s|/?>)
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ name
+ invalid.deprecated.html
+
+
+ end
+ /?>
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.object.$2.void.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ begin
+ (?i)(<)((applet))(?=\s|/?>)
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ name
+ invalid.deprecated.html
+
+
+ end
+ >
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.object.$2.start.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ begin
+ (?i)(</)((applet))(?=\s|/?>)
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ name
+ invalid.deprecated.html
+
+
+ end
+ >
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.object.$2.end.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ begin
+ (?i)(<)((dir|keygen|listing|menuitem|plaintext|spacer))(?=\s|/?>)
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ name
+ invalid.illegal.no-longer-supported.html
+
+
+ end
+ >
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.other.$2.start.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ begin
+ (?i)(</)((dir|keygen|listing|menuitem|plaintext|spacer))(?=\s|/?>)
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+ 3
+
+ name
+ invalid.illegal.no-longer-supported.html
+
+
+ end
+ >
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.other.$2.end.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ include
+ #math
+
+
+ include
+ #svg
+
+
+ begin
+ (<)([a-zA-Z][.0-9_a-zA-Z\x{00B7}\x{00C0}-\x{00D6}\x{00D8}-\x{00F6}\x{00F8}-\x{037D}\x{037F}-\x{1FFF}\x{200C}-\x{200D}\x{203F}-\x{2040}\x{2070}-\x{218F}\x{2C00}-\x{2FEF}\x{3001}-\x{D7FF}\x{F900}-\x{FDCF}\x{FDF0}-\x{FFFD}\x{10000}-\x{EFFFF}]*-[\-.0-9_a-zA-Z\x{00B7}\x{00C0}-\x{00D6}\x{00D8}-\x{00F6}\x{00F8}-\x{037D}\x{037F}-\x{1FFF}\x{200C}-\x{200D}\x{203F}-\x{2040}\x{2070}-\x{218F}\x{2C00}-\x{2FEF}\x{3001}-\x{D7FF}\x{F900}-\x{FDCF}\x{FDF0}-\x{FFFD}\x{10000}-\x{EFFFF}]*)(?=\s|/?>)
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+
+ end
+ /?>
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.custom.start.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ begin
+ (</)([a-zA-Z][.0-9_a-zA-Z\x{00B7}\x{00C0}-\x{00D6}\x{00D8}-\x{00F6}\x{00F8}-\x{037D}\x{037F}-\x{1FFF}\x{200C}-\x{200D}\x{203F}-\x{2040}\x{2070}-\x{218F}\x{2C00}-\x{2FEF}\x{3001}-\x{D7FF}\x{F900}-\x{FDCF}\x{FDF0}-\x{FFFD}\x{10000}-\x{EFFFF}]*-[\-.0-9_a-zA-Z\x{00B7}\x{00C0}-\x{00D6}\x{00D8}-\x{00F6}\x{00F8}-\x{037D}\x{037F}-\x{1FFF}\x{200C}-\x{200D}\x{203F}-\x{2040}\x{2070}-\x{218F}\x{2C00}-\x{2FEF}\x{3001}-\x{D7FF}\x{F900}-\x{FDCF}\x{FDF0}-\x{FFFD}\x{10000}-\x{EFFFF}]*)(?=\s|/?>)
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+
+ end
+ >
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.html
+
+
+ name
+ meta.tag.custom.end.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+
+ xml-processing
+
+ begin
+ (<\?)(xml)
+ captures
+
+ 1
+
+ name
+ punctuation.definition.tag.html
+
+ 2
+
+ name
+ entity.name.tag.html
+
+
+ end
+ (\?>)
+ name
+ meta.tag.metadata.processing.xml.html
+ patterns
+
+
+ include
+ #attribute
+
+
+
+
+ scopeName
+ text.html.basic
+ uuid
+ 17994EC8-6B1D-11D9-AC3A-000D93589AF6
+
+
diff --git a/src/file-viewer/highlight-grammar/js.plist b/src/file-viewer/highlight-grammar/js.plist
new file mode 100644
index 0000000000000000000000000000000000000000..3f591432c514d5932fae2099649d6f94965bf17c
--- /dev/null
+++ b/src/file-viewer/highlight-grammar/js.plist
@@ -0,0 +1,9858 @@
+
+
+
+
+ name
+ JavaScript
+ scopeName
+ source.js
+ 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
+
+
+
+
+
+
+
+
diff --git a/src/file-viewer/highlight-grammar/jsx.plist b/src/file-viewer/highlight-grammar/jsx.plist
new file mode 100644
index 0000000000000000000000000000000000000000..d58ca5978bd414060cce379de8a1af72f6c8849e
--- /dev/null
+++ b/src/file-viewer/highlight-grammar/jsx.plist
@@ -0,0 +1,10281 @@
+
+
+
+
+ name
+ JavaScriptReact
+ scopeName
+ source.jsx
+ 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+
+
+
+
+
diff --git a/src/file-viewer/highlight.ts b/src/file-viewer/highlight.ts
index f565051e368febca3ba819694e38723e33ca35c4..87d66eb793e92c6b688e2202ac83b7e9872199fa 100644
--- a/src/file-viewer/highlight.ts
+++ b/src/file-viewer/highlight.ts
@@ -1,23 +1,27 @@
const languages = [
- "ts",
- "tsx",
- "zig",
- "json",
- "css",
"astro",
- "mdx",
- "lua",
- "shell",
+ "css",
+ "diff",
"dosbatch",
+ "html",
+ "js",
+ "json",
+ "jsx",
+ "lua",
+ "mdx",
+ "php",
"powershell",
- "yaml",
+ "python",
+ "shell",
"toml",
+ "ts",
+ "tsx",
"xml",
- "python",
- "php",
- "diff",
+ "yaml",
+ "zig",
] as const;
const altScopes: Record = {
+ html: "text.html.basic",
astro: "text.html.astro",
xml: "text.xml",
php: "text.html.php",
@@ -25,6 +29,11 @@ const altScopes: Record = {
export type Language = (typeof languages)[number];
const scopes = [
+ // HTML
+ ["meta.tag.metadata.doctype.html", "builtin"],
+ ["meta.tag.structure", "keyword"],
+ ["meta.tag.metadata.script", "keyword"],
+
// CSS
["punctuation.definition.keyword", "keyword", "css"],
["entity.name.tag.css", "class", "css"],
@@ -59,6 +68,7 @@ const scopes = [
["keyword", "keyword"],
["variable.parameter", "parameter"],
["entity.name.function", "method"],
+ ["support.class.component", "method"],
["support.type.primitive", "builtin"],
["entity.name.type", "class"],
["support.type", "class"],
@@ -68,7 +78,11 @@ const scopes = [
["support.constant", "constant"],
["meta.parameters", "parameter"],
["support.function", "method"],
+ ["entity.name.tag", "builtin"],
["variable", "variable"],
+ ["meta.tag.attributes", "property"],
+ ["punctuation.definition.tag.begin.tsx", "keyword"],
+ ["punctuation.definition.tag.end.tsx", "keyword"],
["punctuation", null],
["meta.function-call", "method"],
] as const;
@@ -146,7 +160,11 @@ export const getRegistry = async.once(async () => {
}),
loadGrammar: async (scopeName: string) => {
for (const lang of languages) {
- if (scopeName.endsWith(`.${lang}`)) {
+ if (
+ altScopes[lang]
+ ? scopeName === altScopes[lang]
+ : scopeName.endsWith(`.${lang}`)
+ ) {
const file = await fs.readFile(
path.join(import.meta.dirname, `highlight-grammar/${lang}.plist`),
"utf-8",
@@ -177,21 +195,26 @@ export async function highlightCode(code: string, language: Language) {
return html;
}
-export async function main() {
- // validate exts
- for (const ext of languages) {
- if (
- !fs.existsSync(
- path.join(import.meta.dirname, `highlight-grammar/${ext}.plist`),
- )
- ) {
- console.error(`Missing grammar for ${ext}`);
- }
- // Sanity check
- await highlightCode("wwwwwwwwwwwaaaaaaaaaaaaaaaa", ext);
- }
-}
-
+// export async function main() {
+// validate exts
+// for (const ext of languages) {
+// if (
+// !fs.existsSync(
+// path.join(import.meta.dirname, `highlight-grammar/${ext}.plist`),
+// )
+// ) {
+// console.error(`Missing grammar for ${ext}`);
+// }
+// // Sanity check
+// await highlightCode("wwwwwwwwwwwaaaaaaaaaaaaaaaa", ext);
+// }
+// }
+//
+// await highlightCode(
+// `return snow! `,
+// "tsx",
+// );
+//
import * as async from "lib/async.ts";
import * as fs from "#sitegen/fs";
import * as path from "node:path";
diff --git a/src/global.css b/src/global.css
index d25b9e4bc8575114af6fa38f3f320499a9ff7eb2..01a573a230fc25d3bd484059f3c04442b7472638 100644
--- a/src/global.css
+++ b/src/global.css
@@ -40,6 +40,15 @@
U+2194-2199,
U+0100-017F;
}
+@font-face {
+ font-family: "recu";
+ src: url("/recthin.woff2") format("woff2");
+ font-weight: 350;
+ font-style: normal;
+ font-display: swap;
+ font-variation-settings: "CASL" 0.25, "MONO" 0;
+ unicode-range: U+0020-007E;
+}
*,
::before,
diff --git a/src/package-lib.ts b/src/package-lib.ts
deleted file mode 100644
index b26cde479d91bcbcb1e0ebf7d9009b7a1b0dc313..0000000000000000000000000000000000000000
--- a/src/package-lib.ts
+++ /dev/null
@@ -1,226 +0,0 @@
-export async function updateJsrPackageExportsToAll(
- absPath: string,
- p: progress.Ref,
-) {
- using _ = p.start("update deno.json");
- const manifestPath = path.join(absPath, "deno.json");
- const deno = JSON.parse(
- await fs.readFile(manifestPath, "utf-8"),
- );
- const newExports: Record = {};
- for (const subPath of await fs.readdir(absPath, { recursive: true })) {
- if (!subPath.match(/\.tsx?$/)) continue;
- if (subPath.match(/\.(test|sample)\.tsx?$/)) continue;
- if (subPath.startsWith("dist")) continue;
- newExports["./" + subPath] = "./" + subPath;
- }
- deno.exports = Object.fromEntries(
- Object.entries(newExports).sort(([a], [b]) => a.localeCompare(b)),
- ) as typeof deno.exports;
- await fs.writeFile(manifestPath, JSON.stringify(deno, null, 2));
-}
-
-export async function transpileForNpm(
- absPath: string,
- p: progress.Ref,
- packageJson: Record,
-) {
- using node = p.start("transpile into js for npm");
- const manifestPath = path.join(absPath, "deno.json");
- const deno = JSON.parse(
- await fs.readFile(manifestPath, "utf-8"),
- );
- const distPath = path.join(absPath, "dist-npm");
- await fs.rm(distPath, { recursive: true, force: true });
- await fs.mkdir(distPath, { recursive: true });
-
- const files: string[] = [];
- const exports: Record = {};
- for (const subPath of await fs.readdir(absPath, { recursive: true })) {
- if (!subPath.match(/\.tsx?$/)) continue;
- if (subPath.startsWith("dist")) continue;
- files.push(subPath);
- }
- const tsFiles: string[] = [];
- for (const subPath of files) {
- using _ = node.start(subPath);
- const targetSubPath = subPath.replace(/\.tsx?$/, ".js");
- if (!subPath.match(/\.(test|sample)\.tsx?$/)) {
- exports["./" + subPath] = "./" + targetSubPath;
- }
- const out = path.join(distPath, subPath);
- await fs.mkdir(path.dirname(out), { recursive: true });
- tsFiles.push(out);
-
- let code = await fs.readFile(path.join(absPath, subPath), "utf-8");
- code = code.replace(
- / from "lib\/([^"]+)"/g,
- (_, src) => {
- return ' from "./' + path.relative(
- path.dirname(subPath),
- src.replace(/\.tsx?$/, ".js"),
- ) + '"';
- },
- );
- await fs.writeFile(out, code);
- }
- await subprocess.spawnAndWait({
- cmd: [
- "npx",
- "tsc",
- "--outdir",
- distPath,
- "--sourceMap",
- "--declarationMap",
- "--declaration",
- "--module",
- "nodenext",
- "--lib",
- "esnext",
- "--skipLibCheck",
- "--jsx",
- "react-jsx",
- "--jsxImportSource",
- "./lib/dist-npm/render",
- "--target",
- "esnext",
- "--isolatedModules",
- "--verbatimModuleSyntax",
- "--allowSyntheticDefaultImports",
- "--moduleResolution",
- "nodenext",
- ...tsFiles,
- ],
- });
- await fs.writeFile(
- path.join(distPath, "readme.md"),
- (await fs.readFile(path.join(absPath, "readme.md"), "utf-8")).replace(
- "\n",
- await fs.readFile(path.join(absPath, "readme.npm.md"), "utf-8"),
- ),
- ).catch((e) => {
- if (e.code !== "ENOENT") throw e;
- });
- await fs.cp(
- path.join(absPath, "readme.changes.md"),
- path.join(distPath, "readme.changes.md"),
- ).catch((e) => {
- if (e.code !== "ENOENT") throw e;
- });
- const { name, description, ...rest } = packageJson;
- await fs.writeFile(
- path.join(distPath, "package.json"),
- JSON.stringify(
- {
- name,
- description,
- version: deno.version,
- type: "module",
- exports,
- ...rest,
- },
- null,
- 2,
- ),
- );
-}
-
-// TODO: failed experiment
-//
-// export async function transpileForNpm(
-// absPath: string,
-// p: progress.Ref,
-// packageJson: Record,
-// ) {
-// const { transpileFile } = await import("ts-to-jsdoc") as TsToJsdoc;
-//
-// using node = p.start("transpile into jsdoc for npm");
-// const manifestPath = path.join(absPath, "deno.json");
-// const deno = JSON.parse(
-// await fs.readFile(manifestPath, "utf-8"),
-// );
-// const distPath = path.join(absPath, "dist-npm");
-// await fs.rm(distPath, { recursive: true, force: true });
-// await fs.mkdir(distPath, { recursive: true });
-//
-// const files: string[] = [];
-// const exports: Record = {};
-// for (const subPath of await fs.readdir(absPath, { recursive: true })) {
-// if (!subPath.match(/\.tsx?$/)) continue;
-// if (subPath.startsWith("dist")) continue;
-// files.push(subPath);
-// }
-// node.estimate = Object.keys(exports).length;
-// for (const subPath of files) {
-// using _ = node.start(subPath);
-// const targetSubPath = subPath.replace(/\.tsx?$/, ".js");
-// if (!subPath.match(/\.(test|sample)\.tsx?$/)) {
-// exports["./" + subPath] = "./" + targetSubPath;
-// }
-//
-// let code = transpileFile({
-// code: await fs.readFile(path.join(absPath, subPath), "utf-8"),
-// });
-// code = code.replace(
-// / from "lib\/([^"]+)"/g,
-// (_, src) => {
-// return ' from "./' + path.relative(
-// path.dirname(subPath),
-// src.replace(/\.tsx?$/, ".js"),
-// ) + '"';
-// },
-// );
-// if (packageJson.homepage) {
-// code =
-// "// This file is transpiled from TypeScript from paper clover's sitegen\n" +
-// "// " + packageJson.homepage + "/" + subPath + "\n" +
-// code;
-// }
-// const out = path.join(distPath, targetSubPath);
-// await fs.mkdir(path.dirname(out), { recursive: true });
-// await fs.writeFile(out, code);
-// node.value += 1;
-// }
-// await fs.cp(
-// path.join(absPath, "readme.npm.md"),
-// path.join(distPath, "readme.md"),
-// ).catch((e) => {
-// if (e.code !== "ENOENT") throw e;
-// });
-// await fs.cp(
-// path.join(absPath, "readme.changes.md"),
-// path.join(distPath, "readme.changes.md"),
-// ).catch((e) => {
-// if (e.code !== "ENOENT") throw e;
-// });
-// const { name, description, ...rest } = packageJson;
-// await fs.writeFile(
-// path.join(distPath, "package.json"),
-// JSON.stringify({
-// name,
-// description,
-// version: deno.version,
-// type: "module",
-// ...rest,
-// }),
-// );
-// }
-//
-export function main() {
- const main = path.resolve("lib");
- updateJsrPackageExportsToAll(main, progress)
- .then(() =>
- transpileForNpm(main, progress, {
- name: "@paperclover/lib",
- description: "high quality typescript libraries",
- homepage:
- "https://git.paperclover.net/clo/sitegen/src/branch/master/lib",
- })
- );
-}
-
-import * as progress from "lib/progress.ts";
-import * as path from "node:path";
-import * as fs from "node:fs/promises";
-import * as subprocess from "lib/subprocess.ts";
-import { UNWRAP } from "lib/assert.ts";
diff --git a/src/pages/index.marko b/src/pages/index.marko
index 96abbf4f00e9e8087622fa5534e23a34f82d27b2..bb1441491cd7a44a0253d32cdd3cd01544b2c1e2 100644
--- a/src/pages/index.marko
+++ b/src/pages/index.marko
@@ -14,6 +14,7 @@ export const meta = {
posts
+
blog: Everyone Hates Next.js (2025-10-21)
song: in the summer (2025-08-08)
song: waterfalls (2025-01-01)
things
diff --git a/src/site.ts b/src/site.ts
index cdc413784402be9e194d4c91872b25e69de45ac1..c26e71738002705d22abb855c7d4c3386c0a969e 100644
--- a/src/site.ts
+++ b/src/site.ts
@@ -10,7 +10,7 @@ export const siteSections: sg.Section[] = [
{ root: join("q+a/") },
{ root: join("file-viewer/") },
{ root: join("friends/") },
- // { root: join("blog/"), pageBase: "/blog" },
+ { root: join("blog/"), base: "/blog" },
// { root: join("fiction/"), pageBase: "/fiction" },
];
@@ -55,6 +55,11 @@ const recursiveVarsQuestion: sg.FontVars = {
MONO: [0, 1],
WGHT: [400, 800],
};
+const recursiveVarsThin: sg.FontVars = {
+ ...recursiveVars,
+ MONO: [0, 1],
+ WGHT: 350,
+};
const layoutFeatures = ["numr", "dnom", "frac"];
export const fonts: sg.Font[] = [
{
@@ -86,6 +91,16 @@ export const fonts: sg.Font[] = [
vars: recursiveVarsQuestion,
unicodes: nonAscii,
},
+ {
+ asset: "/recthin.[ext]",
+ vars: recursiveVarsThin,
+ unicodes: ascii,
+ },
+ {
+ asset: "/recthin2.[ext]",
+ vars: recursiveVarsThin,
+ unicodes: nonAscii,
+ },
],
},
{
diff --git a/src/source-of-truth.ts b/src/source-of-truth.ts
index 5f9e3c92d0c4a2fdef482998a335121637bc65b6..69a9eb84ba5d480ece36f44fa42c107f9ee97e8a 100644
--- a/src/source-of-truth.ts
+++ b/src/source-of-truth.ts
@@ -72,7 +72,7 @@ app.get("/file/*", async (c) => {
if (err.code === "ENOENT") return c.notFound();
throw err;
}
- c.header("Content-Length", (await fstat(handle.fd)).size);
+ c.header("Content-Length", (await fstat(handle.fd)).size.toString());
const nodeStream = fs.createReadStream(fullPath, {
fd: handle.fd,
fs: {
@@ -113,4 +113,4 @@ import * as util from "node:util";
import * as stream from "node:stream";
import * as mime from "lib/mime.ts";
import { derivedFileRoot, rawFileRoot } from "./file-viewer/paths.ts";
-import { ASSERT } from "lib/assert.ts";
+import { ASSERT, UNWRAP } from "lib/assert.ts";
diff --git a/src/static/open-graph/everyone-hates-nextjs.png b/src/static/open-graph/everyone-hates-nextjs.png
new file mode 100755
index 0000000000000000000000000000000000000000..aec17de48b7c4be227033d538d94fd91ff1699c7
Binary files /dev/null and b/src/static/open-graph/everyone-hates-nextjs.png differ
diff --git a/src/static/open-graph/readme.txt b/src/static/open-graph/readme.txt
new file mode 100644
index 0000000000000000000000000000000000000000..9c393de51fd1d47b1ad205097ed8f3debfd2f0c4
--- /dev/null
+++ b/src/static/open-graph/readme.txt
@@ -0,0 +1,2 @@
+this directory is not under the paper clover media license,
+therefore is allowed to be downloaded and redistributed by bots.
diff --git a/src/web.dockerfile b/src/web.dockerfile
index 03c3a6cf0b6aa453142c74efc49d47f8412949f1..e696a96925ed73aea3bbbbf0d4e4101f9e06b5ba 100644
--- a/src/web.dockerfile
+++ b/src/web.dockerfile
@@ -1,3 +1,4 @@
+# this is an example dockerfile. paper clover does not use this currently.
from node:24 as builder
run apt install -y git