nuxt-ignis 0.5.0-rc.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.data/content/contents.sqlite +0 -0
- package/.nuxt/components.d.ts +402 -208
- package/.nuxt/content/components.ts +201 -104
- package/.nuxt/dev/index.mjs +1041 -712
- package/.nuxt/dev/index.mjs.map +1 -1
- package/.nuxt/dist/server/client.manifest.mjs +1 -18
- package/.nuxt/dist/server/client.precomputed.mjs +1 -0
- package/.nuxt/eslint-typegen.d.ts +56 -2
- package/.nuxt/eslint.config.d.mts +2 -2
- package/.nuxt/eslint.config.mjs +10 -10
- package/.nuxt/imports.d.ts +63 -59
- package/.nuxt/manifest/latest.json +1 -1
- package/.nuxt/manifest/meta/dev.json +1 -1
- package/.nuxt/mdc-highlighter.mjs +4 -0
- package/.nuxt/mdc-image-component.mjs +1 -1
- package/.nuxt/module/nuxt-robots.d.ts +12 -12
- package/.nuxt/module/nuxt-seo-utils.d.ts +10 -10
- package/.nuxt/module/nuxt-site-config.d.ts +8 -8
- package/.nuxt/module/nuxt-sitemap.d.ts +17 -17
- package/.nuxt/nitro.json +4 -4
- package/.nuxt/nuxt.d.ts +10 -9
- package/.nuxt/nuxt.json +2 -2
- package/.nuxt/nuxt.node.d.ts +11 -8
- package/.nuxt/tsconfig.app.json +191 -191
- package/.nuxt/tsconfig.json +194 -194
- package/.nuxt/tsconfig.node.json +105 -105
- package/.nuxt/tsconfig.server.json +128 -128
- package/.nuxt/tsconfig.shared.json +55 -55
- package/.nuxt/types/build.d.ts +2 -1
- package/.nuxt/types/components.d.ts +402 -208
- package/.nuxt/types/i18n-plugin.d.ts +2 -2
- package/.nuxt/types/imports.d.ts +348 -342
- package/.nuxt/types/modules.d.ts +16 -16
- package/.nuxt/types/nitro-imports.d.ts +68 -68
- package/.nuxt/types/nitro-nuxt.d.ts +1 -0
- package/.nuxt/types/nitro-routes.d.ts +20 -20
- package/.nuxt/types/plugins.d.ts +37 -37
- package/.nuxt/types/ui.d.ts +3 -3
- package/.nuxt/ui/drawer.ts +23 -0
- package/.nuxt/ui/progress.ts +3 -3
- package/.nuxt/ui-image-component.ts +1 -1
- package/.output/nitro.json +3 -3
- package/.output/public/_nuxt/0gZNo08M.js +1 -0
- package/.output/public/_nuxt/4etphg87.js +1 -0
- package/.output/public/_nuxt/7oEH3i-J.js +1 -0
- package/.output/public/_nuxt/B0GskE-x.js +1 -0
- package/.output/public/_nuxt/B2rRIZLd.js +1 -0
- package/.output/public/_nuxt/B3Twp4np.js +1 -0
- package/.output/public/_nuxt/B4dafB1u.js +1 -0
- package/.output/public/_nuxt/B5v-AhRa.js +1 -0
- package/.output/public/_nuxt/BGIWR6zS.js +1 -0
- package/.output/public/_nuxt/BPF61Z69.js +1 -0
- package/.output/public/_nuxt/BX7sSsxl.js +1 -0
- package/.output/public/_nuxt/BcGXkrpD.js +1 -0
- package/.output/public/_nuxt/Bdmjn2k2.js +1 -0
- package/.output/public/_nuxt/BkwIJBVH.js +1 -0
- package/.output/public/_nuxt/{aetvq4w9.js → Bs7HqoDE.js} +9 -12
- package/.output/public/_nuxt/BxBcowlq.js +1 -0
- package/.output/public/_nuxt/BxjWLNqQ.js +1 -0
- package/.output/public/_nuxt/CJT046op.js +1 -0
- package/.output/public/_nuxt/CNoaFijS.js +1 -0
- package/.output/public/_nuxt/COOHDsMA.js +1 -0
- package/.output/public/_nuxt/CT_jQ1c7.js +1 -0
- package/.output/public/_nuxt/CzjEkwvT.js +1 -0
- package/.output/public/_nuxt/D0gc1iwv.js +35 -0
- package/.output/public/_nuxt/DHbdVh9f.js +94 -0
- package/.output/public/_nuxt/DPk_8xPF.js +1 -0
- package/.output/public/_nuxt/DS02jnv_.js +1 -0
- package/.output/public/_nuxt/DcZxay5W.js +1 -0
- package/.output/public/_nuxt/Dj4M1E-R.js +1 -0
- package/.output/public/_nuxt/DrlW3O6H.js +1 -0
- package/.output/public/_nuxt/DzHDVFEa.js +1 -0
- package/.output/public/_nuxt/Kgt6q5rz.js +1 -0
- package/.output/public/_nuxt/_RaG-8ca.js +1 -0
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/458d3dfb-5eef-4d52-b92b-109ceaa7a1ab.json +1 -0
- package/.output/public/_nuxt/entry.CtpkPzPO.css +1 -0
- package/.output/public/_nuxt/error-404.DzDu4Ean.css +1 -0
- package/.output/public/_nuxt/error-500.BdNqqJx7.css +1 -0
- package/.output/public/_nuxt/nE6m0q_v.js +1 -0
- package/.output/public/_nuxt/vueform.CkWb7x1C.css +1 -0
- package/.output/public/_nuxt/wTHp3vgs.js +1 -0
- package/.output/public/_nuxt/zBYuFSAQ.js +1 -0
- package/.output/server/chunks/_/error-500.mjs +1 -1
- package/.output/server/chunks/_/error-500.mjs.map +1 -1
- package/.output/server/chunks/_/nitro.mjs +551 -626
- package/.output/server/chunks/_/nitro.mjs.map +1 -1
- package/.output/server/chunks/build/client.precomputed.mjs +4 -0
- package/.output/server/chunks/build/client.precomputed.mjs.map +1 -0
- package/.output/server/chunks/routes/renderer.mjs +10 -33
- package/.output/server/chunks/routes/renderer.mjs.map +1 -1
- package/.output/server/index.mjs.map +1 -1
- package/.output/server/node_modules/@babel/parser/lib/index.js +212 -145
- package/.output/server/node_modules/@babel/parser/package.json +3 -3
- package/.output/server/node_modules/@poppinss/utils/package.json +1 -1
- package/.output/server/node_modules/@shikijs/core/package.json +2 -2
- package/.output/server/node_modules/@shikijs/engine-javascript/package.json +2 -2
- package/.output/server/node_modules/@shikijs/engine-oniguruma/package.json +2 -2
- package/.output/server/node_modules/@shikijs/langs/dist/javascript.mjs +1 -1
- package/.output/server/node_modules/@shikijs/langs/dist/typescript.mjs +1 -1
- package/.output/server/node_modules/@shikijs/langs/package.json +11 -3
- package/.output/server/node_modules/@shikijs/themes/package.json +3 -3
- package/.output/server/node_modules/@shikijs/transformers/package.json +3 -3
- package/.output/server/node_modules/@shikijs/types/package.json +1 -1
- package/.output/server/node_modules/detect-libc/lib/detect-libc.js +59 -13
- package/.output/server/node_modules/detect-libc/lib/elf.js +39 -0
- package/.output/server/node_modules/detect-libc/lib/filesystem.js +18 -8
- package/.output/server/node_modules/detect-libc/package.json +5 -2
- package/.output/server/node_modules/devalue/package.json +1 -1
- package/.output/server/node_modules/devalue/src/parse.js +7 -1
- package/.output/server/node_modules/devalue/src/uneval.js +9 -8
- package/.output/server/node_modules/fast-xml-parser/package.json +1 -1
- package/.output/server/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +297 -287
- package/.output/server/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +3 -2
- package/.output/server/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +4 -4
- package/.output/server/node_modules/image-meta/dist/index.mjs +85 -4
- package/.output/server/node_modules/image-meta/package.json +12 -12
- package/.output/server/node_modules/is-arrayish/package.json +1 -1
- package/.output/server/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs +2 -2
- package/.output/server/node_modules/node-fetch-native/dist/node.mjs +10 -10
- package/.output/server/node_modules/node-fetch-native/package.json +13 -13
- package/.output/server/node_modules/node-mock-http/dist/index.mjs +1 -1
- package/.output/server/node_modules/node-mock-http/package.json +6 -6
- package/.output/server/node_modules/oauth4webapi/build/index.js +10 -8
- package/.output/server/node_modules/oauth4webapi/package.json +12 -12
- package/.output/server/node_modules/openid-client/build/index.js +1 -1
- package/.output/server/node_modules/openid-client/package.json +7 -7
- package/.output/server/node_modules/secure-json-parse/index.js +35 -0
- package/.output/server/node_modules/secure-json-parse/package.json +2 -3
- package/.output/server/node_modules/semver/classes/semver.js +19 -5
- package/.output/server/node_modules/semver/internal/identifiers.js +4 -0
- package/.output/server/node_modules/semver/package.json +3 -3
- package/.output/server/node_modules/shiki/package.json +9 -9
- package/.output/server/node_modules/simple-swizzle/package.json +1 -1
- package/.output/server/node_modules/unhead/dist/parser.mjs +508 -0
- package/.output/server/node_modules/unhead/dist/server.mjs +6 -513
- package/.output/server/node_modules/unhead/package.json +5 -1
- package/.output/server/node_modules/unist-util-is/lib/index.js +10 -5
- package/.output/server/node_modules/unist-util-is/package.json +12 -9
- package/.output/server/node_modules/unist-util-visit-parents/lib/index.js +8 -7
- package/.output/server/node_modules/unist-util-visit-parents/package.json +18 -13
- package/.output/server/node_modules/yaml/dist/stringify/stringifyString.js +1 -1
- package/.output/server/node_modules/yaml/package.json +2 -1
- package/.output/server/package.json +27 -27
- package/bin/cli.js +23 -16
- package/bin/set-app-vue.js +3 -1
- package/bin/set-css.js +3 -1
- package/bin/set-eslint.js +3 -1
- package/bin/setup.js +5 -2
- package/nuxt.config.ts +1 -1
- package/package.json +10 -10
- package/.nuxt/dist/server/client.manifest.json +0 -18
- package/.output/public/_nuxt/1soVlS0z.js +0 -1
- package/.output/public/_nuxt/B7rsWaa2.js +0 -1
- package/.output/public/_nuxt/BFreiu22.js +0 -1
- package/.output/public/_nuxt/BLcTglbc.js +0 -1
- package/.output/public/_nuxt/Bhd4_yFT.js +0 -1
- package/.output/public/_nuxt/Bhpb4lc3.js +0 -1
- package/.output/public/_nuxt/Bi2eMDmd.js +0 -1
- package/.output/public/_nuxt/Bm30MqE0.js +0 -1
- package/.output/public/_nuxt/BqsN2CZp.js +0 -1
- package/.output/public/_nuxt/Bs3IGOdt.js +0 -1
- package/.output/public/_nuxt/ByaiRTkI.js +0 -1
- package/.output/public/_nuxt/C9ePPGPX.js +0 -94
- package/.output/public/_nuxt/CA578xwz.js +0 -1
- package/.output/public/_nuxt/CDttUXKg.js +0 -1
- package/.output/public/_nuxt/CQozUI2A.js +0 -1
- package/.output/public/_nuxt/CSN71QT8.js +0 -1
- package/.output/public/_nuxt/CqCaqSd2.js +0 -1
- package/.output/public/_nuxt/D8v-efI7.js +0 -1
- package/.output/public/_nuxt/DBJqMhGy.js +0 -35
- package/.output/public/_nuxt/DR4hWRk7.js +0 -1
- package/.output/public/_nuxt/DRroQ-Xq.js +0 -1
- package/.output/public/_nuxt/DStnBfJS.js +0 -1
- package/.output/public/_nuxt/DXTYyv-V.js +0 -1
- package/.output/public/_nuxt/DeS1g0YT.js +0 -1
- package/.output/public/_nuxt/Deb6R53f.js +0 -1
- package/.output/public/_nuxt/DiDHllLr.js +0 -1
- package/.output/public/_nuxt/DvwlldUy.js +0 -1
- package/.output/public/_nuxt/DyCICqRh.js +0 -1
- package/.output/public/_nuxt/DzT4wm3Y.js +0 -1
- package/.output/public/_nuxt/E8nje24C.js +0 -1
- package/.output/public/_nuxt/RbPLLy5S.js +0 -1
- package/.output/public/_nuxt/builds/meta/cbc9377a-971e-4db1-b4b1-01807b82ee58.json +0 -1
- package/.output/public/_nuxt/entry.whtwWr_z.css +0 -1
- package/.output/public/_nuxt/error-404.Cq535Uij.css +0 -1
- package/.output/public/_nuxt/error-500.BHm_N15n.css +0 -1
- package/.output/public/_nuxt/jpnxxCHq.js +0 -1
- package/.output/public/_nuxt/sHsV3x2B.js +0 -1
- package/.output/public/_nuxt/sQEqbbg2.js +0 -1
- package/.output/public/_nuxt/vueform.ChEauysg.css +0 -1
- package/.output/server/chunks/build/client.manifest.mjs +0 -511
- package/.output/server/chunks/build/client.manifest.mjs.map +0 -1
|
@@ -443,7 +443,7 @@ function createDefaultOptions() {
|
|
|
443
443
|
allowUndeclaredExports: false,
|
|
444
444
|
allowYieldOutsideFunction: false,
|
|
445
445
|
plugins: [],
|
|
446
|
-
strictMode:
|
|
446
|
+
strictMode: undefined,
|
|
447
447
|
ranges: false,
|
|
448
448
|
tokens: false,
|
|
449
449
|
createImportExpressions: false,
|
|
@@ -631,7 +631,6 @@ var estree = superClass => class ESTreeParserMixin extends superClass {
|
|
|
631
631
|
}
|
|
632
632
|
convertPrivateNameToPrivateIdentifier(node) {
|
|
633
633
|
const name = super.getPrivateNameSV(node);
|
|
634
|
-
node = node;
|
|
635
634
|
delete node.id;
|
|
636
635
|
node.name = name;
|
|
637
636
|
return this.castNodeTo(node, "PrivateIdentifier");
|
|
@@ -746,8 +745,8 @@ var estree = superClass => class ESTreeParserMixin extends superClass {
|
|
|
746
745
|
node.kind = "init";
|
|
747
746
|
return this.finishNode(node, "Property");
|
|
748
747
|
}
|
|
749
|
-
isValidLVal(type, isUnparenthesizedInAssign, binding) {
|
|
750
|
-
return type === "Property" ? "value" : super.isValidLVal(type, isUnparenthesizedInAssign, binding);
|
|
748
|
+
isValidLVal(type, disallowCallExpression, isUnparenthesizedInAssign, binding) {
|
|
749
|
+
return type === "Property" ? "value" : super.isValidLVal(type, disallowCallExpression, isUnparenthesizedInAssign, binding);
|
|
751
750
|
}
|
|
752
751
|
isAssignable(node, isBinding) {
|
|
753
752
|
if (node != null && this.isObjectProperty(node)) {
|
|
@@ -1464,13 +1463,13 @@ function getExportedToken(token) {
|
|
|
1464
1463
|
context.push(types.j_expr, types.j_oTag);
|
|
1465
1464
|
};
|
|
1466
1465
|
}
|
|
1467
|
-
let nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\
|
|
1468
|
-
let nonASCIIidentifierChars = "\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0897-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0cf3\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ece\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\
|
|
1466
|
+
let nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088f\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5c\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdc-\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c8a\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7dc\ua7f1-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc";
|
|
1467
|
+
let nonASCIIidentifierChars = "\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0897-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0cf3\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ece\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1add\u1ae0-\u1aeb\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\u30fb\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f\uff65";
|
|
1469
1468
|
const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
|
|
1470
1469
|
const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
|
|
1471
1470
|
nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
|
|
1472
|
-
const astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25,
|
|
1473
|
-
const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1,
|
|
1471
|
+
const astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 7, 25, 39, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 5, 57, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 24, 43, 261, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 33, 24, 3, 24, 45, 74, 6, 0, 67, 12, 65, 1, 2, 0, 15, 4, 10, 7381, 42, 31, 98, 114, 8702, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 208, 30, 2, 2, 2, 1, 2, 6, 3, 4, 10, 1, 225, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4381, 3, 5773, 3, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 8489];
|
|
1472
|
+
const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 78, 5, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 199, 7, 137, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 55, 9, 266, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 233, 0, 3, 0, 8, 1, 6, 0, 475, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
|
|
1474
1473
|
function isInAstralSet(code, set) {
|
|
1475
1474
|
let pos = 0x10000;
|
|
1476
1475
|
for (let i = 0, length = set.length; i < length; i += 2) {
|
|
@@ -1654,7 +1653,7 @@ class ScopeHandler {
|
|
|
1654
1653
|
if (bindingType & 8) {
|
|
1655
1654
|
return scope.names.has(name);
|
|
1656
1655
|
}
|
|
1657
|
-
const type = scope.names.get(name);
|
|
1656
|
+
const type = scope.names.get(name) || 0;
|
|
1658
1657
|
if (bindingType & 16) {
|
|
1659
1658
|
return (type & 2) > 0 || !this.treatFunctionsAsVarInScope(scope) && (type & 1) > 0;
|
|
1660
1659
|
}
|
|
@@ -1969,9 +1968,8 @@ var flow = superClass => class FlowParserMixin extends superClass {
|
|
|
1969
1968
|
return this.flowParseDeclareInterface(node);
|
|
1970
1969
|
} else if (this.match(82)) {
|
|
1971
1970
|
return this.flowParseDeclareExportDeclaration(node, insideModule);
|
|
1972
|
-
} else {
|
|
1973
|
-
this.unexpected();
|
|
1974
1971
|
}
|
|
1972
|
+
throw this.unexpected();
|
|
1975
1973
|
}
|
|
1976
1974
|
flowParseDeclareVariable(node) {
|
|
1977
1975
|
this.next();
|
|
@@ -1991,18 +1989,17 @@ var flow = superClass => class FlowParserMixin extends superClass {
|
|
|
1991
1989
|
const body = bodyNode.body = [];
|
|
1992
1990
|
this.expect(5);
|
|
1993
1991
|
while (!this.match(8)) {
|
|
1994
|
-
|
|
1992
|
+
const bodyNode = this.startNode();
|
|
1995
1993
|
if (this.match(83)) {
|
|
1996
1994
|
this.next();
|
|
1997
1995
|
if (!this.isContextual(130) && !this.match(87)) {
|
|
1998
1996
|
this.raise(FlowErrors.InvalidNonTypeImportInDeclareModule, this.state.lastTokStartLoc);
|
|
1999
1997
|
}
|
|
2000
|
-
super.parseImport(bodyNode);
|
|
1998
|
+
body.push(super.parseImport(bodyNode));
|
|
2001
1999
|
} else {
|
|
2002
2000
|
this.expectContextual(125, FlowErrors.UnsupportedStatementInDeclareModule);
|
|
2003
|
-
|
|
2001
|
+
body.push(this.flowParseDeclare(bodyNode, true));
|
|
2004
2002
|
}
|
|
2005
|
-
body.push(bodyNode);
|
|
2006
2003
|
}
|
|
2007
2004
|
this.scope.exit();
|
|
2008
2005
|
this.expect(8);
|
|
@@ -2063,7 +2060,7 @@ var flow = superClass => class FlowParserMixin extends superClass {
|
|
|
2063
2060
|
}
|
|
2064
2061
|
}
|
|
2065
2062
|
}
|
|
2066
|
-
this.unexpected();
|
|
2063
|
+
throw this.unexpected();
|
|
2067
2064
|
}
|
|
2068
2065
|
flowParseDeclareModuleExports(node) {
|
|
2069
2066
|
this.next();
|
|
@@ -2271,7 +2268,7 @@ var flow = superClass => class FlowParserMixin extends superClass {
|
|
|
2271
2268
|
return this.finishNode(node, "TypeParameterInstantiation");
|
|
2272
2269
|
}
|
|
2273
2270
|
flowParseTypeParameterInstantiationCallOrNew() {
|
|
2274
|
-
if (this.reScan_lt() !== 47) return;
|
|
2271
|
+
if (this.reScan_lt() !== 47) return null;
|
|
2275
2272
|
const node = this.startNode();
|
|
2276
2273
|
const oldInType = this.state.inType;
|
|
2277
2274
|
node.params = [];
|
|
@@ -2767,8 +2764,7 @@ var flow = superClass => class FlowParserMixin extends superClass {
|
|
|
2767
2764
|
}
|
|
2768
2765
|
throw this.raise(FlowErrors.UnexpectedSubtractionOperand, this.state.startLoc);
|
|
2769
2766
|
}
|
|
2770
|
-
this.unexpected();
|
|
2771
|
-
return;
|
|
2767
|
+
throw this.unexpected();
|
|
2772
2768
|
case 135:
|
|
2773
2769
|
return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation");
|
|
2774
2770
|
case 136:
|
|
@@ -2799,7 +2795,7 @@ var flow = superClass => class FlowParserMixin extends superClass {
|
|
|
2799
2795
|
return this.flowIdentToTypeAnnotation(startLoc, node, this.parseIdentifier());
|
|
2800
2796
|
}
|
|
2801
2797
|
}
|
|
2802
|
-
this.unexpected();
|
|
2798
|
+
throw this.unexpected();
|
|
2803
2799
|
}
|
|
2804
2800
|
flowParsePostfixType() {
|
|
2805
2801
|
const startLoc = this.state.startLoc;
|
|
@@ -3260,15 +3256,15 @@ var flow = superClass => class FlowParserMixin extends superClass {
|
|
|
3260
3256
|
}
|
|
3261
3257
|
return exprList;
|
|
3262
3258
|
}
|
|
3263
|
-
parseArrayLike(close,
|
|
3264
|
-
const node = super.parseArrayLike(close,
|
|
3265
|
-
if (
|
|
3259
|
+
parseArrayLike(close, isTuple, refExpressionErrors) {
|
|
3260
|
+
const node = super.parseArrayLike(close, isTuple, refExpressionErrors);
|
|
3261
|
+
if (refExpressionErrors != null && !this.state.maybeInArrowParameters) {
|
|
3266
3262
|
this.toReferencedList(node.elements);
|
|
3267
3263
|
}
|
|
3268
3264
|
return node;
|
|
3269
3265
|
}
|
|
3270
|
-
isValidLVal(type, isParenthesized, binding) {
|
|
3271
|
-
return type === "TypeCastExpression" || super.isValidLVal(type, isParenthesized, binding);
|
|
3266
|
+
isValidLVal(type, disallowCallExpression, isParenthesized, binding) {
|
|
3267
|
+
return type === "TypeCastExpression" || super.isValidLVal(type, disallowCallExpression, isParenthesized, binding);
|
|
3272
3268
|
}
|
|
3273
3269
|
parseClassProperty(node) {
|
|
3274
3270
|
if (this.match(14)) {
|
|
@@ -5117,10 +5113,8 @@ class CommentsParser extends BaseParser {
|
|
|
5117
5113
|
setLeadingComments(commentWS.trailingNode, comments);
|
|
5118
5114
|
}
|
|
5119
5115
|
} else {
|
|
5120
|
-
const
|
|
5121
|
-
|
|
5122
|
-
start: commentStart
|
|
5123
|
-
} = commentWS;
|
|
5116
|
+
const node = commentWS.containingNode;
|
|
5117
|
+
const commentStart = commentWS.start;
|
|
5124
5118
|
if (this.input.charCodeAt(this.offsetToSourcePos(commentStart) - 1) === 44) {
|
|
5125
5119
|
switch (node.type) {
|
|
5126
5120
|
case "ObjectExpression":
|
|
@@ -5941,7 +5935,7 @@ class Tokenizer extends CommentsParser {
|
|
|
5941
5935
|
const commentWhitespace = {
|
|
5942
5936
|
start: this.sourceToOffsetPos(spaceStart),
|
|
5943
5937
|
end: this.sourceToOffsetPos(end),
|
|
5944
|
-
comments,
|
|
5938
|
+
comments: comments,
|
|
5945
5939
|
leadingNode: null,
|
|
5946
5940
|
trailingNode: null,
|
|
5947
5941
|
containingNode: null
|
|
@@ -6952,7 +6946,7 @@ class UtilParser extends Tokenizer {
|
|
|
6952
6946
|
};
|
|
6953
6947
|
}
|
|
6954
6948
|
return {
|
|
6955
|
-
node,
|
|
6949
|
+
node: node,
|
|
6956
6950
|
error: null,
|
|
6957
6951
|
thrown: false,
|
|
6958
6952
|
aborted: false,
|
|
@@ -7208,7 +7202,7 @@ class LValParser extends NodeUtils {
|
|
|
7208
7202
|
if (isLHS) {
|
|
7209
7203
|
if (parenthesized.type === "Identifier") {
|
|
7210
7204
|
this.expressionScope.recordArrowParameterBindingError(Errors.InvalidParenthesizedAssignment, node);
|
|
7211
|
-
} else if (parenthesized.type !== "MemberExpression" && !this.isOptionalMemberExpression(parenthesized)) {
|
|
7205
|
+
} else if (parenthesized.type !== "CallExpression" && parenthesized.type !== "MemberExpression" && !this.isOptionalMemberExpression(parenthesized)) {
|
|
7212
7206
|
this.raise(Errors.InvalidParenthesizedAssignment, node);
|
|
7213
7207
|
}
|
|
7214
7208
|
} else {
|
|
@@ -7484,7 +7478,7 @@ class LValParser extends NodeUtils {
|
|
|
7484
7478
|
node.right = this.parseMaybeAssignAllowIn();
|
|
7485
7479
|
return this.finishNode(node, "AssignmentPattern");
|
|
7486
7480
|
}
|
|
7487
|
-
isValidLVal(type, isUnparenthesizedInAssign, binding) {
|
|
7481
|
+
isValidLVal(type, disallowCallExpression, isUnparenthesizedInAssign, binding) {
|
|
7488
7482
|
switch (type) {
|
|
7489
7483
|
case "AssignmentPattern":
|
|
7490
7484
|
return "left";
|
|
@@ -7500,13 +7494,17 @@ class LValParser extends NodeUtils {
|
|
|
7500
7494
|
return "properties";
|
|
7501
7495
|
case "VoidPattern":
|
|
7502
7496
|
return true;
|
|
7497
|
+
case "CallExpression":
|
|
7498
|
+
if (!disallowCallExpression && !this.state.strict && this.optionFlags & 8192) {
|
|
7499
|
+
return true;
|
|
7500
|
+
}
|
|
7503
7501
|
}
|
|
7504
7502
|
return false;
|
|
7505
7503
|
}
|
|
7506
7504
|
isOptionalMemberExpression(expression) {
|
|
7507
7505
|
return expression.type === "OptionalMemberExpression";
|
|
7508
7506
|
}
|
|
7509
|
-
checkLVal(expression, ancestor, binding = 64, checkClashes = false, strictModeChanged = false, hasParenthesizedAncestor = false) {
|
|
7507
|
+
checkLVal(expression, ancestor, binding = 64, checkClashes = false, strictModeChanged = false, hasParenthesizedAncestor = false, disallowCallExpression = false) {
|
|
7510
7508
|
var _expression$extra;
|
|
7511
7509
|
const type = expression.type;
|
|
7512
7510
|
if (this.isObjectMethod(expression)) return;
|
|
@@ -7541,7 +7539,9 @@ class LValParser extends NodeUtils {
|
|
|
7541
7539
|
} else if (type === "VoidPattern" && ancestor.type === "CatchClause") {
|
|
7542
7540
|
this.raise(Errors.VoidPatternCatchClauseParam, expression);
|
|
7543
7541
|
}
|
|
7544
|
-
const
|
|
7542
|
+
const unwrappedExpression = unwrapParenthesizedExpression(expression);
|
|
7543
|
+
disallowCallExpression || (disallowCallExpression = unwrappedExpression.type === "CallExpression" && (unwrappedExpression.callee.type === "Import" || unwrappedExpression.callee.type === "Super"));
|
|
7544
|
+
const validity = this.isValidLVal(type, disallowCallExpression, !(hasParenthesizedAncestor || (_expression$extra = expression.extra) != null && _expression$extra.parenthesized) && ancestor.type === "AssignmentExpression", binding);
|
|
7545
7545
|
if (validity === true) return;
|
|
7546
7546
|
if (validity === false) {
|
|
7547
7547
|
const ParseErrorClass = binding === 64 ? Errors.InvalidLhs : Errors.InvalidLhsBinding;
|
|
@@ -7564,11 +7564,11 @@ class LValParser extends NodeUtils {
|
|
|
7564
7564
|
if (Array.isArray(val)) {
|
|
7565
7565
|
for (const child of val) {
|
|
7566
7566
|
if (child) {
|
|
7567
|
-
this.checkLVal(child, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression);
|
|
7567
|
+
this.checkLVal(child, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression, true);
|
|
7568
7568
|
}
|
|
7569
7569
|
}
|
|
7570
7570
|
} else if (val) {
|
|
7571
|
-
this.checkLVal(val, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression);
|
|
7571
|
+
this.checkLVal(val, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression, disallowCallExpression);
|
|
7572
7572
|
}
|
|
7573
7573
|
}
|
|
7574
7574
|
checkIdentifier(at, bindingType, strictModeChanged = false) {
|
|
@@ -7616,6 +7616,7 @@ class LValParser extends NodeUtils {
|
|
|
7616
7616
|
return true;
|
|
7617
7617
|
}
|
|
7618
7618
|
}
|
|
7619
|
+
const keywordAndTSRelationalOperator = /in(?:stanceof)?|as|satisfies/y;
|
|
7619
7620
|
function nonNull(x) {
|
|
7620
7621
|
if (x == null) {
|
|
7621
7622
|
throw new Error(`Unexpected ${x} value.`);
|
|
@@ -8503,7 +8504,7 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass {
|
|
|
8503
8504
|
}
|
|
8504
8505
|
}
|
|
8505
8506
|
}
|
|
8506
|
-
this.unexpected();
|
|
8507
|
+
throw this.unexpected();
|
|
8507
8508
|
}
|
|
8508
8509
|
tsParseArrayTypeOrHigher() {
|
|
8509
8510
|
const {
|
|
@@ -9067,52 +9068,22 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass {
|
|
|
9067
9068
|
}
|
|
9068
9069
|
default:
|
|
9069
9070
|
if (tokenIsIdentifier(startType)) {
|
|
9070
|
-
return this.tsParseDeclaration(node, this.state.
|
|
9071
|
+
return this.tsParseDeclaration(node, this.state.type, true, null);
|
|
9071
9072
|
}
|
|
9072
9073
|
}
|
|
9073
9074
|
});
|
|
9074
9075
|
}
|
|
9075
9076
|
tsTryParseExportDeclaration() {
|
|
9076
|
-
return this.tsParseDeclaration(this.startNode(), this.state.
|
|
9077
|
+
return this.tsParseDeclaration(this.startNode(), this.state.type, true, null);
|
|
9077
9078
|
}
|
|
9078
|
-
|
|
9079
|
-
switch (
|
|
9080
|
-
case
|
|
9081
|
-
{
|
|
9082
|
-
const declaration = this.tsTryParseDeclare(node);
|
|
9083
|
-
if (declaration) {
|
|
9084
|
-
declaration.declare = true;
|
|
9085
|
-
}
|
|
9086
|
-
return declaration;
|
|
9087
|
-
}
|
|
9088
|
-
case "global":
|
|
9089
|
-
if (this.match(5)) {
|
|
9090
|
-
this.scope.enter(1024);
|
|
9091
|
-
this.prodParam.enter(0);
|
|
9092
|
-
const mod = node;
|
|
9093
|
-
mod.kind = "global";
|
|
9094
|
-
{
|
|
9095
|
-
node.global = true;
|
|
9096
|
-
}
|
|
9097
|
-
mod.id = expr;
|
|
9098
|
-
mod.body = this.tsParseModuleBlock();
|
|
9099
|
-
this.scope.exit();
|
|
9100
|
-
this.prodParam.exit();
|
|
9101
|
-
return this.finishNode(mod, "TSModuleDeclaration");
|
|
9102
|
-
}
|
|
9103
|
-
break;
|
|
9104
|
-
default:
|
|
9105
|
-
return this.tsParseDeclaration(node, expr.name, false, decorators);
|
|
9106
|
-
}
|
|
9107
|
-
}
|
|
9108
|
-
tsParseDeclaration(node, value, next, decorators) {
|
|
9109
|
-
switch (value) {
|
|
9110
|
-
case "abstract":
|
|
9079
|
+
tsParseDeclaration(node, type, next, decorators) {
|
|
9080
|
+
switch (type) {
|
|
9081
|
+
case 124:
|
|
9111
9082
|
if (this.tsCheckLineTerminator(next) && (this.match(80) || tokenIsIdentifier(this.state.type))) {
|
|
9112
9083
|
return this.tsParseAbstractDeclaration(node, decorators);
|
|
9113
9084
|
}
|
|
9114
9085
|
break;
|
|
9115
|
-
case
|
|
9086
|
+
case 127:
|
|
9116
9087
|
if (this.tsCheckLineTerminator(next)) {
|
|
9117
9088
|
if (this.match(134)) {
|
|
9118
9089
|
return this.tsParseAmbientExternalModuleDeclaration(node);
|
|
@@ -9122,13 +9093,13 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass {
|
|
|
9122
9093
|
}
|
|
9123
9094
|
}
|
|
9124
9095
|
break;
|
|
9125
|
-
case
|
|
9096
|
+
case 128:
|
|
9126
9097
|
if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) {
|
|
9127
9098
|
node.kind = "namespace";
|
|
9128
9099
|
return this.tsParseModuleOrNamespaceDeclaration(node);
|
|
9129
9100
|
}
|
|
9130
9101
|
break;
|
|
9131
|
-
case
|
|
9102
|
+
case 130:
|
|
9132
9103
|
if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) {
|
|
9133
9104
|
return this.tsParseTypeAliasDeclaration(node);
|
|
9134
9105
|
}
|
|
@@ -9269,8 +9240,8 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass {
|
|
|
9269
9240
|
this.tsCheckForInvalidTypeCasts(exprList);
|
|
9270
9241
|
return exprList;
|
|
9271
9242
|
}
|
|
9272
|
-
parseArrayLike(close,
|
|
9273
|
-
const node = super.parseArrayLike(close,
|
|
9243
|
+
parseArrayLike(close, isTuple, refExpressionErrors) {
|
|
9244
|
+
const node = super.parseArrayLike(close, isTuple, refExpressionErrors);
|
|
9274
9245
|
if (node.type === "ArrayExpression") {
|
|
9275
9246
|
this.tsCheckForInvalidTypeCasts(node.elements);
|
|
9276
9247
|
}
|
|
@@ -9515,19 +9486,85 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass {
|
|
|
9515
9486
|
return declaration;
|
|
9516
9487
|
}
|
|
9517
9488
|
parseStatementContent(flags, decorators) {
|
|
9518
|
-
if (this.
|
|
9519
|
-
|
|
9520
|
-
|
|
9521
|
-
|
|
9522
|
-
|
|
9523
|
-
|
|
9524
|
-
|
|
9525
|
-
|
|
9526
|
-
|
|
9527
|
-
|
|
9528
|
-
|
|
9529
|
-
|
|
9530
|
-
|
|
9489
|
+
if (!this.state.containsEsc) {
|
|
9490
|
+
switch (this.state.type) {
|
|
9491
|
+
case 75:
|
|
9492
|
+
{
|
|
9493
|
+
if (this.isLookaheadContextual("enum")) {
|
|
9494
|
+
const node = this.startNode();
|
|
9495
|
+
this.expect(75);
|
|
9496
|
+
return this.tsParseEnumDeclaration(node, {
|
|
9497
|
+
const: true
|
|
9498
|
+
});
|
|
9499
|
+
}
|
|
9500
|
+
break;
|
|
9501
|
+
}
|
|
9502
|
+
case 124:
|
|
9503
|
+
case 125:
|
|
9504
|
+
{
|
|
9505
|
+
if (this.nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine()) {
|
|
9506
|
+
const token = this.state.type;
|
|
9507
|
+
const node = this.startNode();
|
|
9508
|
+
this.next();
|
|
9509
|
+
const declaration = token === 125 ? this.tsTryParseDeclare(node) : this.tsParseAbstractDeclaration(node, decorators);
|
|
9510
|
+
if (declaration) {
|
|
9511
|
+
if (token === 125) {
|
|
9512
|
+
declaration.declare = true;
|
|
9513
|
+
}
|
|
9514
|
+
return declaration;
|
|
9515
|
+
} else {
|
|
9516
|
+
node.expression = this.createIdentifier(this.startNodeAt(node.loc.start), token === 125 ? "declare" : "abstract");
|
|
9517
|
+
this.semicolon(false);
|
|
9518
|
+
return this.finishNode(node, "ExpressionStatement");
|
|
9519
|
+
}
|
|
9520
|
+
}
|
|
9521
|
+
break;
|
|
9522
|
+
}
|
|
9523
|
+
case 126:
|
|
9524
|
+
return this.tsParseEnumDeclaration(this.startNode());
|
|
9525
|
+
case 112:
|
|
9526
|
+
{
|
|
9527
|
+
const nextCh = this.lookaheadCharCode();
|
|
9528
|
+
if (nextCh === 123) {
|
|
9529
|
+
const node = this.startNode();
|
|
9530
|
+
return this.tsParseAmbientExternalModuleDeclaration(node);
|
|
9531
|
+
}
|
|
9532
|
+
break;
|
|
9533
|
+
}
|
|
9534
|
+
case 129:
|
|
9535
|
+
{
|
|
9536
|
+
const result = this.tsParseInterfaceDeclaration(this.startNode());
|
|
9537
|
+
if (result) return result;
|
|
9538
|
+
break;
|
|
9539
|
+
}
|
|
9540
|
+
case 127:
|
|
9541
|
+
{
|
|
9542
|
+
if (this.nextTokenIsIdentifierOrStringLiteralOnSameLine()) {
|
|
9543
|
+
const node = this.startNode();
|
|
9544
|
+
this.next();
|
|
9545
|
+
return this.tsParseDeclaration(node, 127, false, decorators);
|
|
9546
|
+
}
|
|
9547
|
+
break;
|
|
9548
|
+
}
|
|
9549
|
+
case 128:
|
|
9550
|
+
{
|
|
9551
|
+
if (this.nextTokenIsIdentifierOnSameLine()) {
|
|
9552
|
+
const node = this.startNode();
|
|
9553
|
+
this.next();
|
|
9554
|
+
return this.tsParseDeclaration(node, 128, false, decorators);
|
|
9555
|
+
}
|
|
9556
|
+
break;
|
|
9557
|
+
}
|
|
9558
|
+
case 130:
|
|
9559
|
+
{
|
|
9560
|
+
if (this.nextTokenIsIdentifierOnSameLine()) {
|
|
9561
|
+
const node = this.startNode();
|
|
9562
|
+
this.next();
|
|
9563
|
+
return this.tsParseTypeAliasDeclaration(node);
|
|
9564
|
+
}
|
|
9565
|
+
break;
|
|
9566
|
+
}
|
|
9567
|
+
}
|
|
9531
9568
|
}
|
|
9532
9569
|
return super.parseStatementContent(flags, decorators);
|
|
9533
9570
|
}
|
|
@@ -9611,10 +9648,6 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass {
|
|
|
9611
9648
|
this.raise(TSErrors.ClassMethodHasDeclare, methodOrProp);
|
|
9612
9649
|
}
|
|
9613
9650
|
}
|
|
9614
|
-
parseExpressionStatement(node, expr, decorators) {
|
|
9615
|
-
const decl = expr.type === "Identifier" ? this.tsParseExpressionStatement(node, expr, decorators) : undefined;
|
|
9616
|
-
return decl || super.parseExpressionStatement(node, expr, decorators);
|
|
9617
|
-
}
|
|
9618
9651
|
shouldParseExportDeclaration() {
|
|
9619
9652
|
if (this.tsIsDeclarationStart()) return true;
|
|
9620
9653
|
return super.shouldParseExportDeclaration();
|
|
@@ -9939,7 +9972,7 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass {
|
|
|
9939
9972
|
super.checkToRestConversion(node, allowPattern);
|
|
9940
9973
|
}
|
|
9941
9974
|
}
|
|
9942
|
-
isValidLVal(type, isUnparenthesizedInAssign, binding) {
|
|
9975
|
+
isValidLVal(type, disallowCallExpression, isUnparenthesizedInAssign, binding) {
|
|
9943
9976
|
switch (type) {
|
|
9944
9977
|
case "TSTypeCastExpression":
|
|
9945
9978
|
return true;
|
|
@@ -9952,7 +9985,7 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass {
|
|
|
9952
9985
|
case "TSTypeAssertion":
|
|
9953
9986
|
return (binding !== 64 || !isUnparenthesizedInAssign) && ["expression", true];
|
|
9954
9987
|
default:
|
|
9955
|
-
return super.isValidLVal(type, isUnparenthesizedInAssign, binding);
|
|
9988
|
+
return super.isValidLVal(type, disallowCallExpression, isUnparenthesizedInAssign, binding);
|
|
9956
9989
|
}
|
|
9957
9990
|
}
|
|
9958
9991
|
parseBindingAtom() {
|
|
@@ -10114,10 +10147,11 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass {
|
|
|
10114
10147
|
node.abstract = true;
|
|
10115
10148
|
this.raise(TSErrors.NonClassMethodPropertyHasAbstractModifier, node);
|
|
10116
10149
|
return this.tsParseInterfaceDeclaration(node);
|
|
10150
|
+
} else {
|
|
10151
|
+
return null;
|
|
10117
10152
|
}
|
|
10118
|
-
} else {
|
|
10119
|
-
this.unexpected(null, 80);
|
|
10120
10153
|
}
|
|
10154
|
+
throw this.unexpected(null, 80);
|
|
10121
10155
|
}
|
|
10122
10156
|
parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope) {
|
|
10123
10157
|
const method = super.parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope);
|
|
@@ -10333,6 +10367,32 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass {
|
|
|
10333
10367
|
return;
|
|
10334
10368
|
}
|
|
10335
10369
|
}
|
|
10370
|
+
chStartsBindingIdentifierAndNotRelationalOperator(ch, pos) {
|
|
10371
|
+
if (isIdentifierStart(ch)) {
|
|
10372
|
+
keywordAndTSRelationalOperator.lastIndex = pos;
|
|
10373
|
+
if (keywordAndTSRelationalOperator.test(this.input)) {
|
|
10374
|
+
const endCh = this.codePointAtPos(keywordAndTSRelationalOperator.lastIndex);
|
|
10375
|
+
if (!isIdentifierChar(endCh) && endCh !== 92) {
|
|
10376
|
+
return false;
|
|
10377
|
+
}
|
|
10378
|
+
}
|
|
10379
|
+
return true;
|
|
10380
|
+
} else if (ch === 92) {
|
|
10381
|
+
return true;
|
|
10382
|
+
} else {
|
|
10383
|
+
return false;
|
|
10384
|
+
}
|
|
10385
|
+
}
|
|
10386
|
+
nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine() {
|
|
10387
|
+
const next = this.nextTokenInLineStart();
|
|
10388
|
+
const nextCh = this.codePointAtPos(next);
|
|
10389
|
+
return this.chStartsBindingIdentifierAndNotRelationalOperator(nextCh, next);
|
|
10390
|
+
}
|
|
10391
|
+
nextTokenIsIdentifierOrStringLiteralOnSameLine() {
|
|
10392
|
+
const next = this.nextTokenInLineStart();
|
|
10393
|
+
const nextCh = this.codePointAtPos(next);
|
|
10394
|
+
return this.chStartsBindingIdentifier(nextCh, next) || nextCh === 34 || nextCh === 39;
|
|
10395
|
+
}
|
|
10336
10396
|
};
|
|
10337
10397
|
function isPossiblyLiteralEnum(expression) {
|
|
10338
10398
|
if (expression.type !== "MemberExpression") return false;
|
|
@@ -10461,8 +10521,8 @@ var placeholders = superClass => class PlaceholdersParserMixin extends superClas
|
|
|
10461
10521
|
parseBindingAtom() {
|
|
10462
10522
|
return this.parsePlaceholder("Pattern") || super.parseBindingAtom();
|
|
10463
10523
|
}
|
|
10464
|
-
isValidLVal(type, isParenthesized, binding) {
|
|
10465
|
-
return type === "Placeholder" || super.isValidLVal(type, isParenthesized, binding);
|
|
10524
|
+
isValidLVal(type, disallowCallExpression, isParenthesized, binding) {
|
|
10525
|
+
return type === "Placeholder" || super.isValidLVal(type, disallowCallExpression, isParenthesized, binding);
|
|
10466
10526
|
}
|
|
10467
10527
|
toAssignable(node, isLHS) {
|
|
10468
10528
|
if (node && node.type === "Placeholder" && node.expectedNode === "Expression") {
|
|
@@ -10862,7 +10922,7 @@ class ExpressionParser extends LValParser {
|
|
|
10862
10922
|
}
|
|
10863
10923
|
this.next();
|
|
10864
10924
|
node.right = this.parseMaybeAssign();
|
|
10865
|
-
this.checkLVal(left, this.finishNode(node, "AssignmentExpression"));
|
|
10925
|
+
this.checkLVal(left, this.finishNode(node, "AssignmentExpression"), undefined, undefined, undefined, undefined, operator === "||=" || operator === "&&=" || operator === "??=");
|
|
10866
10926
|
return node;
|
|
10867
10927
|
} else if (ownExpressionErrors) {
|
|
10868
10928
|
this.checkExpressionErrors(refExpressionErrors, true);
|
|
@@ -11336,7 +11396,7 @@ class ExpressionParser extends LValParser {
|
|
|
11336
11396
|
}
|
|
11337
11397
|
case 0:
|
|
11338
11398
|
{
|
|
11339
|
-
return this.parseArrayLike(3,
|
|
11399
|
+
return this.parseArrayLike(3, false, refExpressionErrors);
|
|
11340
11400
|
}
|
|
11341
11401
|
case 5:
|
|
11342
11402
|
{
|
|
@@ -11393,25 +11453,22 @@ class ExpressionParser extends LValParser {
|
|
|
11393
11453
|
if (pipeProposal) {
|
|
11394
11454
|
return this.parseTopicReference(pipeProposal);
|
|
11395
11455
|
}
|
|
11396
|
-
this.unexpected();
|
|
11397
|
-
break;
|
|
11456
|
+
throw this.unexpected();
|
|
11398
11457
|
}
|
|
11399
11458
|
case 47:
|
|
11400
11459
|
{
|
|
11401
11460
|
const lookaheadCh = this.input.codePointAt(this.nextTokenStart());
|
|
11402
11461
|
if (isIdentifierStart(lookaheadCh) || lookaheadCh === 62) {
|
|
11403
|
-
this.expectOnePlugin(["jsx", "flow", "typescript"]);
|
|
11404
|
-
} else {
|
|
11405
|
-
this.unexpected();
|
|
11462
|
+
throw this.expectOnePlugin(["jsx", "flow", "typescript"]);
|
|
11406
11463
|
}
|
|
11407
|
-
|
|
11464
|
+
throw this.unexpected();
|
|
11408
11465
|
}
|
|
11409
11466
|
default:
|
|
11410
11467
|
{
|
|
11411
11468
|
if (type === 137) {
|
|
11412
11469
|
return this.parseDecimalLiteral(this.state.value);
|
|
11413
11470
|
} else if (type === 2 || type === 1) {
|
|
11414
|
-
return this.parseArrayLike(this.state.type === 2 ? 4 : 3,
|
|
11471
|
+
return this.parseArrayLike(this.state.type === 2 ? 4 : 3, true);
|
|
11415
11472
|
} else if (type === 6 || type === 7) {
|
|
11416
11473
|
return this.parseObjectLike(this.state.type === 6 ? 9 : 8, false, true);
|
|
11417
11474
|
}
|
|
@@ -11448,7 +11505,7 @@ class ExpressionParser extends LValParser {
|
|
|
11448
11505
|
}
|
|
11449
11506
|
return id;
|
|
11450
11507
|
} else {
|
|
11451
|
-
this.unexpected();
|
|
11508
|
+
throw this.unexpected();
|
|
11452
11509
|
}
|
|
11453
11510
|
}
|
|
11454
11511
|
}
|
|
@@ -11461,9 +11518,8 @@ class ExpressionParser extends LValParser {
|
|
|
11461
11518
|
this.state.end--;
|
|
11462
11519
|
this.state.endLoc = createPositionWithColumnOffset(this.state.endLoc, -1);
|
|
11463
11520
|
return this.parseTopicReference(pipeProposal);
|
|
11464
|
-
} else {
|
|
11465
|
-
this.unexpected();
|
|
11466
11521
|
}
|
|
11522
|
+
throw this.unexpected();
|
|
11467
11523
|
}
|
|
11468
11524
|
parseTopicReference(pipeProposal) {
|
|
11469
11525
|
const node = this.startNode();
|
|
@@ -11539,10 +11595,18 @@ class ExpressionParser extends LValParser {
|
|
|
11539
11595
|
parseSuper() {
|
|
11540
11596
|
const node = this.startNode();
|
|
11541
11597
|
this.next();
|
|
11542
|
-
if (this.match(10) && !this.scope.allowDirectSuper
|
|
11543
|
-
|
|
11544
|
-
|
|
11545
|
-
|
|
11598
|
+
if (this.match(10) && !this.scope.allowDirectSuper) {
|
|
11599
|
+
{
|
|
11600
|
+
if (!(this.optionFlags & 16)) {
|
|
11601
|
+
this.raise(Errors.SuperNotAllowed, node);
|
|
11602
|
+
}
|
|
11603
|
+
}
|
|
11604
|
+
} else if (!this.scope.allowSuper) {
|
|
11605
|
+
{
|
|
11606
|
+
if (!(this.optionFlags & 16)) {
|
|
11607
|
+
this.raise(Errors.UnexpectedSuper, node);
|
|
11608
|
+
}
|
|
11609
|
+
}
|
|
11546
11610
|
}
|
|
11547
11611
|
if (!this.match(10) && !this.match(0) && !this.match(16)) {
|
|
11548
11612
|
this.raise(Errors.UnsupportedSuper, node);
|
|
@@ -12056,7 +12120,7 @@ class ExpressionParser extends LValParser {
|
|
|
12056
12120
|
this.scope.exit();
|
|
12057
12121
|
return finishedNode;
|
|
12058
12122
|
}
|
|
12059
|
-
parseArrayLike(close,
|
|
12123
|
+
parseArrayLike(close, isTuple, refExpressionErrors) {
|
|
12060
12124
|
if (isTuple) {
|
|
12061
12125
|
this.expectPlugin("recordAndTuple");
|
|
12062
12126
|
}
|
|
@@ -12682,9 +12746,7 @@ class StatementParser extends ExpressionParser {
|
|
|
12682
12746
|
if (!this.isContextual(107)) {
|
|
12683
12747
|
return false;
|
|
12684
12748
|
}
|
|
12685
|
-
|
|
12686
|
-
const nextCh = this.codePointAtPos(next);
|
|
12687
|
-
return this.chStartsBindingIdentifier(nextCh, next);
|
|
12749
|
+
return this.nextTokenIsIdentifierOnSameLine();
|
|
12688
12750
|
}
|
|
12689
12751
|
isForUsing() {
|
|
12690
12752
|
if (!this.isContextual(107)) {
|
|
@@ -12703,6 +12765,11 @@ class StatementParser extends ExpressionParser {
|
|
|
12703
12765
|
}
|
|
12704
12766
|
return false;
|
|
12705
12767
|
}
|
|
12768
|
+
nextTokenIsIdentifierOnSameLine() {
|
|
12769
|
+
const next = this.nextTokenInLineStart();
|
|
12770
|
+
const nextCh = this.codePointAtPos(next);
|
|
12771
|
+
return this.chStartsBindingIdentifier(nextCh, next);
|
|
12772
|
+
}
|
|
12706
12773
|
isAwaitUsing() {
|
|
12707
12774
|
if (!this.isContextual(96)) {
|
|
12708
12775
|
return false;
|
|
@@ -13845,7 +13912,7 @@ class StatementParser extends ExpressionParser {
|
|
|
13845
13912
|
this.sawUnambiguousESM = true;
|
|
13846
13913
|
return this.finishNode(node2, "ExportDefaultDeclaration");
|
|
13847
13914
|
}
|
|
13848
|
-
this.unexpected(null, 5);
|
|
13915
|
+
throw this.unexpected(null, 5);
|
|
13849
13916
|
}
|
|
13850
13917
|
eatExportStar(node) {
|
|
13851
13918
|
return this.eat(55);
|
|
@@ -14437,54 +14504,54 @@ class StatementParser extends ExpressionParser {
|
|
|
14437
14504
|
}
|
|
14438
14505
|
class Parser extends StatementParser {
|
|
14439
14506
|
constructor(options, input, pluginsMap) {
|
|
14440
|
-
|
|
14441
|
-
super(
|
|
14442
|
-
this.options =
|
|
14507
|
+
const normalizedOptions = getOptions(options);
|
|
14508
|
+
super(normalizedOptions, input);
|
|
14509
|
+
this.options = normalizedOptions;
|
|
14443
14510
|
this.initializeScopes();
|
|
14444
14511
|
this.plugins = pluginsMap;
|
|
14445
|
-
this.filename =
|
|
14446
|
-
this.startIndex =
|
|
14512
|
+
this.filename = normalizedOptions.sourceFilename;
|
|
14513
|
+
this.startIndex = normalizedOptions.startIndex;
|
|
14447
14514
|
let optionFlags = 0;
|
|
14448
|
-
if (
|
|
14515
|
+
if (normalizedOptions.allowAwaitOutsideFunction) {
|
|
14449
14516
|
optionFlags |= 1;
|
|
14450
14517
|
}
|
|
14451
|
-
if (
|
|
14518
|
+
if (normalizedOptions.allowReturnOutsideFunction) {
|
|
14452
14519
|
optionFlags |= 2;
|
|
14453
14520
|
}
|
|
14454
|
-
if (
|
|
14521
|
+
if (normalizedOptions.allowImportExportEverywhere) {
|
|
14455
14522
|
optionFlags |= 8;
|
|
14456
14523
|
}
|
|
14457
|
-
if (
|
|
14524
|
+
if (normalizedOptions.allowSuperOutsideMethod) {
|
|
14458
14525
|
optionFlags |= 16;
|
|
14459
14526
|
}
|
|
14460
|
-
if (
|
|
14527
|
+
if (normalizedOptions.allowUndeclaredExports) {
|
|
14461
14528
|
optionFlags |= 64;
|
|
14462
14529
|
}
|
|
14463
|
-
if (
|
|
14530
|
+
if (normalizedOptions.allowNewTargetOutsideFunction) {
|
|
14464
14531
|
optionFlags |= 4;
|
|
14465
14532
|
}
|
|
14466
|
-
if (
|
|
14533
|
+
if (normalizedOptions.allowYieldOutsideFunction) {
|
|
14467
14534
|
optionFlags |= 32;
|
|
14468
14535
|
}
|
|
14469
|
-
if (
|
|
14536
|
+
if (normalizedOptions.ranges) {
|
|
14470
14537
|
optionFlags |= 128;
|
|
14471
14538
|
}
|
|
14472
|
-
if (
|
|
14539
|
+
if (normalizedOptions.tokens) {
|
|
14473
14540
|
optionFlags |= 256;
|
|
14474
14541
|
}
|
|
14475
|
-
if (
|
|
14542
|
+
if (normalizedOptions.createImportExpressions) {
|
|
14476
14543
|
optionFlags |= 512;
|
|
14477
14544
|
}
|
|
14478
|
-
if (
|
|
14545
|
+
if (normalizedOptions.createParenthesizedExpressions) {
|
|
14479
14546
|
optionFlags |= 1024;
|
|
14480
14547
|
}
|
|
14481
|
-
if (
|
|
14548
|
+
if (normalizedOptions.errorRecovery) {
|
|
14482
14549
|
optionFlags |= 2048;
|
|
14483
14550
|
}
|
|
14484
|
-
if (
|
|
14551
|
+
if (normalizedOptions.attachComment) {
|
|
14485
14552
|
optionFlags |= 4096;
|
|
14486
14553
|
}
|
|
14487
|
-
if (
|
|
14554
|
+
if (normalizedOptions.annexB) {
|
|
14488
14555
|
optionFlags |= 8192;
|
|
14489
14556
|
}
|
|
14490
14557
|
this.optionFlags = optionFlags;
|
|
@@ -14498,10 +14565,10 @@ class Parser extends StatementParser {
|
|
|
14498
14565
|
const program = this.startNode();
|
|
14499
14566
|
this.nextToken();
|
|
14500
14567
|
file.errors = null;
|
|
14501
|
-
this.parseTopLevel(file, program);
|
|
14502
|
-
|
|
14503
|
-
|
|
14504
|
-
return
|
|
14568
|
+
const result = this.parseTopLevel(file, program);
|
|
14569
|
+
result.errors = this.state.errors;
|
|
14570
|
+
result.comments.length = this.state.commentsLen;
|
|
14571
|
+
return result;
|
|
14505
14572
|
}
|
|
14506
14573
|
}
|
|
14507
14574
|
function parse(input, options) {
|