@quilted/create 0.2.42 → 0.2.44
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/CHANGELOG.md +20 -0
- package/build/esm/_virtual/index.mjs +6 -2
- package/build/esm/_virtual/index10.mjs +3 -0
- package/build/esm/_virtual/index11.mjs +3 -0
- package/build/esm/_virtual/index12.mjs +3 -0
- package/build/esm/_virtual/index13.mjs +3 -0
- package/build/esm/_virtual/index2.mjs +2 -2
- package/build/esm/_virtual/index3.mjs +6 -2
- package/build/esm/_virtual/index4.mjs +6 -2
- package/build/esm/_virtual/index5.mjs +6 -2
- package/build/esm/_virtual/index6.mjs +6 -2
- package/build/esm/_virtual/index8.mjs +3 -0
- package/build/esm/_virtual/index9.mjs +3 -0
- package/build/esm/_virtual/minimatch.mjs +12 -0
- package/build/esm/app.mjs +2 -2
- package/build/esm/cli.mjs +1 -1
- package/build/esm/module.mjs +2 -2
- package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/adapters/fs.mjs +29 -21
- package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/constants.mjs +24 -18
- package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/index.mjs +35 -32
- package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/async.mjs +103 -101
- package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/common.mjs +19 -13
- package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/sync.mjs +63 -61
- package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.mjs +33 -27
- package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/fs.mjs +25 -19
- package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/index.mjs +15 -10
- package/build/esm/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/adapters/fs.mjs +27 -19
- package/build/esm/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/index.mjs +35 -32
- package/build/esm/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/async.mjs +39 -33
- package/build/esm/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/sync.mjs +26 -20
- package/build/esm/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.mjs +24 -17
- package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/index.mjs +44 -42
- package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/async.mjs +37 -30
- package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/stream.mjs +41 -34
- package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/sync.mjs +22 -15
- package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/async.mjs +103 -98
- package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/common.mjs +35 -29
- package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/reader.mjs +19 -12
- package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/sync.mjs +64 -59
- package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.mjs +34 -27
- package/build/esm/node_modules/.pnpm/arg@5.0.2/node_modules/arg/index.mjs +116 -112
- package/build/esm/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.mjs +54 -47
- package/build/esm/node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.mjs +144 -137
- package/build/esm/node_modules/.pnpm/braces@3.0.2/node_modules/braces/index.mjs +173 -166
- package/build/esm/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/compile.mjs +57 -51
- package/build/esm/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/constants.mjs +102 -94
- package/build/esm/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/expand.mjs +89 -83
- package/build/esm/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/parse.mjs +312 -305
- package/build/esm/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/stringify.mjs +30 -24
- package/build/esm/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/utils.mjs +116 -108
- package/build/esm/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/splitStringTransformer/splitStringTransformer.mjs +1 -3
- package/build/esm/node_modules/.pnpm/dir-glob@3.0.1/node_modules/dir-glob/index.mjs +63 -61
- package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/index.mjs +75 -77
- package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/managers/patterns.mjs +28 -22
- package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/managers/tasks.mjs +83 -78
- package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/async.mjs +31 -25
- package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/filters/deep.mjs +66 -60
- package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/filters/entry.mjs +66 -59
- package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/filters/error.mjs +23 -16
- package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/matchers/matcher.mjs +55 -48
- package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/matchers/partial.mjs +40 -33
- package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/provider.mjs +59 -55
- package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/stream.mjs +38 -32
- package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/sync.mjs +31 -25
- package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/transformers/entry.mjs +33 -26
- package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/readers/async.mjs +43 -38
- package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/readers/reader.mjs +41 -35
- package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/readers/stream.mjs +60 -55
- package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/readers/sync.mjs +48 -43
- package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/settings.mjs +65 -57
- package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/array.mjs +26 -20
- package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/errno.mjs +14 -8
- package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/fs.mjs +25 -19
- package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/index.mjs +33 -34
- package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/path.mjs +39 -33
- package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/pattern.mjs +170 -164
- package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/stream.mjs +24 -18
- package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/string.mjs +18 -12
- package/build/esm/node_modules/.pnpm/fastq@1.13.0/node_modules/fastq/queue.mjs +227 -221
- package/build/esm/node_modules/.pnpm/fill-range@7.0.1/node_modules/fill-range/index.mjs +207 -200
- package/build/esm/node_modules/.pnpm/find-up@6.3.0/node_modules/find-up/index.mjs +1 -6
- package/build/esm/node_modules/.pnpm/glob-parent@5.1.2/node_modules/glob-parent/index.mjs +51 -44
- package/build/esm/node_modules/.pnpm/globby@13.1.1/node_modules/globby/ignore.mjs +2 -2
- package/build/esm/node_modules/.pnpm/globby@13.1.1/node_modules/globby/index.mjs +3 -3
- package/build/esm/node_modules/.pnpm/ignore@5.2.4/node_modules/ignore/index.mjs +443 -439
- package/build/esm/node_modules/.pnpm/is-extglob@2.1.1/node_modules/is-extglob/index.mjs +18 -11
- package/build/esm/node_modules/.pnpm/is-glob@4.0.3/node_modules/is-glob/index.mjs +116 -109
- package/build/esm/node_modules/.pnpm/is-number@7.0.0/node_modules/is-number/index.mjs +17 -10
- package/build/esm/node_modules/.pnpm/merge2@1.4.1/node_modules/merge2/index.mjs +117 -110
- package/build/esm/node_modules/.pnpm/micromatch@4.0.5/node_modules/micromatch/index.mjs +457 -451
- package/build/esm/node_modules/.pnpm/minimatch@5.1.0/node_modules/minimatch/lib/path.mjs +14 -7
- package/build/esm/node_modules/.pnpm/minimatch@5.1.0/node_modules/minimatch/minimatch.mjs +770 -770
- package/build/esm/node_modules/.pnpm/path-type@4.0.0/node_modules/path-type/index.mjs +40 -34
- package/build/esm/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/index.mjs +10 -3
- package/build/esm/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.mjs +227 -220
- package/build/esm/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/parse.mjs +941 -935
- package/build/esm/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.mjs +331 -325
- package/build/esm/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/scan.mjs +303 -297
- package/build/esm/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.mjs +65 -57
- package/build/esm/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/babel.mjs +605 -605
- package/build/esm/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/estree.mjs +378 -394
- package/build/esm/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/typescript.mjs +15 -15
- package/build/esm/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/yaml.mjs +281 -294
- package/build/esm/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/standalone.mjs +155 -155
- package/build/esm/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/index.mjs +1 -1
- package/build/esm/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/prompts.mjs +1 -1
- package/build/esm/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/clear.mjs +1 -1
- package/build/esm/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/index.mjs +17 -12
- package/build/esm/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/prompts.mjs +1 -1
- package/build/esm/node_modules/.pnpm/queue-microtask@1.2.3/node_modules/queue-microtask/index.mjs +14 -7
- package/build/esm/node_modules/.pnpm/reusify@1.0.4/node_modules/reusify/reusify.mjs +29 -22
- package/build/esm/node_modules/.pnpm/run-parallel@1.2.0/node_modules/run-parallel/index.mjs +49 -42
- package/build/esm/node_modules/.pnpm/to-regex-range@5.0.1/node_modules/to-regex-range/index.mjs +231 -224
- package/build/esm/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/nodes/YAMLMap.mjs +1 -1
- package/build/esm/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/nodes/addPairToJSMap.mjs +1 -1
- package/build/esm/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/schema/tags.mjs +3 -3
- package/build/esm/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.mjs +2 -2
- package/build/esm/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.mjs +1 -1
- package/build/esm/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/schema/yaml-1.1/set.mjs +2 -2
- package/build/esm/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/stringify/stringifyString.mjs +1 -1
- package/build/esm/package.mjs +2 -2
- package/build/esm/packages/cli-kit/build/esnext/prompt.esnext.mjs +1 -1
- package/build/esm/server.mjs +5 -9
- package/build/esm/shared/package-manager.mjs +1 -1
- package/build/esm/shared/prompts.mjs +1 -1
- package/build/esnext/_virtual/index.esnext +6 -2
- package/build/esnext/_virtual/index10.esnext +3 -0
- package/build/esnext/_virtual/index11.esnext +3 -0
- package/build/esnext/_virtual/index12.esnext +3 -0
- package/build/esnext/_virtual/index13.esnext +3 -0
- package/build/esnext/_virtual/index2.esnext +2 -2
- package/build/esnext/_virtual/index3.esnext +6 -2
- package/build/esnext/_virtual/index4.esnext +6 -2
- package/build/esnext/_virtual/index5.esnext +6 -2
- package/build/esnext/_virtual/index6.esnext +6 -2
- package/build/esnext/_virtual/index8.esnext +3 -0
- package/build/esnext/_virtual/index9.esnext +3 -0
- package/build/esnext/_virtual/minimatch.esnext +12 -0
- package/build/esnext/app.esnext +2 -2
- package/build/esnext/module.esnext +2 -2
- package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/adapters/fs.esnext +27 -19
- package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/constants.esnext +19 -13
- package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/index.esnext +33 -30
- package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/async.esnext +99 -97
- package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/common.esnext +14 -8
- package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/sync.esnext +59 -57
- package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.esnext +31 -25
- package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/fs.esnext +23 -17
- package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/index.esnext +13 -8
- package/build/esnext/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/adapters/fs.esnext +25 -17
- package/build/esnext/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/index.esnext +33 -30
- package/build/esnext/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/async.esnext +38 -32
- package/build/esnext/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/sync.esnext +25 -19
- package/build/esnext/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.esnext +23 -16
- package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/index.esnext +42 -40
- package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/async.esnext +36 -29
- package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/stream.esnext +40 -33
- package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/sync.esnext +21 -14
- package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/async.esnext +98 -93
- package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/common.esnext +30 -24
- package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/reader.esnext +17 -10
- package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/sync.esnext +59 -54
- package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.esnext +33 -26
- package/build/esnext/node_modules/.pnpm/arg@5.0.2/node_modules/arg/index.esnext +132 -128
- package/build/esnext/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.esnext +54 -47
- package/build/esnext/node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.esnext +137 -130
- package/build/esnext/node_modules/.pnpm/braces@3.0.2/node_modules/braces/index.esnext +66 -59
- package/build/esnext/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/compile.esnext +53 -47
- package/build/esnext/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/constants.esnext +102 -95
- package/build/esnext/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/expand.esnext +89 -83
- package/build/esnext/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/parse.esnext +217 -210
- package/build/esnext/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/stringify.esnext +30 -24
- package/build/esnext/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/utils.esnext +75 -67
- package/build/esnext/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/splitStringTransformer/splitStringTransformer.esnext +1 -3
- package/build/esnext/node_modules/.pnpm/dir-glob@3.0.1/node_modules/dir-glob/index.esnext +63 -61
- package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/index.esnext +68 -70
- package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/managers/patterns.esnext +17 -11
- package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/managers/tasks.esnext +81 -76
- package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/async.esnext +29 -23
- package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/filters/deep.esnext +61 -55
- package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/filters/entry.esnext +61 -54
- package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/filters/error.esnext +21 -14
- package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/matchers/matcher.esnext +49 -42
- package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/matchers/partial.esnext +31 -24
- package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/provider.esnext +57 -53
- package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/stream.esnext +34 -28
- package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/sync.esnext +29 -23
- package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/transformers/entry.esnext +29 -22
- package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/readers/async.esnext +40 -35
- package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/readers/reader.esnext +39 -33
- package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/readers/stream.esnext +56 -51
- package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/readers/sync.esnext +46 -41
- package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/settings.esnext +59 -51
- package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/array.esnext +24 -18
- package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/errno.esnext +12 -6
- package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/fs.esnext +23 -17
- package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/index.esnext +31 -32
- package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/path.esnext +32 -26
- package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/pattern.esnext +135 -129
- package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/stream.esnext +23 -17
- package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/string.esnext +16 -10
- package/build/esnext/node_modules/.pnpm/fastq@1.13.0/node_modules/fastq/queue.esnext +220 -215
- package/build/esnext/node_modules/.pnpm/fill-range@7.0.1/node_modules/fill-range/index.esnext +193 -186
- package/build/esnext/node_modules/.pnpm/find-up@6.3.0/node_modules/find-up/index.esnext +1 -6
- package/build/esnext/node_modules/.pnpm/glob-parent@5.1.2/node_modules/glob-parent/index.esnext +31 -24
- package/build/esnext/node_modules/.pnpm/globby@13.1.1/node_modules/globby/ignore.esnext +2 -2
- package/build/esnext/node_modules/.pnpm/globby@13.1.1/node_modules/globby/index.esnext +3 -3
- package/build/esnext/node_modules/.pnpm/ignore@5.2.4/node_modules/ignore/index.esnext +357 -353
- package/build/esnext/node_modules/.pnpm/is-extglob@2.1.1/node_modules/is-extglob/index.esnext +18 -11
- package/build/esnext/node_modules/.pnpm/is-glob@4.0.3/node_modules/is-glob/index.esnext +111 -104
- package/build/esnext/node_modules/.pnpm/is-number@7.0.0/node_modules/is-number/index.esnext +17 -10
- package/build/esnext/node_modules/.pnpm/merge2@1.4.1/node_modules/merge2/index.esnext +103 -96
- package/build/esnext/node_modules/.pnpm/micromatch@4.0.5/node_modules/micromatch/index.esnext +147 -141
- package/build/esnext/node_modules/.pnpm/minimatch@5.1.0/node_modules/minimatch/lib/path.esnext +10 -3
- package/build/esnext/node_modules/.pnpm/minimatch@5.1.0/node_modules/minimatch/minimatch.esnext +495 -491
- package/build/esnext/node_modules/.pnpm/path-type@4.0.0/node_modules/path-type/index.esnext +38 -32
- package/build/esnext/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/index.esnext +10 -3
- package/build/esnext/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.esnext +198 -191
- package/build/esnext/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/parse.esnext +683 -677
- package/build/esnext/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.esnext +137 -131
- package/build/esnext/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/scan.esnext +279 -273
- package/build/esnext/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.esnext +65 -57
- package/build/esnext/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/babel.esnext +9 -9
- package/build/esnext/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/estree.esnext +20 -20
- package/build/esnext/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/typescript.esnext +15 -15
- package/build/esnext/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/yaml.esnext +64 -64
- package/build/esnext/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/standalone.esnext +19 -19
- package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/index.esnext +1 -1
- package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/clear.esnext +1 -1
- package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/index.esnext +16 -11
- package/build/esnext/node_modules/.pnpm/queue-microtask@1.2.3/node_modules/queue-microtask/index.esnext +12 -5
- package/build/esnext/node_modules/.pnpm/reusify@1.0.4/node_modules/reusify/reusify.esnext +29 -22
- package/build/esnext/node_modules/.pnpm/run-parallel@1.2.0/node_modules/run-parallel/index.esnext +47 -40
- package/build/esnext/node_modules/.pnpm/to-regex-range@5.0.1/node_modules/to-regex-range/index.esnext +196 -189
- package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/compose/resolve-block-scalar.esnext +2 -0
- package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.esnext +2 -0
- package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/compose/resolve-props.esnext +1 -0
- package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/nodes/YAMLMap.esnext +1 -1
- package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/nodes/addPairToJSMap.esnext +1 -1
- package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/parse/lexer.esnext +5 -0
- package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/parse/parser.esnext +4 -0
- package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/schema/tags.esnext +3 -3
- package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.esnext +2 -2
- package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.esnext +1 -1
- package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/schema/yaml-1.1/set.esnext +2 -2
- package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/stringify/stringifyString.esnext +1 -1
- package/build/esnext/package.esnext +2 -2
- package/build/esnext/packages/cli-kit/build/esnext/prompt.esnext.esnext +1 -1
- package/build/esnext/server.esnext +5 -9
- package/build/esnext/shared/package-manager.esnext +1 -1
- package/build/esnext/shared/prompts.esnext +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/source/shared/prompts.ts +1 -1
- package/templates/app-basic/App.tsx +3 -4
- package/templates/app-basic/browser.tsx +5 -1
- package/templates/app-basic/foundation/html/Head.test.tsx +42 -0
- package/templates/app-basic/foundation/html/Head.tsx +34 -0
- package/templates/app-basic/foundation/html.ts +1 -1
- package/templates/app-basic/package.json +4 -4
- package/templates/app-basic/server.tsx +89 -3
- package/templates/app-empty/package.json +3 -3
- package/templates/app-empty/server.tsx +4 -3
- package/templates/app-graphql/App.tsx +3 -4
- package/templates/app-graphql/browser.tsx +5 -1
- package/templates/app-graphql/foundation/html/Head.test.tsx +42 -0
- package/templates/app-graphql/foundation/html/Head.tsx +34 -0
- package/templates/app-graphql/foundation/html.ts +1 -1
- package/templates/app-graphql/package.json +4 -4
- package/templates/app-graphql/server.tsx +93 -9
- package/templates/app-trpc/App.tsx +3 -4
- package/templates/app-trpc/browser.tsx +5 -1
- package/templates/app-trpc/foundation/html/Head.test.tsx +42 -0
- package/templates/app-trpc/foundation/html/Head.tsx +34 -0
- package/templates/app-trpc/foundation/html.ts +1 -1
- package/templates/app-trpc/package.json +4 -4
- package/templates/app-trpc/server.tsx +93 -8
- package/templates/package/package.json +3 -3
- package/templates/workspace/package.json +4 -4
- package/templates/app-basic/foundation/html/HTML.test.tsx +0 -46
- package/templates/app-basic/foundation/html/HTML.tsx +0 -159
- package/templates/app-graphql/foundation/html/HTML.test.tsx +0 -46
- package/templates/app-graphql/foundation/html/HTML.tsx +0 -159
- package/templates/app-trpc/foundation/html/HTML.test.tsx +0 -46
- package/templates/app-trpc/foundation/html/HTML.tsx +0 -159
|
@@ -10,7 +10,7 @@ var ps = (a, t) => () => (t || a((t = {
|
|
|
10
10
|
zi = (a, t) => {
|
|
11
11
|
for (var e in t) ct(a, e, {
|
|
12
12
|
get: t[e],
|
|
13
|
-
enumerable:
|
|
13
|
+
enumerable: true
|
|
14
14
|
});
|
|
15
15
|
},
|
|
16
16
|
Ki = (a, t, e, s) => {
|
|
@@ -20,14 +20,14 @@ var ps = (a, t) => () => (t || a((t = {
|
|
|
20
20
|
});
|
|
21
21
|
return a;
|
|
22
22
|
};
|
|
23
|
-
var pt = (a, t, e) => (e = a != null ? Ri($i(a)) : {}, Ki(
|
|
23
|
+
var pt = (a, t, e) => (e = a != null ? Ri($i(a)) : {}, Ki(ct(e, "default", {
|
|
24
24
|
value: a,
|
|
25
|
-
enumerable:
|
|
26
|
-
})
|
|
25
|
+
enumerable: true
|
|
26
|
+
}) , a));
|
|
27
27
|
var rs = ps(Me => {
|
|
28
28
|
|
|
29
29
|
Object.defineProperty(Me, "__esModule", {
|
|
30
|
-
value:
|
|
30
|
+
value: true
|
|
31
31
|
});
|
|
32
32
|
function He(a, t) {
|
|
33
33
|
if (a == null) return {};
|
|
@@ -70,9 +70,9 @@ var rs = ps(Me => {
|
|
|
70
70
|
}),
|
|
71
71
|
Hi = (a, t, e) => Object.keys(e).map(s => [s, e[s]]).filter(([, s]) => !!s).map(([s, i]) => [s, typeof i == "function" ? {
|
|
72
72
|
value: i,
|
|
73
|
-
enumerable:
|
|
73
|
+
enumerable: false
|
|
74
74
|
} : typeof i.reflect == "string" ? Object.assign({}, i, qi(i.reflect.split("."))) : i]).reduce((s, [i, r]) => Object.defineProperty(s, i, Object.assign({
|
|
75
|
-
configurable:
|
|
75
|
+
configurable: true
|
|
76
76
|
}, r)), Object.assign(new a(), t)),
|
|
77
77
|
Wi = {
|
|
78
78
|
ImportMetaOutsideModule: {
|
|
@@ -382,7 +382,7 @@ var rs = ps(Me => {
|
|
|
382
382
|
},
|
|
383
383
|
details: {
|
|
384
384
|
value: r,
|
|
385
|
-
enumerable:
|
|
385
|
+
enumerable: false
|
|
386
386
|
},
|
|
387
387
|
message: {
|
|
388
388
|
get() {
|
|
@@ -396,11 +396,11 @@ var rs = ps(Me => {
|
|
|
396
396
|
},
|
|
397
397
|
pos: {
|
|
398
398
|
reflect: "loc.index",
|
|
399
|
-
enumerable:
|
|
399
|
+
enumerable: true
|
|
400
400
|
},
|
|
401
401
|
missingPlugin: "missingPlugin" in r && {
|
|
402
402
|
reflect: "details.missingPlugin",
|
|
403
|
-
enumerable:
|
|
403
|
+
enumerable: true
|
|
404
404
|
}
|
|
405
405
|
});
|
|
406
406
|
};
|
|
@@ -435,7 +435,7 @@ var rs = ps(Me => {
|
|
|
435
435
|
defineProperty: tr
|
|
436
436
|
} = Object,
|
|
437
437
|
fs = (a, t) => tr(a, t, {
|
|
438
|
-
enumerable:
|
|
438
|
+
enumerable: false,
|
|
439
439
|
value: a[t]
|
|
440
440
|
});
|
|
441
441
|
function Ae(a) {
|
|
@@ -496,7 +496,7 @@ var rs = ps(Me => {
|
|
|
496
496
|
return i.type = "ExpressionStatement", i.expression = s, i.directive = s.extra.rawValue, delete s.extra, i;
|
|
497
497
|
}
|
|
498
498
|
initFunction(e, s) {
|
|
499
|
-
super.initFunction(e, s), e.expression =
|
|
499
|
+
super.initFunction(e, s), e.expression = false;
|
|
500
500
|
}
|
|
501
501
|
checkDeclaration(e) {
|
|
502
502
|
e != null && this.isObjectProperty(e) ? this.checkDeclaration(e.value) : super.checkDeclaration(e);
|
|
@@ -514,7 +514,7 @@ var rs = ps(Me => {
|
|
|
514
514
|
e.body = o.concat(e.body), delete e.directives;
|
|
515
515
|
}
|
|
516
516
|
pushClassMethod(e, s, i, r, n, o) {
|
|
517
|
-
this.parseMethod(s, i, r, n, o, "ClassMethod",
|
|
517
|
+
this.parseMethod(s, i, r, n, o, "ClassMethod", true), s.typeParameters && (s.value.typeParameters = s.typeParameters, delete s.typeParameters), e.body.push(s);
|
|
518
518
|
}
|
|
519
519
|
parsePrivateName() {
|
|
520
520
|
let e = super.parsePrivateName();
|
|
@@ -534,12 +534,12 @@ var rs = ps(Me => {
|
|
|
534
534
|
let i = super.parseLiteral(e, s);
|
|
535
535
|
return i.raw = i.extra.raw, delete i.extra, i;
|
|
536
536
|
}
|
|
537
|
-
parseFunctionBody(e, s, i =
|
|
537
|
+
parseFunctionBody(e, s, i = false) {
|
|
538
538
|
super.parseFunctionBody(e, s, i), e.expression = e.body.type !== "BlockStatement";
|
|
539
539
|
}
|
|
540
|
-
parseMethod(e, s, i, r, n, o, h =
|
|
540
|
+
parseMethod(e, s, i, r, n, o, h = false) {
|
|
541
541
|
let l = this.startNode();
|
|
542
|
-
return l.kind = e.kind, l = super.parseMethod(l, s, i, r, n, o, h), l.type = "FunctionExpression", delete l.kind, e.value = l, o === "ClassPrivateMethod" && (e.computed =
|
|
542
|
+
return l.kind = e.kind, l = super.parseMethod(l, s, i, r, n, o, h), l.type = "FunctionExpression", delete l.kind, e.value = l, o === "ClassPrivateMethod" && (e.computed = false), this.finishNode(e, "MethodDefinition");
|
|
543
543
|
}
|
|
544
544
|
parseClassProperty(...e) {
|
|
545
545
|
let s = super.parseClassProperty(...e);
|
|
@@ -547,11 +547,11 @@ var rs = ps(Me => {
|
|
|
547
547
|
}
|
|
548
548
|
parseClassPrivateProperty(...e) {
|
|
549
549
|
let s = super.parseClassPrivateProperty(...e);
|
|
550
|
-
return this.getPluginOption("estree", "classFeatures") && (s.type = "PropertyDefinition", s.computed =
|
|
550
|
+
return this.getPluginOption("estree", "classFeatures") && (s.type = "PropertyDefinition", s.computed = false), s;
|
|
551
551
|
}
|
|
552
552
|
parseObjectMethod(e, s, i, r, n) {
|
|
553
553
|
let o = super.parseObjectMethod(e, s, i, r, n);
|
|
554
|
-
return o && (o.type = "Property", o.kind === "method" && (o.kind = "init"), o.shorthand =
|
|
554
|
+
return o && (o.type = "Property", o.kind === "method" && (o.kind = "init"), o.shorthand = false), o;
|
|
555
555
|
}
|
|
556
556
|
parseObjectProperty(e, s, i, r) {
|
|
557
557
|
let n = super.parseObjectProperty(e, s, i, r);
|
|
@@ -563,7 +563,7 @@ var rs = ps(Me => {
|
|
|
563
563
|
isAssignable(e, s) {
|
|
564
564
|
return e != null && this.isObjectProperty(e) ? this.isAssignable(e.value, s) : super.isAssignable(e, s);
|
|
565
565
|
}
|
|
566
|
-
toAssignable(e, s =
|
|
566
|
+
toAssignable(e, s = false) {
|
|
567
567
|
if (e != null && this.isObjectProperty(e)) {
|
|
568
568
|
let {
|
|
569
569
|
key: i,
|
|
@@ -621,7 +621,7 @@ var rs = ps(Me => {
|
|
|
621
621
|
let o = this.startNodeAtNode(n);
|
|
622
622
|
return o.expression = n, this.finishNode(o, "ChainExpression");
|
|
623
623
|
}
|
|
624
|
-
} else (n.type === "MemberExpression" || n.type === "CallExpression") && (n.optional =
|
|
624
|
+
} else (n.type === "MemberExpression" || n.type === "CallExpression") && (n.optional = false);
|
|
625
625
|
return n;
|
|
626
626
|
}
|
|
627
627
|
hasPropertyAsPrivateName(e) {
|
|
@@ -652,15 +652,15 @@ var rs = ps(Me => {
|
|
|
652
652
|
brace: new Z("{"),
|
|
653
653
|
j_oTag: new Z("<tag"),
|
|
654
654
|
j_cTag: new Z("</tag"),
|
|
655
|
-
j_expr: new Z("<tag>...</tag>",
|
|
655
|
+
j_expr: new Z("<tag>...</tag>", true)
|
|
656
656
|
};
|
|
657
|
-
E.template = new Z("`",
|
|
658
|
-
var g =
|
|
659
|
-
m =
|
|
660
|
-
ut =
|
|
661
|
-
Se =
|
|
662
|
-
q =
|
|
663
|
-
ir =
|
|
657
|
+
E.template = new Z("`", true);
|
|
658
|
+
var g = true,
|
|
659
|
+
m = true,
|
|
660
|
+
ut = true,
|
|
661
|
+
Se = true,
|
|
662
|
+
q = true,
|
|
663
|
+
ir = true,
|
|
664
664
|
We = class {
|
|
665
665
|
constructor(t, e = {}) {
|
|
666
666
|
this.label = void 0, this.keyword = void 0, this.beforeExpr = void 0, this.startsExpr = void 0, this.rightAssociative = void 0, this.isLoop = void 0, this.isAssign = void 0, this.prefix = void 0, this.postfix = void 0, this.binop = void 0, this.label = t, this.keyword = e.keyword, this.beforeExpr = !!e.beforeExpr, this.startsExpr = !!e.startsExpr, this.rightAssociative = !!e.rightAssociative, this.isLoop = !!e.isLoop, this.isAssign = !!e.isAssign, this.prefix = !!e.prefix, this.postfix = !!e.postfix, this.binop = e.binop != null ? e.binop : null, this.updateContext = null;
|
|
@@ -687,11 +687,11 @@ var rs = ps(Me => {
|
|
|
687
687
|
Jt = [];
|
|
688
688
|
function P(a, t = {}) {
|
|
689
689
|
var e, s, i, r;
|
|
690
|
-
return ++Ie, Kt.push(a), qt.push((e = t.binop) != null ? e : -1), Ht.push((s = t.beforeExpr) != null ? s :
|
|
690
|
+
return ++Ie, Kt.push(a), qt.push((e = t.binop) != null ? e : -1), Ht.push((s = t.beforeExpr) != null ? s : false), Wt.push((i = t.startsExpr) != null ? i : false), Jt.push((r = t.prefix) != null ? r : false), j.push(new We(a, t)), Ie;
|
|
691
691
|
}
|
|
692
692
|
function b(a, t = {}) {
|
|
693
693
|
var e, s, i, r;
|
|
694
|
-
return ++Ie, zt.set(a, Ie), Kt.push(a), qt.push((e = t.binop) != null ? e : -1), Ht.push((s = t.beforeExpr) != null ? s :
|
|
694
|
+
return ++Ie, zt.set(a, Ie), Kt.push(a), qt.push((e = t.binop) != null ? e : -1), Ht.push((s = t.beforeExpr) != null ? s : false), Wt.push((i = t.startsExpr) != null ? i : false), Jt.push((r = t.prefix) != null ? r : false), j.push(new We("name", t)), Ie;
|
|
695
695
|
}
|
|
696
696
|
var rr = {
|
|
697
697
|
bracketL: P("[", {
|
|
@@ -842,7 +842,7 @@ var rs = ps(Me => {
|
|
|
842
842
|
exponent: P("**", {
|
|
843
843
|
beforeExpr: g,
|
|
844
844
|
binop: 11,
|
|
845
|
-
rightAssociative:
|
|
845
|
+
rightAssociative: true
|
|
846
846
|
}),
|
|
847
847
|
_in: A("in", {
|
|
848
848
|
beforeExpr: g,
|
|
@@ -1072,14 +1072,14 @@ var rs = ps(Me => {
|
|
|
1072
1072
|
eof: P("eof"),
|
|
1073
1073
|
jsxName: P("jsxName"),
|
|
1074
1074
|
jsxText: P("jsxText", {
|
|
1075
|
-
beforeExpr:
|
|
1075
|
+
beforeExpr: true
|
|
1076
1076
|
}),
|
|
1077
1077
|
jsxTagStart: P("jsxTagStart", {
|
|
1078
|
-
startsExpr:
|
|
1078
|
+
startsExpr: true
|
|
1079
1079
|
}),
|
|
1080
1080
|
jsxTagEnd: P("jsxTagEnd"),
|
|
1081
1081
|
placeholder: P("%%", {
|
|
1082
|
-
startsExpr:
|
|
1082
|
+
startsExpr: true
|
|
1083
1083
|
})
|
|
1084
1084
|
};
|
|
1085
1085
|
function S(a) {
|
|
@@ -1161,16 +1161,16 @@ var rs = ps(Me => {
|
|
|
1161
1161
|
function bt(a, t) {
|
|
1162
1162
|
let e = 65536;
|
|
1163
1163
|
for (let s = 0, i = t.length; s < i; s += 2) {
|
|
1164
|
-
if (e += t[s], e > a) return
|
|
1165
|
-
if (e += t[s + 1], e >= a) return
|
|
1164
|
+
if (e += t[s], e > a) return false;
|
|
1165
|
+
if (e += t[s + 1], e >= a) return true;
|
|
1166
1166
|
}
|
|
1167
|
-
return
|
|
1167
|
+
return false;
|
|
1168
1168
|
}
|
|
1169
1169
|
function $(a) {
|
|
1170
|
-
return a < 65 ? a === 36 : a <= 90 ?
|
|
1170
|
+
return a < 65 ? a === 36 : a <= 90 ? true : a < 97 ? a === 95 : a <= 122 ? true : a <= 65535 ? a >= 170 && mr.test(String.fromCharCode(a)) : bt(a, Ls);
|
|
1171
1171
|
}
|
|
1172
1172
|
function he(a) {
|
|
1173
|
-
return a < 48 ? a === 36 : a < 58 ?
|
|
1173
|
+
return a < 48 ? a === 36 : a < 58 ? true : a < 65 ? false : a <= 90 ? true : a < 97 ? a === 95 : a <= 122 ? true : a <= 65535 ? a >= 170 && yr.test(String.fromCharCode(a)) : bt(a, Ls) || bt(a, xr);
|
|
1174
1174
|
}
|
|
1175
1175
|
var Yt = {
|
|
1176
1176
|
keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
|
|
@@ -1283,8 +1283,8 @@ var rs = ps(Me => {
|
|
|
1283
1283
|
let {
|
|
1284
1284
|
flags: e
|
|
1285
1285
|
} = this.scopeStack[t];
|
|
1286
|
-
if (e & Ge) return
|
|
1287
|
-
if (e & (Ue | ee)) return
|
|
1286
|
+
if (e & Ge) return true;
|
|
1287
|
+
if (e & (Ue | ee)) return false;
|
|
1288
1288
|
}
|
|
1289
1289
|
}
|
|
1290
1290
|
get inNonArrowFunction() {
|
|
@@ -1320,7 +1320,7 @@ var rs = ps(Me => {
|
|
|
1320
1320
|
});
|
|
1321
1321
|
}
|
|
1322
1322
|
isRedeclaredInScope(t, e, s) {
|
|
1323
|
-
return s & F ? s & te ? t.lexical.has(e) || t.functions.has(e) || t.var.has(e) : s & ze ? t.lexical.has(e) || !this.treatFunctionsAsVarInScope(t) && t.var.has(e) : t.lexical.has(e) && !(t.flags & Fs && t.lexical.values().next().value === e) || !this.treatFunctionsAsVarInScope(t) && t.functions.has(e) :
|
|
1323
|
+
return s & F ? s & te ? t.lexical.has(e) || t.functions.has(e) || t.var.has(e) : s & ze ? t.lexical.has(e) || !this.treatFunctionsAsVarInScope(t) && t.var.has(e) : t.lexical.has(e) && !(t.flags & Fs && t.lexical.values().next().value === e) || !this.treatFunctionsAsVarInScope(t) && t.functions.has(e) : false;
|
|
1324
1324
|
}
|
|
1325
1325
|
checkLocalExport(t) {
|
|
1326
1326
|
let {
|
|
@@ -1367,7 +1367,7 @@ var rs = ps(Me => {
|
|
|
1367
1367
|
super.declareName(t, e, s);
|
|
1368
1368
|
}
|
|
1369
1369
|
isRedeclaredInScope(t, e, s) {
|
|
1370
|
-
return super.isRedeclaredInScope(t, e, s) ?
|
|
1370
|
+
return super.isRedeclaredInScope(t, e, s) ? true : s & Et ? !t.declareFunctions.has(e) && (t.lexical.has(e) || t.functions.has(e)) : false;
|
|
1371
1371
|
}
|
|
1372
1372
|
checkLocalExport(t) {
|
|
1373
1373
|
this.scopeStack[0].declareFunctions.has(t.name) || super.checkLocalExport(t);
|
|
@@ -1375,16 +1375,16 @@ var rs = ps(Me => {
|
|
|
1375
1375
|
},
|
|
1376
1376
|
It = class {
|
|
1377
1377
|
constructor() {
|
|
1378
|
-
this.sawUnambiguousESM =
|
|
1378
|
+
this.sawUnambiguousESM = false, this.ambiguousScriptDifferentAst = false;
|
|
1379
1379
|
}
|
|
1380
1380
|
hasPlugin(t) {
|
|
1381
1381
|
if (typeof t == "string") return this.plugins.has(t);
|
|
1382
1382
|
{
|
|
1383
1383
|
let [e, s] = t;
|
|
1384
|
-
if (!this.hasPlugin(e)) return
|
|
1384
|
+
if (!this.hasPlugin(e)) return false;
|
|
1385
1385
|
let i = this.plugins.get(e);
|
|
1386
|
-
for (let r of Object.keys(s)) if ((i == null ? void 0 : i[r]) !== s[r]) return
|
|
1387
|
-
return
|
|
1386
|
+
for (let r of Object.keys(s)) if ((i == null ? void 0 : i[r]) !== s[r]) return false;
|
|
1387
|
+
return true;
|
|
1388
1388
|
}
|
|
1389
1389
|
}
|
|
1390
1390
|
getPluginOption(t, e) {
|
|
@@ -1522,9 +1522,9 @@ var rs = ps(Me => {
|
|
|
1522
1522
|
case 13:
|
|
1523
1523
|
case 8232:
|
|
1524
1524
|
case 8233:
|
|
1525
|
-
return
|
|
1525
|
+
return true;
|
|
1526
1526
|
default:
|
|
1527
|
-
return
|
|
1527
|
+
return false;
|
|
1528
1528
|
}
|
|
1529
1529
|
}
|
|
1530
1530
|
var mt = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,
|
|
@@ -1553,17 +1553,17 @@ var rs = ps(Me => {
|
|
|
1553
1553
|
case 8287:
|
|
1554
1554
|
case 12288:
|
|
1555
1555
|
case 65279:
|
|
1556
|
-
return
|
|
1556
|
+
return true;
|
|
1557
1557
|
default:
|
|
1558
|
-
return
|
|
1558
|
+
return false;
|
|
1559
1559
|
}
|
|
1560
1560
|
}
|
|
1561
1561
|
var kt = class a {
|
|
1562
1562
|
constructor() {
|
|
1563
|
-
this.strict = void 0, this.curLine = void 0, this.lineStart = void 0, this.startLoc = void 0, this.endLoc = void 0, this.errors = [], this.potentialArrowAt = -1, this.noArrowAt = [], this.noArrowParamsConversionAt = [], this.maybeInArrowParameters =
|
|
1563
|
+
this.strict = void 0, this.curLine = void 0, this.lineStart = void 0, this.startLoc = void 0, this.endLoc = void 0, this.errors = [], this.potentialArrowAt = -1, this.noArrowAt = [], this.noArrowParamsConversionAt = [], this.maybeInArrowParameters = false, this.inType = false, this.noAnonFunctionType = false, this.hasFlowComment = false, this.isAmbientContext = false, this.inAbstractClass = false, this.inDisallowConditionalTypesContext = false, this.topicContext = {
|
|
1564
1564
|
maxNumOfResolvableTopics: 0,
|
|
1565
1565
|
maxTopicIndex: null
|
|
1566
|
-
}, this.soloAwait =
|
|
1566
|
+
}, this.soloAwait = false, this.inFSharpPipelineDirectBody = false, this.labels = [], this.comments = [], this.commentStack = [], this.pos = 0, this.type = 137, this.value = null, this.start = 0, this.end = 0, this.lastTokEndLoc = null, this.lastTokStartLoc = null, this.lastTokStart = 0, this.context = [E.brace], this.canStartJSXElement = true, this.containsEsc = false, this.firstInvalidTemplateEscapePos = null, this.strictErrors = new Map(), this.tokensLength = 0;
|
|
1567
1567
|
}
|
|
1568
1568
|
init({
|
|
1569
1569
|
strictMode: t,
|
|
@@ -1571,7 +1571,7 @@ var rs = ps(Me => {
|
|
|
1571
1571
|
startLine: s,
|
|
1572
1572
|
startColumn: i
|
|
1573
1573
|
}) {
|
|
1574
|
-
this.strict = t ===
|
|
1574
|
+
this.strict = t === false ? false : t === true ? true : e === "module", this.curLine = s, this.lineStart = -i, this.startLoc = this.endLoc = new B(s, i, 0);
|
|
1575
1575
|
}
|
|
1576
1576
|
curPosition() {
|
|
1577
1577
|
return new B(this.curLine, this.pos - this.lineStart, this.pos);
|
|
@@ -1669,7 +1669,7 @@ var rs = ps(Me => {
|
|
|
1669
1669
|
return ({
|
|
1670
1670
|
code: l,
|
|
1671
1671
|
pos: t
|
|
1672
|
-
} = vt(a, t, e, s, 2,
|
|
1672
|
+
} = vt(a, t, e, s, 2, false, n, r)), o(l === null ? null : String.fromCharCode(l));
|
|
1673
1673
|
}
|
|
1674
1674
|
case 117:
|
|
1675
1675
|
{
|
|
@@ -1720,7 +1720,7 @@ var rs = ps(Me => {
|
|
|
1720
1720
|
return ({
|
|
1721
1721
|
n: l,
|
|
1722
1722
|
pos: t
|
|
1723
|
-
} = qs(a, t, e, s, 16, i, r,
|
|
1723
|
+
} = qs(a, t, e, s, 16, i, r, false, o, !n)), l === null && (n ? o.invalidEscapeSequence(h, e, s) : t = h - 1), {
|
|
1724
1724
|
code: l,
|
|
1725
1725
|
pos: t
|
|
1726
1726
|
};
|
|
@@ -1729,7 +1729,7 @@ var rs = ps(Me => {
|
|
|
1729
1729
|
let c = t,
|
|
1730
1730
|
u = i === 16 ? Ps.hex : Ps.decBinOct,
|
|
1731
1731
|
d = i === 16 ? $e.hex : i === 10 ? $e.dec : i === 8 ? $e.oct : $e.bin,
|
|
1732
|
-
f =
|
|
1732
|
+
f = false,
|
|
1733
1733
|
x = 0;
|
|
1734
1734
|
for (let I = 0, C = r ?? 1 / 0; I < C; ++I) {
|
|
1735
1735
|
let w = a.charCodeAt(t),
|
|
@@ -1760,7 +1760,7 @@ var rs = ps(Me => {
|
|
|
1760
1760
|
n: null,
|
|
1761
1761
|
pos: t
|
|
1762
1762
|
};
|
|
1763
|
-
if (N <= 9 && h.invalidDigit(t, e, s, i)) N = 0;else if (n) N = 0, f =
|
|
1763
|
+
if (N <= 9 && h.invalidDigit(t, e, s, i)) N = 0;else if (n) N = 0, f = true;else break;
|
|
1764
1764
|
}
|
|
1765
1765
|
++t, x = x * i + N;
|
|
1766
1766
|
}
|
|
@@ -1779,14 +1779,14 @@ var rs = ps(Me => {
|
|
|
1779
1779
|
if (++t, ({
|
|
1780
1780
|
code: o,
|
|
1781
1781
|
pos: t
|
|
1782
|
-
} = vt(a, t, e, s, a.indexOf("}", t) - t,
|
|
1782
|
+
} = vt(a, t, e, s, a.indexOf("}", t) - t, true, i, r)), ++t, o !== null && o > 1114111) if (i) r.invalidCodePoint(t, e, s);else return {
|
|
1783
1783
|
code: null,
|
|
1784
1784
|
pos: t
|
|
1785
1785
|
};
|
|
1786
1786
|
} else ({
|
|
1787
1787
|
code: o,
|
|
1788
1788
|
pos: t
|
|
1789
|
-
} = vt(a, t, e, s, 4,
|
|
1789
|
+
} = vt(a, t, e, s, 4, false, i, r));
|
|
1790
1790
|
return {
|
|
1791
1791
|
code: o,
|
|
1792
1792
|
pos: t
|
|
@@ -1809,7 +1809,7 @@ var rs = ps(Me => {
|
|
|
1809
1809
|
invalidDigit: (s, i, r, n) => this.options.errorRecovery ? (this.raise(p.InvalidDigit, {
|
|
1810
1810
|
at: Ce(s, i, r),
|
|
1811
1811
|
radix: n
|
|
1812
|
-
}),
|
|
1812
|
+
}), true) : false,
|
|
1813
1813
|
numericSeparatorInEscapeSequence: this.errorBuilder(p.NumericSeparatorInEscapeSequence),
|
|
1814
1814
|
unexpectedNumericSeparator: this.errorBuilder(p.UnexpectedNumericSeparator)
|
|
1815
1815
|
}, this.errorHandlers_readCodePoint = Object.assign({}, this.errorHandlers_readInt, {
|
|
@@ -1833,7 +1833,7 @@ var rs = ps(Me => {
|
|
|
1833
1833
|
at: Ce(s, i, r)
|
|
1834
1834
|
});
|
|
1835
1835
|
}
|
|
1836
|
-
}), this.state = new kt(), this.state.init(t), this.input = e, this.length = e.length, this.isLookahead =
|
|
1836
|
+
}), this.state = new kt(), this.state.init(t), this.input = e, this.length = e.length, this.isLookahead = false;
|
|
1837
1837
|
}
|
|
1838
1838
|
pushToken(t) {
|
|
1839
1839
|
this.tokens.length = this.state.tokensLength, this.tokens.push(t), ++this.state.tokensLength;
|
|
@@ -1842,7 +1842,7 @@ var rs = ps(Me => {
|
|
|
1842
1842
|
this.checkKeywordEscapes(), this.options.tokens && this.pushToken(new O(this.state)), this.state.lastTokStart = this.state.start, this.state.lastTokEndLoc = this.state.endLoc, this.state.lastTokStartLoc = this.state.startLoc, this.nextToken();
|
|
1843
1843
|
}
|
|
1844
1844
|
eat(t) {
|
|
1845
|
-
return this.match(t) ? (this.next(),
|
|
1845
|
+
return this.match(t) ? (this.next(), true) : false;
|
|
1846
1846
|
}
|
|
1847
1847
|
match(t) {
|
|
1848
1848
|
return this.state.type === t;
|
|
@@ -1865,7 +1865,7 @@ var rs = ps(Me => {
|
|
|
1865
1865
|
}
|
|
1866
1866
|
lookahead() {
|
|
1867
1867
|
let t = this.state;
|
|
1868
|
-
this.state = this.createLookaheadState(t), this.isLookahead =
|
|
1868
|
+
this.state = this.createLookaheadState(t), this.isLookahead = true, this.nextToken(), this.isLookahead = false;
|
|
1869
1869
|
let e = this.state;
|
|
1870
1870
|
return this.state = t, e;
|
|
1871
1871
|
}
|
|
@@ -2036,7 +2036,7 @@ var rs = ps(Me => {
|
|
|
2036
2036
|
readToken_dot() {
|
|
2037
2037
|
let t = this.input.charCodeAt(this.state.pos + 1);
|
|
2038
2038
|
if (t >= 48 && t <= 57) {
|
|
2039
|
-
this.readNumber(
|
|
2039
|
+
this.readNumber(true);
|
|
2040
2040
|
return;
|
|
2041
2041
|
}
|
|
2042
2042
|
t === 46 && this.input.charCodeAt(this.state.pos + 2) === 46 ? (this.state.pos += 3, this.finishToken(21)) : (++this.state.pos, this.finishToken(16));
|
|
@@ -2045,13 +2045,13 @@ var rs = ps(Me => {
|
|
|
2045
2045
|
this.input.charCodeAt(this.state.pos + 1) === 61 ? this.finishOp(31, 2) : this.finishOp(56, 1);
|
|
2046
2046
|
}
|
|
2047
2047
|
readToken_interpreter() {
|
|
2048
|
-
if (this.state.pos !== 0 || this.length < 2) return
|
|
2048
|
+
if (this.state.pos !== 0 || this.length < 2) return false;
|
|
2049
2049
|
let t = this.input.charCodeAt(this.state.pos + 1);
|
|
2050
|
-
if (t !== 33) return
|
|
2050
|
+
if (t !== 33) return false;
|
|
2051
2051
|
let e = this.state.pos;
|
|
2052
2052
|
for (this.state.pos += 1; !ke(t) && ++this.state.pos < this.length;) t = this.input.charCodeAt(this.state.pos);
|
|
2053
2053
|
let s = this.input.slice(e + 2, this.state.pos);
|
|
2054
|
-
return this.finishToken(28, s),
|
|
2054
|
+
return this.finishToken(28, s), true;
|
|
2055
2055
|
}
|
|
2056
2056
|
readToken_mult_modulo(t) {
|
|
2057
2057
|
let e = t === 42 ? 55 : 54,
|
|
@@ -2241,7 +2241,7 @@ var rs = ps(Me => {
|
|
|
2241
2241
|
case 55:
|
|
2242
2242
|
case 56:
|
|
2243
2243
|
case 57:
|
|
2244
|
-
this.readNumber(
|
|
2244
|
+
this.readNumber(false);
|
|
2245
2245
|
return;
|
|
2246
2246
|
case 34:
|
|
2247
2247
|
case 39:
|
|
@@ -2318,8 +2318,8 @@ var rs = ps(Me => {
|
|
|
2318
2318
|
if (ke(l)) throw this.raise(p.UnterminatedRegExp, {
|
|
2319
2319
|
at: L(t, 1)
|
|
2320
2320
|
});
|
|
2321
|
-
if (s) s =
|
|
2322
|
-
if (l === 91) i =
|
|
2321
|
+
if (s) s = false;else {
|
|
2322
|
+
if (l === 91) i = true;else if (l === 93 && i) i = false;else if (l === 47 && !i) break;
|
|
2323
2323
|
s = l === 92;
|
|
2324
2324
|
}
|
|
2325
2325
|
}
|
|
@@ -2346,16 +2346,16 @@ var rs = ps(Me => {
|
|
|
2346
2346
|
flags: o
|
|
2347
2347
|
});
|
|
2348
2348
|
}
|
|
2349
|
-
readInt(t, e, s =
|
|
2349
|
+
readInt(t, e, s = false, i = true) {
|
|
2350
2350
|
let {
|
|
2351
2351
|
n: r,
|
|
2352
2352
|
pos: n
|
|
2353
|
-
} = qs(this.input, this.state.pos, this.state.lineStart, this.state.curLine, t, e, s, i, this.errorHandlers_readInt,
|
|
2353
|
+
} = qs(this.input, this.state.pos, this.state.lineStart, this.state.curLine, t, e, s, i, this.errorHandlers_readInt, false);
|
|
2354
2354
|
return this.state.pos = n, r;
|
|
2355
2355
|
}
|
|
2356
2356
|
readRadixNumber(t) {
|
|
2357
2357
|
let e = this.state.curPosition(),
|
|
2358
|
-
s =
|
|
2358
|
+
s = false;
|
|
2359
2359
|
this.state.pos += 2;
|
|
2360
2360
|
let i = this.readInt(t);
|
|
2361
2361
|
i == null && this.raise(p.InvalidDigit, {
|
|
@@ -2363,7 +2363,7 @@ var rs = ps(Me => {
|
|
|
2363
2363
|
radix: t
|
|
2364
2364
|
});
|
|
2365
2365
|
let r = this.input.charCodeAt(this.state.pos);
|
|
2366
|
-
if (r === 110) ++this.state.pos, s =
|
|
2366
|
+
if (r === 110) ++this.state.pos, s = true;else if (r === 109) throw this.raise(p.InvalidDecimal, {
|
|
2367
2367
|
at: e
|
|
2368
2368
|
});
|
|
2369
2369
|
if ($(this.codePointAtPos(this.state.pos))) throw this.raise(p.NumberIdentifier, {
|
|
@@ -2379,11 +2379,11 @@ var rs = ps(Me => {
|
|
|
2379
2379
|
readNumber(t) {
|
|
2380
2380
|
let e = this.state.pos,
|
|
2381
2381
|
s = this.state.curPosition(),
|
|
2382
|
-
i =
|
|
2383
|
-
r =
|
|
2384
|
-
n =
|
|
2385
|
-
o =
|
|
2386
|
-
h =
|
|
2382
|
+
i = false,
|
|
2383
|
+
r = false,
|
|
2384
|
+
n = false,
|
|
2385
|
+
o = false,
|
|
2386
|
+
h = false;
|
|
2387
2387
|
!t && this.readInt(10) === null && this.raise(p.InvalidNumber, {
|
|
2388
2388
|
at: this.state.curPosition()
|
|
2389
2389
|
});
|
|
@@ -2401,13 +2401,13 @@ var rs = ps(Me => {
|
|
|
2401
2401
|
h = l && !/[89]/.test(f);
|
|
2402
2402
|
}
|
|
2403
2403
|
let c = this.input.charCodeAt(this.state.pos);
|
|
2404
|
-
if (c === 46 && !h && (++this.state.pos, this.readInt(10), i =
|
|
2404
|
+
if (c === 46 && !h && (++this.state.pos, this.readInt(10), i = true, c = this.input.charCodeAt(this.state.pos)), (c === 69 || c === 101) && !h && (c = this.input.charCodeAt(++this.state.pos), (c === 43 || c === 45) && ++this.state.pos, this.readInt(10) === null && this.raise(p.InvalidOrMissingExponent, {
|
|
2405
2405
|
at: s
|
|
2406
|
-
}), i =
|
|
2406
|
+
}), i = true, o = true, c = this.input.charCodeAt(this.state.pos)), c === 110 && ((i || l) && this.raise(p.InvalidBigIntLiteral, {
|
|
2407
2407
|
at: s
|
|
2408
|
-
}), ++this.state.pos, r =
|
|
2408
|
+
}), ++this.state.pos, r = true), c === 109 && (this.expectPlugin("decimal", this.state.curPosition()), (o || l) && this.raise(p.InvalidDecimal, {
|
|
2409
2409
|
at: s
|
|
2410
|
-
}), ++this.state.pos, n =
|
|
2410
|
+
}), ++this.state.pos, n = true), $(this.codePointAtPos(this.state.pos))) throw this.raise(p.NumberIdentifier, {
|
|
2411
2411
|
at: this.state.curPosition()
|
|
2412
2412
|
});
|
|
2413
2413
|
let u = this.input.slice(e, this.state.pos).replace(/[_mn]/g, "");
|
|
@@ -2461,14 +2461,14 @@ var rs = ps(Me => {
|
|
|
2461
2461
|
}) : this.state.strictErrors.set(s, [t, e]);
|
|
2462
2462
|
}
|
|
2463
2463
|
readWord1(t) {
|
|
2464
|
-
this.state.containsEsc =
|
|
2464
|
+
this.state.containsEsc = false;
|
|
2465
2465
|
let e = "",
|
|
2466
2466
|
s = this.state.pos,
|
|
2467
2467
|
i = this.state.pos;
|
|
2468
2468
|
for (t !== void 0 && (this.state.pos += t <= 65535 ? 1 : 2); this.state.pos < this.length;) {
|
|
2469
2469
|
let r = this.codePointAtPos(this.state.pos);
|
|
2470
2470
|
if (he(r)) this.state.pos += r <= 65535 ? 1 : 2;else if (r === 92) {
|
|
2471
|
-
this.state.containsEsc =
|
|
2471
|
+
this.state.containsEsc = true, e += this.input.slice(i, this.state.pos);
|
|
2472
2472
|
let n = this.state.curPosition(),
|
|
2473
2473
|
o = this.state.pos === s ? $ : he;
|
|
2474
2474
|
if (this.input.charCodeAt(++this.state.pos) !== 117) {
|
|
@@ -2478,7 +2478,7 @@ var rs = ps(Me => {
|
|
|
2478
2478
|
continue;
|
|
2479
2479
|
}
|
|
2480
2480
|
++this.state.pos;
|
|
2481
|
-
let h = this.readCodePoint(
|
|
2481
|
+
let h = this.readCodePoint(true);
|
|
2482
2482
|
h !== null && (o(h) || this.raise(p.EscapedCharNotAnIdentifier, {
|
|
2483
2483
|
at: n
|
|
2484
2484
|
}), e += String.fromCodePoint(h)), i = this.state.pos;
|
|
@@ -2539,7 +2539,7 @@ var rs = ps(Me => {
|
|
|
2539
2539
|
});
|
|
2540
2540
|
}
|
|
2541
2541
|
expectPlugin(t, e) {
|
|
2542
|
-
if (this.hasPlugin(t)) return
|
|
2542
|
+
if (this.hasPlugin(t)) return true;
|
|
2543
2543
|
throw this.raise(p.MissingPlugin, {
|
|
2544
2544
|
at: e ?? this.state.startLoc,
|
|
2545
2545
|
missingPlugin: [t]
|
|
@@ -2758,7 +2758,7 @@ var rs = ps(Me => {
|
|
|
2758
2758
|
return (a ? it : 0) | (t ? Gs : 0);
|
|
2759
2759
|
}
|
|
2760
2760
|
var Ft = class extends Lt {
|
|
2761
|
-
addExtra(t, e, s, i =
|
|
2761
|
+
addExtra(t, e, s, i = true) {
|
|
2762
2762
|
if (!t) return;
|
|
2763
2763
|
let r = t.extra = t.extra || {};
|
|
2764
2764
|
i ? r[e] = s : Object.defineProperty(r, e, {
|
|
@@ -2775,14 +2775,14 @@ var rs = ps(Me => {
|
|
|
2775
2775
|
let i = this.input.charCodeAt(s);
|
|
2776
2776
|
return !(he(i) || (i & 64512) === 55296);
|
|
2777
2777
|
}
|
|
2778
|
-
return
|
|
2778
|
+
return false;
|
|
2779
2779
|
}
|
|
2780
2780
|
isLookaheadContextual(t) {
|
|
2781
2781
|
let e = this.nextTokenStart();
|
|
2782
2782
|
return this.isUnparsedContextual(e, t);
|
|
2783
2783
|
}
|
|
2784
2784
|
eatContextual(t) {
|
|
2785
|
-
return this.isContextual(t) ? (this.next(),
|
|
2785
|
+
return this.isContextual(t) ? (this.next(), true) : false;
|
|
2786
2786
|
}
|
|
2787
2787
|
expectContextual(t, e) {
|
|
2788
2788
|
if (!this.eatContextual(t)) {
|
|
@@ -2804,7 +2804,7 @@ var rs = ps(Me => {
|
|
|
2804
2804
|
isLineTerminator() {
|
|
2805
2805
|
return this.eat(13) || this.canInsertSemicolon();
|
|
2806
2806
|
}
|
|
2807
|
-
semicolon(t =
|
|
2807
|
+
semicolon(t = true) {
|
|
2808
2808
|
(t ? this.isLineTerminator() : this.eat(13)) || this.raise(p.MissingSemicolon, {
|
|
2809
2809
|
at: this.state.lastTokEndLoc
|
|
2810
2810
|
});
|
|
@@ -2842,22 +2842,22 @@ var rs = ps(Me => {
|
|
|
2842
2842
|
if (this.state = e, i instanceof SyntaxError) return {
|
|
2843
2843
|
node: null,
|
|
2844
2844
|
error: i,
|
|
2845
|
-
thrown:
|
|
2846
|
-
aborted:
|
|
2845
|
+
thrown: true,
|
|
2846
|
+
aborted: false,
|
|
2847
2847
|
failState: r
|
|
2848
2848
|
};
|
|
2849
2849
|
if (i === s) return {
|
|
2850
2850
|
node: s.node,
|
|
2851
2851
|
error: null,
|
|
2852
|
-
thrown:
|
|
2853
|
-
aborted:
|
|
2852
|
+
thrown: false,
|
|
2853
|
+
aborted: true,
|
|
2854
2854
|
failState: r
|
|
2855
2855
|
};
|
|
2856
2856
|
throw i;
|
|
2857
2857
|
}
|
|
2858
2858
|
}
|
|
2859
2859
|
checkExpressionErrors(t, e) {
|
|
2860
|
-
if (!t) return
|
|
2860
|
+
if (!t) return false;
|
|
2861
2861
|
let {
|
|
2862
2862
|
shorthandAssignLoc: s,
|
|
2863
2863
|
doubleProtoLoc: i,
|
|
@@ -3135,7 +3135,7 @@ var rs = ps(Me => {
|
|
|
3135
3135
|
}
|
|
3136
3136
|
flowParseTypeInitialiser(e) {
|
|
3137
3137
|
let s = this.state.inType;
|
|
3138
|
-
this.state.inType =
|
|
3138
|
+
this.state.inType = true, this.expect(e || 14);
|
|
3139
3139
|
let i = this.flowParseType();
|
|
3140
3140
|
return this.state.inType = s, i;
|
|
3141
3141
|
}
|
|
@@ -3148,13 +3148,13 @@ var rs = ps(Me => {
|
|
|
3148
3148
|
}
|
|
3149
3149
|
flowParseTypeAndPredicateInitialiser() {
|
|
3150
3150
|
let e = this.state.inType;
|
|
3151
|
-
this.state.inType =
|
|
3151
|
+
this.state.inType = true, this.expect(14);
|
|
3152
3152
|
let s = null,
|
|
3153
3153
|
i = null;
|
|
3154
3154
|
return this.match(54) ? (this.state.inType = e, i = this.flowParsePredicate()) : (s = this.flowParseType(), this.state.inType = e, this.match(54) && (i = this.flowParsePredicate())), [s, i];
|
|
3155
3155
|
}
|
|
3156
3156
|
flowParseDeclareClass(e) {
|
|
3157
|
-
return this.next(), this.flowParseInterfaceish(e,
|
|
3157
|
+
return this.next(), this.flowParseInterfaceish(e, true), this.finishNode(e, "DeclareClass");
|
|
3158
3158
|
}
|
|
3159
3159
|
flowParseDeclareFunction(e) {
|
|
3160
3160
|
this.next();
|
|
@@ -3179,7 +3179,7 @@ var rs = ps(Me => {
|
|
|
3179
3179
|
this.unexpected();
|
|
3180
3180
|
}
|
|
3181
3181
|
flowParseDeclareVariable(e) {
|
|
3182
|
-
return this.next(), e.id = this.flowParseTypeAnnotatableIdentifier(
|
|
3182
|
+
return this.next(), e.id = this.flowParseTypeAnnotatableIdentifier(true), this.scope.declareName(e.id.name, Qe, e.id.loc.start), this.semicolon(), this.finishNode(e, "DeclareVariable");
|
|
3183
3183
|
}
|
|
3184
3184
|
flowParseDeclareModule(e) {
|
|
3185
3185
|
this.scope.enter(ae), this.match(131) ? e.id = super.parseExprAtom() : e.id = this.parseIdentifier();
|
|
@@ -3189,11 +3189,11 @@ var rs = ps(Me => {
|
|
|
3189
3189
|
let o = this.startNode();
|
|
3190
3190
|
this.match(83) ? (this.next(), !this.isContextual(128) && !this.match(87) && this.raise(T.InvalidNonTypeImportInDeclareModule, {
|
|
3191
3191
|
at: this.state.lastTokStartLoc
|
|
3192
|
-
}), super.parseImport(o)) : (this.expectContextual(123, T.UnsupportedStatementInDeclareModule), o = this.flowParseDeclare(o,
|
|
3192
|
+
}), super.parseImport(o)) : (this.expectContextual(123, T.UnsupportedStatementInDeclareModule), o = this.flowParseDeclare(o, true)), i.push(o);
|
|
3193
3193
|
}
|
|
3194
3194
|
this.scope.exit(), this.expect(8), this.finishNode(s, "BlockStatement");
|
|
3195
3195
|
let r = null,
|
|
3196
|
-
n =
|
|
3196
|
+
n = false;
|
|
3197
3197
|
return i.forEach(o => {
|
|
3198
3198
|
Yr(o) ? (r === "CommonJS" && this.raise(T.AmbiguousDeclareModuleKind, {
|
|
3199
3199
|
at: o
|
|
@@ -3201,11 +3201,11 @@ var rs = ps(Me => {
|
|
|
3201
3201
|
at: o
|
|
3202
3202
|
}), r === "ES" && this.raise(T.AmbiguousDeclareModuleKind, {
|
|
3203
3203
|
at: o
|
|
3204
|
-
}), r = "CommonJS", n =
|
|
3204
|
+
}), r = "CommonJS", n = true);
|
|
3205
3205
|
}), e.kind = r || "CommonJS", this.finishNode(e, "DeclareModule");
|
|
3206
3206
|
}
|
|
3207
3207
|
flowParseDeclareExportDeclaration(e, s) {
|
|
3208
|
-
if (this.expect(82), this.eat(65)) return this.match(68) || this.match(80) ? e.declaration = this.flowParseDeclare(this.startNode()) : (e.declaration = this.flowParseType(), this.semicolon()), e.default =
|
|
3208
|
+
if (this.expect(82), this.eat(65)) return this.match(68) || this.match(80) ? e.declaration = this.flowParseDeclare(this.startNode()) : (e.declaration = this.flowParseType(), this.semicolon()), e.default = true, this.finishNode(e, "DeclareExportDeclaration");
|
|
3209
3209
|
if (this.match(75) || this.isLet() || (this.isContextual(128) || this.isContextual(127)) && !s) {
|
|
3210
3210
|
let i = this.state.value;
|
|
3211
3211
|
throw this.raise(T.UnsupportedDeclareExportKind, {
|
|
@@ -3214,8 +3214,8 @@ var rs = ps(Me => {
|
|
|
3214
3214
|
suggestion: Qr[i]
|
|
3215
3215
|
});
|
|
3216
3216
|
}
|
|
3217
|
-
if (this.match(74) || this.match(68) || this.match(80) || this.isContextual(129)) return e.declaration = this.flowParseDeclare(this.startNode()), e.default =
|
|
3218
|
-
if (this.match(55) || this.match(5) || this.isContextual(127) || this.isContextual(128) || this.isContextual(129)) return e = this.parseExport(e, null), e.type === "ExportNamedDeclaration" && (e.type = "ExportDeclaration", e.default =
|
|
3217
|
+
if (this.match(74) || this.match(68) || this.match(80) || this.isContextual(129)) return e.declaration = this.flowParseDeclare(this.startNode()), e.default = false, this.finishNode(e, "DeclareExportDeclaration");
|
|
3218
|
+
if (this.match(55) || this.match(5) || this.isContextual(127) || this.isContextual(128) || this.isContextual(129)) return e = this.parseExport(e, null), e.type === "ExportNamedDeclaration" && (e.type = "ExportDeclaration", e.default = false, delete e.exportKind), e.type = "Declare" + e.type, e;
|
|
3219
3219
|
this.unexpected();
|
|
3220
3220
|
}
|
|
3221
3221
|
flowParseDeclareModuleExports(e) {
|
|
@@ -3228,24 +3228,24 @@ var rs = ps(Me => {
|
|
|
3228
3228
|
}
|
|
3229
3229
|
flowParseDeclareOpaqueType(e) {
|
|
3230
3230
|
this.next();
|
|
3231
|
-
let s = this.flowParseOpaqueType(e,
|
|
3231
|
+
let s = this.flowParseOpaqueType(e, true);
|
|
3232
3232
|
return s.type = "DeclareOpaqueType", s;
|
|
3233
3233
|
}
|
|
3234
3234
|
flowParseDeclareInterface(e) {
|
|
3235
|
-
return this.next(), this.flowParseInterfaceish(e,
|
|
3235
|
+
return this.next(), this.flowParseInterfaceish(e, false), this.finishNode(e, "DeclareInterface");
|
|
3236
3236
|
}
|
|
3237
3237
|
flowParseInterfaceish(e, s) {
|
|
3238
|
-
if (e.id = this.flowParseRestrictedIdentifier(!s,
|
|
3238
|
+
if (e.id = this.flowParseRestrictedIdentifier(!s, true), this.scope.declareName(e.id.name, s ? $s : ce, e.id.loc.start), this.match(47) ? e.typeParameters = this.flowParseTypeParameterDeclaration() : e.typeParameters = null, e.extends = [], this.eat(81)) do e.extends.push(this.flowParseInterfaceExtends()); while (!s && this.eat(12));
|
|
3239
3239
|
if (s) {
|
|
3240
3240
|
if (e.implements = [], e.mixins = [], this.eatContextual(115)) do e.mixins.push(this.flowParseInterfaceExtends()); while (this.eat(12));
|
|
3241
3241
|
if (this.eatContextual(111)) do e.implements.push(this.flowParseInterfaceExtends()); while (this.eat(12));
|
|
3242
3242
|
}
|
|
3243
3243
|
e.body = this.flowParseObjectType({
|
|
3244
3244
|
allowStatic: s,
|
|
3245
|
-
allowExact:
|
|
3246
|
-
allowSpread:
|
|
3245
|
+
allowExact: false,
|
|
3246
|
+
allowSpread: false,
|
|
3247
3247
|
allowProto: s,
|
|
3248
|
-
allowInexact:
|
|
3248
|
+
allowInexact: false
|
|
3249
3249
|
});
|
|
3250
3250
|
}
|
|
3251
3251
|
flowParseInterfaceExtends() {
|
|
@@ -3253,7 +3253,7 @@ var rs = ps(Me => {
|
|
|
3253
3253
|
return e.id = this.flowParseQualifiedTypeIdentifier(), this.match(47) ? e.typeParameters = this.flowParseTypeParameterInstantiation() : e.typeParameters = null, this.finishNode(e, "InterfaceExtends");
|
|
3254
3254
|
}
|
|
3255
3255
|
flowParseInterface(e) {
|
|
3256
|
-
return this.flowParseInterfaceish(e,
|
|
3256
|
+
return this.flowParseInterfaceish(e, false), this.finishNode(e, "InterfaceDeclaration");
|
|
3257
3257
|
}
|
|
3258
3258
|
checkNotUnderscore(e) {
|
|
3259
3259
|
e === "_" && this.raise(T.UnexpectedReservedUnderscore, {
|
|
@@ -3270,12 +3270,12 @@ var rs = ps(Me => {
|
|
|
3270
3270
|
return this.checkReservedType(this.state.value, this.state.startLoc, s), this.parseIdentifier(e);
|
|
3271
3271
|
}
|
|
3272
3272
|
flowParseTypeAlias(e) {
|
|
3273
|
-
return e.id = this.flowParseRestrictedIdentifier(
|
|
3273
|
+
return e.id = this.flowParseRestrictedIdentifier(false, true), this.scope.declareName(e.id.name, ce, e.id.loc.start), this.match(47) ? e.typeParameters = this.flowParseTypeParameterDeclaration() : e.typeParameters = null, e.right = this.flowParseTypeInitialiser(29), this.semicolon(), this.finishNode(e, "TypeAlias");
|
|
3274
3274
|
}
|
|
3275
3275
|
flowParseOpaqueType(e, s) {
|
|
3276
|
-
return this.expectContextual(128), e.id = this.flowParseRestrictedIdentifier(
|
|
3276
|
+
return this.expectContextual(128), e.id = this.flowParseRestrictedIdentifier(true, true), this.scope.declareName(e.id.name, ce, e.id.loc.start), this.match(47) ? e.typeParameters = this.flowParseTypeParameterDeclaration() : e.typeParameters = null, e.supertype = null, this.match(14) && (e.supertype = this.flowParseTypeInitialiser(14)), e.impltype = null, s || (e.impltype = this.flowParseTypeInitialiser(29)), this.semicolon(), this.finishNode(e, "OpaqueType");
|
|
3277
3277
|
}
|
|
3278
|
-
flowParseTypeParameter(e =
|
|
3278
|
+
flowParseTypeParameter(e = false) {
|
|
3279
3279
|
let s = this.state.startLoc,
|
|
3280
3280
|
i = this.startNode(),
|
|
3281
3281
|
r = this.flowParseVariance(),
|
|
@@ -3287,51 +3287,51 @@ var rs = ps(Me => {
|
|
|
3287
3287
|
flowParseTypeParameterDeclaration() {
|
|
3288
3288
|
let e = this.state.inType,
|
|
3289
3289
|
s = this.startNode();
|
|
3290
|
-
s.params = [], this.state.inType =
|
|
3291
|
-
let i =
|
|
3290
|
+
s.params = [], this.state.inType = true, this.match(47) || this.match(140) ? this.next() : this.unexpected();
|
|
3291
|
+
let i = false;
|
|
3292
3292
|
do {
|
|
3293
3293
|
let r = this.flowParseTypeParameter(i);
|
|
3294
|
-
s.params.push(r), r.default && (i =
|
|
3294
|
+
s.params.push(r), r.default && (i = true), this.match(48) || this.expect(12);
|
|
3295
3295
|
} while (!this.match(48));
|
|
3296
3296
|
return this.expect(48), this.state.inType = e, this.finishNode(s, "TypeParameterDeclaration");
|
|
3297
3297
|
}
|
|
3298
3298
|
flowParseTypeParameterInstantiation() {
|
|
3299
3299
|
let e = this.startNode(),
|
|
3300
3300
|
s = this.state.inType;
|
|
3301
|
-
e.params = [], this.state.inType =
|
|
3301
|
+
e.params = [], this.state.inType = true, this.expect(47);
|
|
3302
3302
|
let i = this.state.noAnonFunctionType;
|
|
3303
|
-
for (this.state.noAnonFunctionType =
|
|
3303
|
+
for (this.state.noAnonFunctionType = false; !this.match(48);) e.params.push(this.flowParseType()), this.match(48) || this.expect(12);
|
|
3304
3304
|
return this.state.noAnonFunctionType = i, this.expect(48), this.state.inType = s, this.finishNode(e, "TypeParameterInstantiation");
|
|
3305
3305
|
}
|
|
3306
3306
|
flowParseTypeParameterInstantiationCallOrNew() {
|
|
3307
3307
|
let e = this.startNode(),
|
|
3308
3308
|
s = this.state.inType;
|
|
3309
|
-
for (e.params = [], this.state.inType =
|
|
3309
|
+
for (e.params = [], this.state.inType = true, this.expect(47); !this.match(48);) e.params.push(this.flowParseTypeOrImplicitInstantiation()), this.match(48) || this.expect(12);
|
|
3310
3310
|
return this.expect(48), this.state.inType = s, this.finishNode(e, "TypeParameterInstantiation");
|
|
3311
3311
|
}
|
|
3312
3312
|
flowParseInterfaceType() {
|
|
3313
3313
|
let e = this.startNode();
|
|
3314
3314
|
if (this.expectContextual(127), e.extends = [], this.eat(81)) do e.extends.push(this.flowParseInterfaceExtends()); while (this.eat(12));
|
|
3315
3315
|
return e.body = this.flowParseObjectType({
|
|
3316
|
-
allowStatic:
|
|
3317
|
-
allowExact:
|
|
3318
|
-
allowSpread:
|
|
3319
|
-
allowProto:
|
|
3320
|
-
allowInexact:
|
|
3316
|
+
allowStatic: false,
|
|
3317
|
+
allowExact: false,
|
|
3318
|
+
allowSpread: false,
|
|
3319
|
+
allowProto: false,
|
|
3320
|
+
allowInexact: false
|
|
3321
3321
|
}), this.finishNode(e, "InterfaceTypeAnnotation");
|
|
3322
3322
|
}
|
|
3323
3323
|
flowParseObjectPropertyKey() {
|
|
3324
|
-
return this.match(132) || this.match(131) ? super.parseExprAtom() : this.parseIdentifier(
|
|
3324
|
+
return this.match(132) || this.match(131) ? super.parseExprAtom() : this.parseIdentifier(true);
|
|
3325
3325
|
}
|
|
3326
3326
|
flowParseObjectTypeIndexer(e, s, i) {
|
|
3327
3327
|
return e.static = s, this.lookahead().type === 14 ? (e.id = this.flowParseObjectPropertyKey(), e.key = this.flowParseTypeInitialiser()) : (e.id = null, e.key = this.flowParseType()), this.expect(3), e.value = this.flowParseTypeInitialiser(), e.variance = i, this.finishNode(e, "ObjectTypeIndexer");
|
|
3328
3328
|
}
|
|
3329
3329
|
flowParseObjectTypeInternalSlot(e, s) {
|
|
3330
|
-
return e.static = s, e.id = this.flowParseObjectPropertyKey(), this.expect(3), this.expect(3), this.match(47) || this.match(10) ? (e.method =
|
|
3330
|
+
return e.static = s, e.id = this.flowParseObjectPropertyKey(), this.expect(3), this.expect(3), this.match(47) || this.match(10) ? (e.method = true, e.optional = false, e.value = this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start))) : (e.method = false, this.eat(17) && (e.optional = true), e.value = this.flowParseTypeInitialiser()), this.finishNode(e, "ObjectTypeInternalSlot");
|
|
3331
3331
|
}
|
|
3332
3332
|
flowParseObjectTypeMethodish(e) {
|
|
3333
|
-
for (e.params = [], e.rest = null, e.typeParameters = null, e.this = null, this.match(47) && (e.typeParameters = this.flowParseTypeParameterDeclaration()), this.expect(10), this.match(78) && (e.this = this.flowParseFunctionTypeParam(
|
|
3334
|
-
return this.eat(21) && (e.rest = this.flowParseFunctionTypeParam(
|
|
3333
|
+
for (e.params = [], e.rest = null, e.typeParameters = null, e.this = null, this.match(47) && (e.typeParameters = this.flowParseTypeParameterDeclaration()), this.expect(10), this.match(78) && (e.this = this.flowParseFunctionTypeParam(true), e.this.name = null, this.match(11) || this.expect(12)); !this.match(11) && !this.match(21);) e.params.push(this.flowParseFunctionTypeParam(false)), this.match(11) || this.expect(12);
|
|
3334
|
+
return this.eat(21) && (e.rest = this.flowParseFunctionTypeParam(false)), this.expect(11), e.returnType = this.flowParseTypeInitialiser(), this.finishNode(e, "FunctionTypeAnnotation");
|
|
3335
3335
|
}
|
|
3336
3336
|
flowParseObjectTypeCallProperty(e, s) {
|
|
3337
3337
|
let i = this.startNode();
|
|
@@ -3345,24 +3345,24 @@ var rs = ps(Me => {
|
|
|
3345
3345
|
allowInexact: n
|
|
3346
3346
|
}) {
|
|
3347
3347
|
let o = this.state.inType;
|
|
3348
|
-
this.state.inType =
|
|
3348
|
+
this.state.inType = true;
|
|
3349
3349
|
let h = this.startNode();
|
|
3350
3350
|
h.callProperties = [], h.properties = [], h.indexers = [], h.internalSlots = [];
|
|
3351
3351
|
let l,
|
|
3352
3352
|
c,
|
|
3353
|
-
u =
|
|
3354
|
-
for (s && this.match(6) ? (this.expect(6), l = 9, c =
|
|
3355
|
-
let f =
|
|
3353
|
+
u = false;
|
|
3354
|
+
for (s && this.match(6) ? (this.expect(6), l = 9, c = true) : (this.expect(5), l = 8, c = false), h.exact = c; !this.match(l);) {
|
|
3355
|
+
let f = false,
|
|
3356
3356
|
x = null,
|
|
3357
3357
|
I = null,
|
|
3358
3358
|
C = this.startNode();
|
|
3359
3359
|
if (r && this.isContextual(116)) {
|
|
3360
3360
|
let N = this.lookahead();
|
|
3361
|
-
N.type !== 14 && N.type !== 17 && (this.next(), x = this.state.startLoc, e =
|
|
3361
|
+
N.type !== 14 && N.type !== 17 && (this.next(), x = this.state.startLoc, e = false);
|
|
3362
3362
|
}
|
|
3363
3363
|
if (e && this.isContextual(104)) {
|
|
3364
3364
|
let N = this.lookahead();
|
|
3365
|
-
N.type !== 14 && N.type !== 17 && (this.next(), f =
|
|
3365
|
+
N.type !== 14 && N.type !== 17 && (this.next(), f = true);
|
|
3366
3366
|
}
|
|
3367
3367
|
let w = this.flowParseVariance();
|
|
3368
3368
|
if (this.eat(0)) x != null && this.unexpected(x), this.eat(0) ? (w && this.unexpected(w.loc.start), h.internalSlots.push(this.flowParseObjectTypeInternalSlot(C, f))) : h.indexers.push(this.flowParseObjectTypeIndexer(C, f, w));else if (this.match(10) || this.match(47)) x != null && this.unexpected(x), w && this.unexpected(w.loc.start), h.callProperties.push(this.flowParseObjectTypeCallProperty(C, f));else {
|
|
@@ -3372,7 +3372,7 @@ var rs = ps(Me => {
|
|
|
3372
3372
|
ks(be.type) && (N = this.state.value, this.next());
|
|
3373
3373
|
}
|
|
3374
3374
|
let Re = this.flowParseObjectTypeProperty(C, f, x, w, N, i, n ?? !c);
|
|
3375
|
-
Re === null ? (u =
|
|
3375
|
+
Re === null ? (u = true, I = this.state.lastTokStartLoc) : h.properties.push(Re);
|
|
3376
3376
|
}
|
|
3377
3377
|
this.flowObjectTypeSemicolon(), I && !this.match(8) && !this.match(9) && this.raise(T.UnexpectedExplicitInexactInObject, {
|
|
3378
3378
|
at: I
|
|
@@ -3396,10 +3396,10 @@ var rs = ps(Me => {
|
|
|
3396
3396
|
}), e.argument = this.flowParseType(), this.finishNode(e, "ObjectTypeSpreadProperty"));
|
|
3397
3397
|
{
|
|
3398
3398
|
e.key = this.flowParseObjectPropertyKey(), e.static = s, e.proto = i != null, e.kind = n;
|
|
3399
|
-
let l =
|
|
3400
|
-
return this.match(47) || this.match(10) ? (e.method =
|
|
3399
|
+
let l = false;
|
|
3400
|
+
return this.match(47) || this.match(10) ? (e.method = true, i != null && this.unexpected(i), r && this.unexpected(r.loc.start), e.value = this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)), (n === "get" || n === "set") && this.flowCheckGetterSetterParams(e), !o && e.key.name === "constructor" && e.value.this && this.raise(T.ThisParamBannedInConstructor, {
|
|
3401
3401
|
at: e.value.this
|
|
3402
|
-
})) : (n !== "init" && this.unexpected(), e.method =
|
|
3402
|
+
})) : (n !== "init" && this.unexpected(), e.method = false, this.eat(17) && (l = true), e.value = this.flowParseTypeInitialiser(), e.variance = r), e.optional = l, this.finishNode(e, "ObjectTypeProperty");
|
|
3403
3403
|
}
|
|
3404
3404
|
}
|
|
3405
3405
|
flowCheckGetterSetterParams(e) {
|
|
@@ -3418,10 +3418,10 @@ var rs = ps(Me => {
|
|
|
3418
3418
|
}
|
|
3419
3419
|
flowParseQualifiedTypeIdentifier(e, s) {
|
|
3420
3420
|
(e) != null || (e = this.state.startLoc);
|
|
3421
|
-
let r = s || this.flowParseRestrictedIdentifier(
|
|
3421
|
+
let r = s || this.flowParseRestrictedIdentifier(true);
|
|
3422
3422
|
for (; this.eat(16);) {
|
|
3423
3423
|
let n = this.startNodeAt(e);
|
|
3424
|
-
n.qualification = r, n.id = this.flowParseRestrictedIdentifier(
|
|
3424
|
+
n.qualification = r, n.id = this.flowParseRestrictedIdentifier(true), r = this.finishNode(n, "QualifiedTypeIdentifier");
|
|
3425
3425
|
}
|
|
3426
3426
|
return r;
|
|
3427
3427
|
}
|
|
@@ -3440,26 +3440,26 @@ var rs = ps(Me => {
|
|
|
3440
3440
|
}
|
|
3441
3441
|
flowParseFunctionTypeParam(e) {
|
|
3442
3442
|
let s = null,
|
|
3443
|
-
i =
|
|
3443
|
+
i = false,
|
|
3444
3444
|
r = null,
|
|
3445
3445
|
n = this.startNode(),
|
|
3446
3446
|
o = this.lookahead(),
|
|
3447
3447
|
h = this.state.type === 78;
|
|
3448
3448
|
return o.type === 14 || o.type === 17 ? (h && !e && this.raise(T.ThisParamMustBeFirst, {
|
|
3449
3449
|
at: n
|
|
3450
|
-
}), s = this.parseIdentifier(h), this.eat(17) && (i =
|
|
3450
|
+
}), s = this.parseIdentifier(h), this.eat(17) && (i = true, h && this.raise(T.ThisParamMayNotBeOptional, {
|
|
3451
3451
|
at: n
|
|
3452
3452
|
})), r = this.flowParseTypeInitialiser()) : r = this.flowParseType(), n.name = s, n.optional = i, n.typeAnnotation = r, this.finishNode(n, "FunctionTypeParam");
|
|
3453
3453
|
}
|
|
3454
3454
|
reinterpretTypeAsFunctionTypeParam(e) {
|
|
3455
3455
|
let s = this.startNodeAt(e.loc.start);
|
|
3456
|
-
return s.name = null, s.optional =
|
|
3456
|
+
return s.name = null, s.optional = false, s.typeAnnotation = e, this.finishNode(s, "FunctionTypeParam");
|
|
3457
3457
|
}
|
|
3458
3458
|
flowParseFunctionTypeParams(e = []) {
|
|
3459
3459
|
let s = null,
|
|
3460
3460
|
i = null;
|
|
3461
|
-
for (this.match(78) && (i = this.flowParseFunctionTypeParam(
|
|
3462
|
-
return this.eat(21) && (s = this.flowParseFunctionTypeParam(
|
|
3461
|
+
for (this.match(78) && (i = this.flowParseFunctionTypeParam(true), i.name = null, this.match(11) || this.expect(12)); !this.match(11) && !this.match(21);) e.push(this.flowParseFunctionTypeParam(false)), this.match(11) || this.expect(12);
|
|
3462
|
+
return this.eat(21) && (s = this.flowParseFunctionTypeParam(false)), {
|
|
3463
3463
|
params: e,
|
|
3464
3464
|
rest: s,
|
|
3465
3465
|
_this: i
|
|
@@ -3491,36 +3491,36 @@ var rs = ps(Me => {
|
|
|
3491
3491
|
s = this.startNode(),
|
|
3492
3492
|
i,
|
|
3493
3493
|
r,
|
|
3494
|
-
n =
|
|
3494
|
+
n = false,
|
|
3495
3495
|
o = this.state.noAnonFunctionType;
|
|
3496
3496
|
switch (this.state.type) {
|
|
3497
3497
|
case 5:
|
|
3498
3498
|
return this.flowParseObjectType({
|
|
3499
|
-
allowStatic:
|
|
3500
|
-
allowExact:
|
|
3501
|
-
allowSpread:
|
|
3502
|
-
allowProto:
|
|
3503
|
-
allowInexact:
|
|
3499
|
+
allowStatic: false,
|
|
3500
|
+
allowExact: false,
|
|
3501
|
+
allowSpread: true,
|
|
3502
|
+
allowProto: false,
|
|
3503
|
+
allowInexact: true
|
|
3504
3504
|
});
|
|
3505
3505
|
case 6:
|
|
3506
3506
|
return this.flowParseObjectType({
|
|
3507
|
-
allowStatic:
|
|
3508
|
-
allowExact:
|
|
3509
|
-
allowSpread:
|
|
3510
|
-
allowProto:
|
|
3511
|
-
allowInexact:
|
|
3507
|
+
allowStatic: false,
|
|
3508
|
+
allowExact: true,
|
|
3509
|
+
allowSpread: true,
|
|
3510
|
+
allowProto: false,
|
|
3511
|
+
allowInexact: false
|
|
3512
3512
|
});
|
|
3513
3513
|
case 0:
|
|
3514
|
-
return this.state.noAnonFunctionType =
|
|
3514
|
+
return this.state.noAnonFunctionType = false, r = this.flowParseTupleType(), this.state.noAnonFunctionType = o, r;
|
|
3515
3515
|
case 47:
|
|
3516
3516
|
return s.typeParameters = this.flowParseTypeParameterDeclaration(), this.expect(10), i = this.flowParseFunctionTypeParams(), s.params = i.params, s.rest = i.rest, s.this = i._this, this.expect(11), this.expect(19), s.returnType = this.flowParseType(), this.finishNode(s, "FunctionTypeAnnotation");
|
|
3517
3517
|
case 10:
|
|
3518
3518
|
if (this.next(), !this.match(11) && !this.match(21)) if (S(this.state.type) || this.match(78)) {
|
|
3519
3519
|
let h = this.lookahead().type;
|
|
3520
3520
|
n = h !== 17 && h !== 14;
|
|
3521
|
-
} else n =
|
|
3521
|
+
} else n = true;
|
|
3522
3522
|
if (n) {
|
|
3523
|
-
if (this.state.noAnonFunctionType =
|
|
3523
|
+
if (this.state.noAnonFunctionType = false, r = this.flowParseType(), this.state.noAnonFunctionType = o, this.state.noAnonFunctionType || !(this.match(12) || this.match(11) && this.lookahead().type === 19)) return this.expect(11), r;
|
|
3524
3524
|
this.eat(12);
|
|
3525
3525
|
}
|
|
3526
3526
|
return r ? i = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(r)]) : i = this.flowParseFunctionTypeParams(), s.params = i.params, s.rest = i.rest, s.this = i._this, this.expect(11), this.expect(19), s.returnType = this.flowParseType(), s.typeParameters = null, this.finishNode(s, "FunctionTypeAnnotation");
|
|
@@ -3564,7 +3564,7 @@ var rs = ps(Me => {
|
|
|
3564
3564
|
flowParsePostfixType() {
|
|
3565
3565
|
let e = this.state.startLoc,
|
|
3566
3566
|
s = this.flowParsePrimaryType(),
|
|
3567
|
-
i =
|
|
3567
|
+
i = false;
|
|
3568
3568
|
for (; (this.match(0) || this.match(18)) && !this.canInsertSemicolon();) {
|
|
3569
3569
|
let r = this.startNodeAt(e),
|
|
3570
3570
|
n = this.eat(18);
|
|
@@ -3600,7 +3600,7 @@ var rs = ps(Me => {
|
|
|
3600
3600
|
}
|
|
3601
3601
|
flowParseType() {
|
|
3602
3602
|
let e = this.state.inType;
|
|
3603
|
-
this.state.inType =
|
|
3603
|
+
this.state.inType = true;
|
|
3604
3604
|
let s = this.flowParseUnionType();
|
|
3605
3605
|
return this.state.inType = e, s;
|
|
3606
3606
|
}
|
|
@@ -3626,14 +3626,14 @@ var rs = ps(Me => {
|
|
|
3626
3626
|
let e = null;
|
|
3627
3627
|
return this.match(53) ? (e = this.startNode(), this.state.value === "+" ? e.kind = "plus" : e.kind = "minus", this.next(), this.finishNode(e, "Variance")) : e;
|
|
3628
3628
|
}
|
|
3629
|
-
parseFunctionBody(e, s, i =
|
|
3629
|
+
parseFunctionBody(e, s, i = false) {
|
|
3630
3630
|
if (s) {
|
|
3631
|
-
this.forwardNoArrowParamsConversionAt(e, () => super.parseFunctionBody(e,
|
|
3631
|
+
this.forwardNoArrowParamsConversionAt(e, () => super.parseFunctionBody(e, true, i));
|
|
3632
3632
|
return;
|
|
3633
3633
|
}
|
|
3634
|
-
super.parseFunctionBody(e,
|
|
3634
|
+
super.parseFunctionBody(e, false, i);
|
|
3635
3635
|
}
|
|
3636
|
-
parseFunctionBodyAndFinish(e, s, i =
|
|
3636
|
+
parseFunctionBodyAndFinish(e, s, i = false) {
|
|
3637
3637
|
if (this.match(14)) {
|
|
3638
3638
|
let r = this.startNode();
|
|
3639
3639
|
[r.typeAnnotation, e.predicate] = this.flowParseTypeAndPredicateInitialiser(), e.returnType = r.typeAnnotation ? this.finishNode(r, "TypeAnnotation") : null;
|
|
@@ -3661,7 +3661,7 @@ var rs = ps(Me => {
|
|
|
3661
3661
|
} else if (S(this.state.type)) {
|
|
3662
3662
|
if (s.name === "interface") return this.flowParseInterface(e);
|
|
3663
3663
|
if (s.name === "type") return this.flowParseTypeAlias(e);
|
|
3664
|
-
if (s.name === "opaque") return this.flowParseOpaqueType(e,
|
|
3664
|
+
if (s.name === "opaque") return this.flowParseOpaqueType(e, false);
|
|
3665
3665
|
}
|
|
3666
3666
|
}
|
|
3667
3667
|
return super.parseExpressionStatement(e, s, i);
|
|
@@ -3717,7 +3717,7 @@ var rs = ps(Me => {
|
|
|
3717
3717
|
failed: l
|
|
3718
3718
|
} = this.tryParseConditionalConsequent()));
|
|
3719
3719
|
}
|
|
3720
|
-
return this.getArrowLikeExpressions(h,
|
|
3720
|
+
return this.getArrowLikeExpressions(h, true), this.state.noArrowAt = n, this.expect(14), o.test = e, o.consequent = h, o.alternate = this.forwardNoArrowParamsConversionAt(o, () => this.parseMaybeAssign(void 0, void 0)), this.finishNode(o, "ConditionalExpression");
|
|
3721
3721
|
}
|
|
3722
3722
|
tryParseConditionalConsequent() {
|
|
3723
3723
|
this.state.noArrowParamsConversionAt.push(this.state.start);
|
|
@@ -3735,18 +3735,18 @@ var rs = ps(Me => {
|
|
|
3735
3735
|
let n = i.pop();
|
|
3736
3736
|
n.type === "ArrowFunctionExpression" ? (n.typeParameters || !n.returnType ? this.finishArrowValidation(n) : r.push(n), i.push(n.body)) : n.type === "ConditionalExpression" && (i.push(n.consequent), i.push(n.alternate));
|
|
3737
3737
|
}
|
|
3738
|
-
return s ? (r.forEach(n => this.finishArrowValidation(n)), [r, []]) : Zr(r, n => n.params.every(o => this.isAssignable(o,
|
|
3738
|
+
return s ? (r.forEach(n => this.finishArrowValidation(n)), [r, []]) : Zr(r, n => n.params.every(o => this.isAssignable(o, true)));
|
|
3739
3739
|
}
|
|
3740
3740
|
finishArrowValidation(e) {
|
|
3741
3741
|
var s;
|
|
3742
|
-
this.toAssignableList(e.params, (s = e.extra) == null ? void 0 : s.trailingCommaLoc,
|
|
3742
|
+
this.toAssignableList(e.params, (s = e.extra) == null ? void 0 : s.trailingCommaLoc, false), this.scope.enter(z | Qt), super.checkParams(e, false, true), this.scope.exit();
|
|
3743
3743
|
}
|
|
3744
3744
|
forwardNoArrowParamsConversionAt(e, s) {
|
|
3745
3745
|
let i;
|
|
3746
3746
|
return this.state.noArrowParamsConversionAt.indexOf(e.start) !== -1 ? (this.state.noArrowParamsConversionAt.push(this.state.start), i = s(), this.state.noArrowParamsConversionAt.pop()) : i = s(), i;
|
|
3747
3747
|
}
|
|
3748
3748
|
parseParenItem(e, s) {
|
|
3749
|
-
if (e = super.parseParenItem(e, s), this.eat(17) && (e.optional =
|
|
3749
|
+
if (e = super.parseParenItem(e, s), this.eat(17) && (e.optional = true, this.resetEndLocation(e)), this.match(14)) {
|
|
3750
3750
|
let i = this.startNodeAt(s);
|
|
3751
3751
|
return i.expression = e, i.typeAnnotation = this.flowParseTypeAnnotation(), this.finishNode(i, "TypeCastExpression");
|
|
3752
3752
|
}
|
|
@@ -3759,11 +3759,11 @@ var rs = ps(Me => {
|
|
|
3759
3759
|
if (this.isContextual(128)) {
|
|
3760
3760
|
e.exportKind = "type";
|
|
3761
3761
|
let s = this.startNode();
|
|
3762
|
-
return this.next(), this.match(5) ? (e.specifiers = this.parseExportSpecifiers(
|
|
3762
|
+
return this.next(), this.match(5) ? (e.specifiers = this.parseExportSpecifiers(true), super.parseExportFrom(e), null) : this.flowParseTypeAlias(s);
|
|
3763
3763
|
} else if (this.isContextual(129)) {
|
|
3764
3764
|
e.exportKind = "type";
|
|
3765
3765
|
let s = this.startNode();
|
|
3766
|
-
return this.next(), this.flowParseOpaqueType(s,
|
|
3766
|
+
return this.next(), this.flowParseOpaqueType(s, false);
|
|
3767
3767
|
} else if (this.isContextual(127)) {
|
|
3768
3768
|
e.exportKind = "type";
|
|
3769
3769
|
let s = this.startNode();
|
|
@@ -3775,7 +3775,7 @@ var rs = ps(Me => {
|
|
|
3775
3775
|
} else return super.parseExportDeclaration(e);
|
|
3776
3776
|
}
|
|
3777
3777
|
eatExportStar(e) {
|
|
3778
|
-
return super.eatExportStar(e) ?
|
|
3778
|
+
return super.eatExportStar(e) ? true : this.isContextual(128) && this.lookahead().type === 55 ? (e.exportKind = "type", this.next(), this.next(), true) : false;
|
|
3779
3779
|
}
|
|
3780
3780
|
maybeParseExportNamespaceSpecifier(e) {
|
|
3781
3781
|
let {
|
|
@@ -3793,7 +3793,7 @@ var rs = ps(Me => {
|
|
|
3793
3793
|
} = this.state;
|
|
3794
3794
|
if (this.isContextual(123)) {
|
|
3795
3795
|
if (super.parseClassMemberFromModifier(e, s)) return;
|
|
3796
|
-
s.declare =
|
|
3796
|
+
s.declare = true;
|
|
3797
3797
|
}
|
|
3798
3798
|
super.parseClassMember(e, s, i), s.declare && (s.type !== "ClassProperty" && s.type !== "ClassPrivateProperty" && s.type !== "PropertyDefinition" ? this.raise(T.DeclareClassElement, {
|
|
3799
3799
|
at: r
|
|
@@ -3819,7 +3819,7 @@ var rs = ps(Me => {
|
|
|
3819
3819
|
isAssignable(e, s) {
|
|
3820
3820
|
return e.type === "TypeCastExpression" ? this.isAssignable(e.expression, s) : super.isAssignable(e, s);
|
|
3821
3821
|
}
|
|
3822
|
-
toAssignable(e, s =
|
|
3822
|
+
toAssignable(e, s = false) {
|
|
3823
3823
|
!s && e.type === "AssignmentExpression" && e.left.type === "TypeCastExpression" && (e.left = this.typeCastToParameter(e.left)), super.toAssignable(e, s);
|
|
3824
3824
|
}
|
|
3825
3825
|
toAssignableList(e, s, i) {
|
|
@@ -3883,7 +3883,7 @@ var rs = ps(Me => {
|
|
|
3883
3883
|
let s = e.implements = [];
|
|
3884
3884
|
do {
|
|
3885
3885
|
let i = this.startNode();
|
|
3886
|
-
i.id = this.flowParseRestrictedIdentifier(
|
|
3886
|
+
i.id = this.flowParseRestrictedIdentifier(true), this.match(47) ? i.typeParameters = this.flowParseTypeParameterInstantiation() : i.typeParameters = null, s.push(this.finishNode(i, "ClassImplements"));
|
|
3887
3887
|
} while (this.eat(12));
|
|
3888
3888
|
}
|
|
3889
3889
|
}
|
|
@@ -3914,7 +3914,7 @@ var rs = ps(Me => {
|
|
|
3914
3914
|
at: e
|
|
3915
3915
|
}), this.isThisParam(e) && this.raise(T.ThisParamMayNotBeOptional, {
|
|
3916
3916
|
at: e
|
|
3917
|
-
}), e.optional =
|
|
3917
|
+
}), e.optional = true), this.match(14) ? e.typeAnnotation = this.flowParseTypeAnnotation() : this.isThisParam(e) && this.raise(T.ThisParamAnnotationRequired, {
|
|
3918
3918
|
at: e
|
|
3919
3919
|
}), this.match(29) && this.isThisParam(e) && this.raise(T.ThisParamNoDefault, {
|
|
3920
3920
|
at: e
|
|
@@ -3932,12 +3932,12 @@ var rs = ps(Me => {
|
|
|
3932
3932
|
});
|
|
3933
3933
|
}
|
|
3934
3934
|
parseImportSpecifierLocal(e, s, i) {
|
|
3935
|
-
s.local = gs(e) ? this.flowParseRestrictedIdentifier(
|
|
3935
|
+
s.local = gs(e) ? this.flowParseRestrictedIdentifier(true, true) : this.parseIdentifier(), e.specifiers.push(this.finishImportSpecifier(s, i));
|
|
3936
3936
|
}
|
|
3937
3937
|
isPotentialImportPhase(e) {
|
|
3938
|
-
if (super.isPotentialImportPhase(e)) return
|
|
3938
|
+
if (super.isPotentialImportPhase(e)) return true;
|
|
3939
3939
|
if (this.isContextual(128)) {
|
|
3940
|
-
if (!e) return
|
|
3940
|
+
if (!e) return true;
|
|
3941
3941
|
let s = this.lookaheadCharCode();
|
|
3942
3942
|
return s === 123 || s === 42;
|
|
3943
3943
|
}
|
|
@@ -3953,29 +3953,29 @@ var rs = ps(Me => {
|
|
|
3953
3953
|
let o = e.imported,
|
|
3954
3954
|
h = null;
|
|
3955
3955
|
o.type === "Identifier" && (o.name === "type" ? h = "type" : o.name === "typeof" && (h = "typeof"));
|
|
3956
|
-
let l =
|
|
3956
|
+
let l = false;
|
|
3957
3957
|
if (this.isContextual(93) && !this.isLookaheadContextual("as")) {
|
|
3958
|
-
let u = this.parseIdentifier(
|
|
3958
|
+
let u = this.parseIdentifier(true);
|
|
3959
3959
|
h !== null && !M(this.state.type) ? (e.imported = u, e.importKind = h, e.local = K(u)) : (e.imported = o, e.importKind = null, e.local = this.parseIdentifier());
|
|
3960
3960
|
} else {
|
|
3961
|
-
if (h !== null && M(this.state.type)) e.imported = this.parseIdentifier(
|
|
3961
|
+
if (h !== null && M(this.state.type)) e.imported = this.parseIdentifier(true), e.importKind = h;else {
|
|
3962
3962
|
if (s) throw this.raise(p.ImportBindingIsString, {
|
|
3963
3963
|
at: e,
|
|
3964
3964
|
importName: o.value
|
|
3965
3965
|
});
|
|
3966
3966
|
e.imported = o, e.importKind = null;
|
|
3967
3967
|
}
|
|
3968
|
-
this.eatContextual(93) ? e.local = this.parseIdentifier() : (l =
|
|
3968
|
+
this.eatContextual(93) ? e.local = this.parseIdentifier() : (l = true, e.local = K(e.imported));
|
|
3969
3969
|
}
|
|
3970
3970
|
let c = gs(e);
|
|
3971
3971
|
return i && c && this.raise(T.ImportTypeShorthandOnlyInPureImport, {
|
|
3972
3972
|
at: e
|
|
3973
|
-
}), (i || c) && this.checkReservedType(e.local.name, e.local.loc.start,
|
|
3973
|
+
}), (i || c) && this.checkReservedType(e.local.name, e.local.loc.start, true), l && !i && !c && this.checkReservedWord(e.local.name, e.loc.start, true, true), this.finishImportSpecifier(e, "ImportSpecifier");
|
|
3974
3974
|
}
|
|
3975
3975
|
parseBindingAtom() {
|
|
3976
3976
|
switch (this.state.type) {
|
|
3977
3977
|
case 78:
|
|
3978
|
-
return this.parseIdentifier(
|
|
3978
|
+
return this.parseIdentifier(true);
|
|
3979
3979
|
default:
|
|
3980
3980
|
return super.parseBindingAtom();
|
|
3981
3981
|
}
|
|
@@ -3990,7 +3990,7 @@ var rs = ps(Me => {
|
|
|
3990
3990
|
parseAsyncArrowFromCallExpression(e, s) {
|
|
3991
3991
|
if (this.match(14)) {
|
|
3992
3992
|
let i = this.state.noAnonFunctionType;
|
|
3993
|
-
this.state.noAnonFunctionType =
|
|
3993
|
+
this.state.noAnonFunctionType = true, e.returnType = this.flowParseTypeAnnotation(), this.state.noAnonFunctionType = i;
|
|
3994
3994
|
}
|
|
3995
3995
|
return super.parseAsyncArrowFromCallExpression(e, s);
|
|
3996
3996
|
}
|
|
@@ -4043,7 +4043,7 @@ var rs = ps(Me => {
|
|
|
4043
4043
|
if (this.match(14)) {
|
|
4044
4044
|
let s = this.tryParse(() => {
|
|
4045
4045
|
let i = this.state.noAnonFunctionType;
|
|
4046
|
-
this.state.noAnonFunctionType =
|
|
4046
|
+
this.state.noAnonFunctionType = true;
|
|
4047
4047
|
let r = this.startNode();
|
|
4048
4048
|
return [r.typeAnnotation, e.predicate] = this.flowParseTypeAndPredicateInitialiser(), this.state.noAnonFunctionType = i, this.canInsertSemicolon() && this.unexpected(), this.match(19) || this.unexpected(), r;
|
|
4049
4049
|
});
|
|
@@ -4058,7 +4058,7 @@ var rs = ps(Me => {
|
|
|
4058
4058
|
setArrowFunctionParameters(e, s) {
|
|
4059
4059
|
this.state.noArrowParamsConversionAt.indexOf(e.start) !== -1 ? e.params = s : super.setArrowFunctionParameters(e, s);
|
|
4060
4060
|
}
|
|
4061
|
-
checkParams(e, s, i, r =
|
|
4061
|
+
checkParams(e, s, i, r = true) {
|
|
4062
4062
|
if (!(i && this.state.noArrowParamsConversionAt.indexOf(e.start) !== -1)) {
|
|
4063
4063
|
for (let n = 0; n < e.params.length; n++) this.isThisParam(e.params[n]) && n > 0 && this.raise(T.ThisParamMustBeFirst, {
|
|
4064
4064
|
at: e.params[n]
|
|
@@ -4073,7 +4073,7 @@ var rs = ps(Me => {
|
|
|
4073
4073
|
if (e.type === "Identifier" && e.name === "async" && this.state.noArrowAt.indexOf(s.index) !== -1) {
|
|
4074
4074
|
this.next();
|
|
4075
4075
|
let r = this.startNodeAt(s);
|
|
4076
|
-
r.callee = e, r.arguments = super.parseCallExpressionArguments(11,
|
|
4076
|
+
r.callee = e, r.arguments = super.parseCallExpressionArguments(11, false), e = this.finishNode(r, "CallExpression");
|
|
4077
4077
|
} else if (e.type === "Identifier" && e.name === "async" && this.match(47)) {
|
|
4078
4078
|
let r = this.state.clone(),
|
|
4079
4079
|
n = this.tryParse(h => this.parseAsyncArrowWithTypeParameters(s) || h(), r);
|
|
@@ -4088,14 +4088,14 @@ var rs = ps(Me => {
|
|
|
4088
4088
|
}
|
|
4089
4089
|
parseSubscript(e, s, i, r) {
|
|
4090
4090
|
if (this.match(18) && this.isLookaheadToken_lt()) {
|
|
4091
|
-
if (r.optionalChainMember =
|
|
4091
|
+
if (r.optionalChainMember = true, i) return r.stop = true, e;
|
|
4092
4092
|
this.next();
|
|
4093
4093
|
let n = this.startNodeAt(s);
|
|
4094
|
-
return n.callee = e, n.typeArguments = this.flowParseTypeParameterInstantiation(), this.expect(10), n.arguments = this.parseCallExpressionArguments(11,
|
|
4094
|
+
return n.callee = e, n.typeArguments = this.flowParseTypeParameterInstantiation(), this.expect(10), n.arguments = this.parseCallExpressionArguments(11, false), n.optional = true, this.finishCallExpression(n, true);
|
|
4095
4095
|
} else if (!i && this.shouldParseTypes() && this.match(47)) {
|
|
4096
4096
|
let n = this.startNodeAt(s);
|
|
4097
4097
|
n.callee = e;
|
|
4098
|
-
let o = this.tryParse(() => (n.typeArguments = this.flowParseTypeParameterInstantiationCallOrNew(), this.expect(10), n.arguments = super.parseCallExpressionArguments(11,
|
|
4098
|
+
let o = this.tryParse(() => (n.typeArguments = this.flowParseTypeParameterInstantiationCallOrNew(), this.expect(10), n.arguments = super.parseCallExpressionArguments(11, false), r.optionalChainMember && (n.optional = false), this.finishCallExpression(n, r.optionalChainMember)));
|
|
4099
4099
|
if (o.node) return o.error && (this.state = o.failState), o.node;
|
|
4100
4100
|
}
|
|
4101
4101
|
return super.parseSubscript(e, s, i, r);
|
|
@@ -4107,12 +4107,12 @@ var rs = ps(Me => {
|
|
|
4107
4107
|
}
|
|
4108
4108
|
parseAsyncArrowWithTypeParameters(e) {
|
|
4109
4109
|
let s = this.startNodeAt(e);
|
|
4110
|
-
if (this.parseFunctionParams(s,
|
|
4110
|
+
if (this.parseFunctionParams(s, false), !!this.parseArrow(s)) return super.parseArrowExpression(s, void 0, true);
|
|
4111
4111
|
}
|
|
4112
4112
|
readToken_mult_modulo(e) {
|
|
4113
4113
|
let s = this.input.charCodeAt(this.state.pos + 1);
|
|
4114
4114
|
if (e === 42 && s === 47 && this.state.hasFlowComment) {
|
|
4115
|
-
this.state.hasFlowComment =
|
|
4115
|
+
this.state.hasFlowComment = false, this.state.pos += 2, this.nextToken();
|
|
4116
4116
|
return;
|
|
4117
4117
|
}
|
|
4118
4118
|
super.readToken_mult_modulo(e);
|
|
@@ -4138,7 +4138,7 @@ var rs = ps(Me => {
|
|
|
4138
4138
|
});
|
|
4139
4139
|
this.hasFlowCommentCompletion();
|
|
4140
4140
|
let e = this.skipFlowComment();
|
|
4141
|
-
e && (this.state.pos += e, this.state.hasFlowComment =
|
|
4141
|
+
e && (this.state.pos += e, this.state.hasFlowComment = true);
|
|
4142
4142
|
return;
|
|
4143
4143
|
}
|
|
4144
4144
|
return super.skipBlockComment(this.state.hasFlowComment ? "*-/" : "*/");
|
|
@@ -4151,7 +4151,7 @@ var rs = ps(Me => {
|
|
|
4151
4151
|
for (; [32, 9].includes(this.input.charCodeAt(e + s));) s++;
|
|
4152
4152
|
let i = this.input.charCodeAt(s + e),
|
|
4153
4153
|
r = this.input.charCodeAt(s + e + 1);
|
|
4154
|
-
return i === 58 && r === 58 ? s + 2 : this.input.slice(s + e, s + e + 12) === "flow-include" ? s + 12 : i === 58 && r !== 58 ? s :
|
|
4154
|
+
return i === 58 && r === 58 ? s + 2 : this.input.slice(s + e, s + e + 12) === "flow-include" ? s + 12 : i === 58 && r !== 58 ? s : false;
|
|
4155
4155
|
}
|
|
4156
4156
|
hasFlowCommentCompletion() {
|
|
4157
4157
|
if (this.input.indexOf("*/", this.state.pos) === -1) throw this.raise(p.UnterminatedComment, {
|
|
@@ -4241,7 +4241,7 @@ var rs = ps(Me => {
|
|
|
4241
4241
|
}
|
|
4242
4242
|
flowEnumMemberRaw() {
|
|
4243
4243
|
let e = this.state.startLoc,
|
|
4244
|
-
s = this.parseIdentifier(
|
|
4244
|
+
s = this.parseIdentifier(true),
|
|
4245
4245
|
i = this.eat(29) ? this.flowEnumMemberInit() : {
|
|
4246
4246
|
type: "none",
|
|
4247
4247
|
loc: e
|
|
@@ -4268,10 +4268,10 @@ var rs = ps(Me => {
|
|
|
4268
4268
|
stringMembers: [],
|
|
4269
4269
|
defaultedMembers: []
|
|
4270
4270
|
},
|
|
4271
|
-
n =
|
|
4271
|
+
n = false;
|
|
4272
4272
|
for (; !this.match(8);) {
|
|
4273
4273
|
if (this.eat(21)) {
|
|
4274
|
-
n =
|
|
4274
|
+
n = true;
|
|
4275
4275
|
break;
|
|
4276
4276
|
}
|
|
4277
4277
|
let o = this.startNode(),
|
|
@@ -4383,11 +4383,11 @@ var rs = ps(Me => {
|
|
|
4383
4383
|
});
|
|
4384
4384
|
switch (e.hasUnknownMembers = h, n) {
|
|
4385
4385
|
case "boolean":
|
|
4386
|
-
return e.explicitType =
|
|
4386
|
+
return e.explicitType = true, e.members = o.booleanMembers, this.expect(8), this.finishNode(e, "EnumBooleanBody");
|
|
4387
4387
|
case "number":
|
|
4388
|
-
return e.explicitType =
|
|
4388
|
+
return e.explicitType = true, e.members = o.numberMembers, this.expect(8), this.finishNode(e, "EnumNumberBody");
|
|
4389
4389
|
case "string":
|
|
4390
|
-
return e.explicitType =
|
|
4390
|
+
return e.explicitType = true, e.members = this.flowEnumStringMembers(o.stringMembers, o.defaultedMembers, {
|
|
4391
4391
|
enumName: i
|
|
4392
4392
|
}), this.expect(8), this.finishNode(e, "EnumStringBody");
|
|
4393
4393
|
case "symbol":
|
|
@@ -4395,7 +4395,7 @@ var rs = ps(Me => {
|
|
|
4395
4395
|
default:
|
|
4396
4396
|
{
|
|
4397
4397
|
let l = () => (e.members = [], this.expect(8), this.finishNode(e, "EnumStringBody"));
|
|
4398
|
-
e.explicitType =
|
|
4398
|
+
e.explicitType = false;
|
|
4399
4399
|
let c = o.booleanMembers.length,
|
|
4400
4400
|
u = o.numberMembers.length,
|
|
4401
4401
|
d = o.stringMembers.length,
|
|
@@ -4433,7 +4433,7 @@ var rs = ps(Me => {
|
|
|
4433
4433
|
let s = this.input.charCodeAt(e + 1);
|
|
4434
4434
|
return s !== 60 && s !== 61;
|
|
4435
4435
|
}
|
|
4436
|
-
return
|
|
4436
|
+
return false;
|
|
4437
4437
|
}
|
|
4438
4438
|
maybeUnwrapTypeCastExpression(e) {
|
|
4439
4439
|
return e.type === "TypeCastExpression" ? e.expression : e;
|
|
@@ -4455,7 +4455,7 @@ var rs = ps(Me => {
|
|
|
4455
4455
|
UnwrappedAdjacentJSXElements: "Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"
|
|
4456
4456
|
});
|
|
4457
4457
|
function H(a) {
|
|
4458
|
-
return a ? a.type === "JSXOpeningFragment" || a.type === "JSXClosingFragment" :
|
|
4458
|
+
return a ? a.type === "JSXOpeningFragment" || a.type === "JSXClosingFragment" : false;
|
|
4459
4459
|
}
|
|
4460
4460
|
function oe(a) {
|
|
4461
4461
|
if (a.type === "JSXIdentifier") return a.name;
|
|
@@ -4487,7 +4487,7 @@ var rs = ps(Me => {
|
|
|
4487
4487
|
case 62:
|
|
4488
4488
|
case 125:
|
|
4489
4489
|
default:
|
|
4490
|
-
ke(i) ? (e += this.input.slice(s, this.state.pos), e += this.jsxReadNewLine(
|
|
4490
|
+
ke(i) ? (e += this.input.slice(s, this.state.pos), e += this.jsxReadNewLine(true), s = this.state.pos) : ++this.state.pos;
|
|
4491
4491
|
}
|
|
4492
4492
|
}
|
|
4493
4493
|
}
|
|
@@ -4507,7 +4507,7 @@ var rs = ps(Me => {
|
|
|
4507
4507
|
});
|
|
4508
4508
|
let r = this.input.charCodeAt(this.state.pos);
|
|
4509
4509
|
if (r === e) break;
|
|
4510
|
-
r === 38 ? (s += this.input.slice(i, this.state.pos), s += this.jsxReadEntity(), i = this.state.pos) : ke(r) ? (s += this.input.slice(i, this.state.pos), s += this.jsxReadNewLine(
|
|
4510
|
+
r === 38 ? (s += this.input.slice(i, this.state.pos), s += this.jsxReadEntity(), i = this.state.pos) : ke(r) ? (s += this.input.slice(i, this.state.pos), s += this.jsxReadNewLine(false), i = this.state.pos) : ++this.state.pos;
|
|
4511
4511
|
}
|
|
4512
4512
|
s += this.input.slice(i, this.state.pos++), this.finishToken(131, s);
|
|
4513
4513
|
}
|
|
@@ -4517,11 +4517,11 @@ var rs = ps(Me => {
|
|
|
4517
4517
|
++this.state.pos;
|
|
4518
4518
|
let s = 10;
|
|
4519
4519
|
this.codePointAtPos(this.state.pos) === 120 && (s = 16, ++this.state.pos);
|
|
4520
|
-
let i = this.readInt(s, void 0,
|
|
4520
|
+
let i = this.readInt(s, void 0, false, "bail");
|
|
4521
4521
|
if (i !== null && this.codePointAtPos(this.state.pos) === 59) return ++this.state.pos, String.fromCodePoint(i);
|
|
4522
4522
|
} else {
|
|
4523
4523
|
let s = 0,
|
|
4524
|
-
i =
|
|
4524
|
+
i = false;
|
|
4525
4525
|
for (; s++ < 10 && this.state.pos < this.length && !(i = this.codePointAtPos(this.state.pos) == 59);) ++this.state.pos;
|
|
4526
4526
|
if (i) {
|
|
4527
4527
|
this.input.slice(e, this.state.pos);
|
|
@@ -4579,18 +4579,18 @@ var rs = ps(Me => {
|
|
|
4579
4579
|
return this.finishNodeAt(e, "JSXEmptyExpression", this.state.startLoc);
|
|
4580
4580
|
}
|
|
4581
4581
|
jsxParseSpreadChild(e) {
|
|
4582
|
-
return this.next(), e.expression = this.parseExpression(), this.setContext(E.j_expr), this.state.canStartJSXElement =
|
|
4582
|
+
return this.next(), e.expression = this.parseExpression(), this.setContext(E.j_expr), this.state.canStartJSXElement = true, this.expect(8), this.finishNode(e, "JSXSpreadChild");
|
|
4583
4583
|
}
|
|
4584
4584
|
jsxParseExpressionContainer(e, s) {
|
|
4585
4585
|
if (this.match(8)) e.expression = this.jsxParseEmptyExpression();else {
|
|
4586
4586
|
let i = this.parseExpression();
|
|
4587
4587
|
e.expression = i;
|
|
4588
4588
|
}
|
|
4589
|
-
return this.setContext(s), this.state.canStartJSXElement =
|
|
4589
|
+
return this.setContext(s), this.state.canStartJSXElement = true, this.expect(8), this.finishNode(e, "JSXExpressionContainer");
|
|
4590
4590
|
}
|
|
4591
4591
|
jsxParseAttribute() {
|
|
4592
4592
|
let e = this.startNode();
|
|
4593
|
-
return this.match(5) ? (this.setContext(E.brace), this.next(), this.expect(21), e.argument = this.parseMaybeAssignAllowIn(), this.setContext(E.j_oTag), this.state.canStartJSXElement =
|
|
4593
|
+
return this.match(5) ? (this.setContext(E.brace), this.next(), this.expect(21), e.argument = this.parseMaybeAssignAllowIn(), this.setContext(E.j_oTag), this.state.canStartJSXElement = true, this.expect(8), this.finishNode(e, "JSXSpreadAttribute")) : (e.name = this.jsxParseNamespacedName(), e.value = this.eat(29) ? this.jsxParseAttributeValue() : null, this.finishNode(e, "JSXAttribute"));
|
|
4594
4594
|
}
|
|
4595
4595
|
jsxParseOpeningElementAt(e) {
|
|
4596
4596
|
let s = this.startNodeAt(e);
|
|
@@ -4693,9 +4693,9 @@ var rs = ps(Me => {
|
|
|
4693
4693
|
context: s,
|
|
4694
4694
|
type: i
|
|
4695
4695
|
} = this.state;
|
|
4696
|
-
if (i === 56 && e === 140) s.splice(-2, 2, E.j_cTag), this.state.canStartJSXElement =
|
|
4696
|
+
if (i === 56 && e === 140) s.splice(-2, 2, E.j_cTag), this.state.canStartJSXElement = false;else if (i === 140) s.push(E.j_oTag);else if (i === 141) {
|
|
4697
4697
|
let r = s[s.length - 1];
|
|
4698
|
-
r === E.j_oTag && e === 56 || r === E.j_cTag ? (s.pop(), this.state.canStartJSXElement = s[s.length - 1] === E.j_expr) : (this.setContext(E.j_expr), this.state.canStartJSXElement =
|
|
4698
|
+
r === E.j_oTag && e === 56 || r === E.j_cTag ? (s.pop(), this.state.canStartJSXElement = s[s.length - 1] === E.j_expr) : (this.setContext(E.j_expr), this.state.canStartJSXElement = true);
|
|
4699
4699
|
} else this.state.canStartJSXElement = nr(i);
|
|
4700
4700
|
}
|
|
4701
4701
|
},
|
|
@@ -4720,15 +4720,15 @@ var rs = ps(Me => {
|
|
|
4720
4720
|
}
|
|
4721
4721
|
hasImport(t, e) {
|
|
4722
4722
|
let s = this.importsStack.length;
|
|
4723
|
-
if (this.importsStack[s - 1].has(t)) return
|
|
4723
|
+
if (this.importsStack[s - 1].has(t)) return true;
|
|
4724
4724
|
if (!e && s > 1) {
|
|
4725
|
-
for (let i = 0; i < s - 1; i++) if (this.importsStack[i].has(t)) return
|
|
4725
|
+
for (let i = 0; i < s - 1; i++) if (this.importsStack[i].has(t)) return true;
|
|
4726
4726
|
}
|
|
4727
|
-
return
|
|
4727
|
+
return false;
|
|
4728
4728
|
}
|
|
4729
4729
|
declareName(t, e, s) {
|
|
4730
4730
|
if (e & Ne) {
|
|
4731
|
-
this.hasImport(t,
|
|
4731
|
+
this.hasImport(t, true) && this.parser.raise(p.VarRedeclaration, {
|
|
4732
4732
|
at: s,
|
|
4733
4733
|
identifierName: t
|
|
4734
4734
|
}), this.importsStack[this.importsStack.length - 1].add(t);
|
|
@@ -4748,9 +4748,9 @@ var rs = ps(Me => {
|
|
|
4748
4748
|
r = t.constEnums.has(e);
|
|
4749
4749
|
return i !== r;
|
|
4750
4750
|
}
|
|
4751
|
-
return
|
|
4751
|
+
return true;
|
|
4752
4752
|
}
|
|
4753
|
-
return s & Ye && t.classes.has(e) ? t.lexical.has(e) ? !!(s & F) :
|
|
4753
|
+
return s & Ye && t.classes.has(e) ? t.lexical.has(e) ? !!(s & F) : false : s & se && t.types.has(e) ? true : super.isRedeclaredInScope(t, e, s);
|
|
4754
4754
|
}
|
|
4755
4755
|
checkLocalExport(t) {
|
|
4756
4756
|
let {
|
|
@@ -4768,7 +4768,7 @@ var rs = ps(Me => {
|
|
|
4768
4768
|
ia = (a, t) => Object.hasOwnProperty.call(a, t) && a[t],
|
|
4769
4769
|
Qs = a => a.type === "ParenthesizedExpression" ? Qs(a.expression) : a,
|
|
4770
4770
|
jt = class extends _t {
|
|
4771
|
-
toAssignable(t, e =
|
|
4771
|
+
toAssignable(t, e = false) {
|
|
4772
4772
|
var s, i;
|
|
4773
4773
|
let r;
|
|
4774
4774
|
switch ((t.type === "ParenthesizedExpression" || (s = t.extra) != null && s.parenthesized) && (r = Qs(t), e ? r.type === "Identifier" ? this.expressionScope.recordArrowParameterBindingError(p.InvalidParenthesizedAssignment, {
|
|
@@ -4825,7 +4825,7 @@ var rs = ps(Me => {
|
|
|
4825
4825
|
});else if (t.type === "SpreadElement") {
|
|
4826
4826
|
t.type = "RestElement";
|
|
4827
4827
|
let i = t.argument;
|
|
4828
|
-
this.checkToRestConversion(i,
|
|
4828
|
+
this.checkToRestConversion(i, false), this.toAssignable(i, s), e || this.raise(p.RestTrailingComma, {
|
|
4829
4829
|
at: t
|
|
4830
4830
|
});
|
|
4831
4831
|
} else this.toAssignable(t, s);
|
|
@@ -4838,7 +4838,7 @@ var rs = ps(Me => {
|
|
|
4838
4838
|
if (n.type === "SpreadElement") {
|
|
4839
4839
|
n.type = "RestElement";
|
|
4840
4840
|
let o = n.argument;
|
|
4841
|
-
this.checkToRestConversion(o,
|
|
4841
|
+
this.checkToRestConversion(o, true), this.toAssignable(o, s);
|
|
4842
4842
|
} else this.toAssignable(n, s);
|
|
4843
4843
|
n.type === "RestElement" && (r < i ? this.raise(p.RestTrailingComma, {
|
|
4844
4844
|
at: n
|
|
@@ -4855,7 +4855,7 @@ var rs = ps(Me => {
|
|
|
4855
4855
|
case "ArrayPattern":
|
|
4856
4856
|
case "AssignmentPattern":
|
|
4857
4857
|
case "RestElement":
|
|
4858
|
-
return
|
|
4858
|
+
return true;
|
|
4859
4859
|
case "ObjectExpression":
|
|
4860
4860
|
{
|
|
4861
4861
|
let s = t.properties.length - 1;
|
|
@@ -4875,7 +4875,7 @@ var rs = ps(Me => {
|
|
|
4875
4875
|
case "OptionalMemberExpression":
|
|
4876
4876
|
return !e;
|
|
4877
4877
|
default:
|
|
4878
|
-
return
|
|
4878
|
+
return false;
|
|
4879
4879
|
}
|
|
4880
4880
|
}
|
|
4881
4881
|
toReferencedList(t, e) {
|
|
@@ -4901,15 +4901,15 @@ var rs = ps(Me => {
|
|
|
4901
4901
|
return this.next(), t.elements = this.parseBindingList(3, 93, 1), this.finishNode(t, "ArrayPattern");
|
|
4902
4902
|
}
|
|
4903
4903
|
case 5:
|
|
4904
|
-
return this.parseObjectLike(8,
|
|
4904
|
+
return this.parseObjectLike(8, true);
|
|
4905
4905
|
}
|
|
4906
4906
|
return this.parseIdentifier();
|
|
4907
4907
|
}
|
|
4908
4908
|
parseBindingList(t, e, s) {
|
|
4909
4909
|
let i = s & 1,
|
|
4910
4910
|
r = [],
|
|
4911
|
-
n =
|
|
4912
|
-
for (; !this.eat(t);) if (n ? n =
|
|
4911
|
+
n = true;
|
|
4912
|
+
for (; !this.eat(t);) if (n ? n = false : this.expect(12), i && this.match(12)) r.push(null);else {
|
|
4913
4913
|
if (this.eat(t)) break;
|
|
4914
4914
|
if (this.match(21)) {
|
|
4915
4915
|
if (r.push(this.parseAssignableListItemTypes(this.parseRestBinding(), s)), !this.checkCommaAfterRest(e)) {
|
|
@@ -4935,7 +4935,7 @@ var rs = ps(Me => {
|
|
|
4935
4935
|
type: e,
|
|
4936
4936
|
startLoc: s
|
|
4937
4937
|
} = this.state;
|
|
4938
|
-
return e === 21 ? this.parseBindingRestProperty(t) : (e === 136 ? (this.expectPlugin("destructuringPrivate", s), this.classScope.usePrivateName(this.state.value, s), t.key = this.parsePrivateName()) : this.parsePropertyName(t), t.method =
|
|
4938
|
+
return e === 21 ? this.parseBindingRestProperty(t) : (e === 136 ? (this.expectPlugin("destructuringPrivate", s), this.classScope.usePrivateName(this.state.value, s), t.key = this.parsePrivateName()) : this.parsePropertyName(t), t.method = false, this.parseObjPropValue(t, s, false, false, true, false));
|
|
4939
4939
|
}
|
|
4940
4940
|
parseAssignableListItem(t, e) {
|
|
4941
4941
|
let s = this.parseMaybeDefault();
|
|
@@ -4965,9 +4965,9 @@ var rs = ps(Me => {
|
|
|
4965
4965
|
checkLVal(t, {
|
|
4966
4966
|
in: e,
|
|
4967
4967
|
binding: s = W,
|
|
4968
|
-
checkClashes: i =
|
|
4969
|
-
strictModeChanged: r =
|
|
4970
|
-
hasParenthesizedAncestor: n =
|
|
4968
|
+
checkClashes: i = false,
|
|
4969
|
+
strictModeChanged: r = false,
|
|
4970
|
+
hasParenthesizedAncestor: n = false
|
|
4971
4971
|
}) {
|
|
4972
4972
|
var o;
|
|
4973
4973
|
let h = t.type;
|
|
@@ -4989,8 +4989,8 @@ var rs = ps(Me => {
|
|
|
4989
4989
|
return;
|
|
4990
4990
|
}
|
|
4991
4991
|
let l = this.isValidLVal(h, !(n || (o = t.extra) != null && o.parenthesized) && e.type === "AssignmentExpression", s);
|
|
4992
|
-
if (l ===
|
|
4993
|
-
if (l ===
|
|
4992
|
+
if (l === true) return;
|
|
4993
|
+
if (l === false) {
|
|
4994
4994
|
let f = s === W ? p.InvalidLhs : p.InvalidLhsBinding;
|
|
4995
4995
|
this.raise(f, {
|
|
4996
4996
|
at: t,
|
|
@@ -5010,7 +5010,7 @@ var rs = ps(Me => {
|
|
|
5010
5010
|
hasParenthesizedAncestor: u
|
|
5011
5011
|
});
|
|
5012
5012
|
}
|
|
5013
|
-
checkIdentifier(t, e, s =
|
|
5013
|
+
checkIdentifier(t, e, s = false) {
|
|
5014
5014
|
this.state.strict && (s ? Bs(t.name, this.inModule) : Os(t.name)) && (e === W ? this.raise(p.StrictEvalArguments, {
|
|
5015
5015
|
at: t,
|
|
5016
5016
|
referenceName: t.name
|
|
@@ -5044,7 +5044,7 @@ var rs = ps(Me => {
|
|
|
5044
5044
|
checkCommaAfterRest(t) {
|
|
5045
5045
|
return this.match(12) ? (this.raise(this.lookaheadCharCode() === t ? p.RestTrailingComma : p.ElementAfterRest, {
|
|
5046
5046
|
at: this.state.startLoc
|
|
5047
|
-
}),
|
|
5047
|
+
}), true) : false;
|
|
5048
5048
|
}
|
|
5049
5049
|
},
|
|
5050
5050
|
ra = (a, t) => Object.hasOwnProperty.call(a, t) && a[t];
|
|
@@ -5247,10 +5247,10 @@ var rs = ps(Me => {
|
|
|
5247
5247
|
}) : (o(l, c, c, "override"), o(l, c, c, "static"), o(l, c, c, "readonly"), n.accessibility = c) : oa(c) ? (n[c] && this.raise(y.DuplicateModifier, {
|
|
5248
5248
|
at: l,
|
|
5249
5249
|
modifier: c
|
|
5250
|
-
}), n[c] =
|
|
5250
|
+
}), n[c] = true, o(l, c, "in", "out")) : (Object.hasOwnProperty.call(n, c) ? this.raise(y.DuplicateModifier, {
|
|
5251
5251
|
at: l,
|
|
5252
5252
|
modifier: c
|
|
5253
|
-
}) : (o(l, c, "static", "readonly"), o(l, c, "static", "override"), o(l, c, "override", "readonly"), o(l, c, "abstract", "override"), h(l, c, "declare", "override"), h(l, c, "static", "abstract")), n[c] =
|
|
5253
|
+
}) : (o(l, c, "static", "readonly"), o(l, c, "static", "override"), o(l, c, "override", "readonly"), o(l, c, "abstract", "override"), h(l, c, "declare", "override"), h(l, c, "static", "abstract")), n[c] = true), s != null && s.includes(c) && this.raise(r, {
|
|
5254
5254
|
at: l,
|
|
5255
5255
|
modifier: c
|
|
5256
5256
|
});
|
|
@@ -5275,7 +5275,7 @@ var rs = ps(Me => {
|
|
|
5275
5275
|
return i;
|
|
5276
5276
|
}
|
|
5277
5277
|
tsParseDelimitedList(e, s, i) {
|
|
5278
|
-
return aa(this.tsParseDelimitedListWorker(e, s,
|
|
5278
|
+
return aa(this.tsParseDelimitedListWorker(e, s, true, i));
|
|
5279
5279
|
}
|
|
5280
5280
|
tsParseDelimitedListWorker(e, s, i, r) {
|
|
5281
5281
|
let n = [],
|
|
@@ -5305,7 +5305,7 @@ var rs = ps(Me => {
|
|
|
5305
5305
|
at: this.state.startLoc
|
|
5306
5306
|
}), e.argument = super.parseExprAtom(), this.expect(11), this.eat(16) && (e.qualifier = this.tsParseEntityName()), this.match(47) && (e.typeParameters = this.tsParseTypeArguments()), this.finishNode(e, "TSImportType");
|
|
5307
5307
|
}
|
|
5308
|
-
tsParseEntityName(e =
|
|
5308
|
+
tsParseEntityName(e = true) {
|
|
5309
5309
|
let s = this.parseIdentifier(e);
|
|
5310
5310
|
for (; this.eat(16);) {
|
|
5311
5311
|
let i = this.startNodeAtNode(s);
|
|
@@ -5320,7 +5320,7 @@ var rs = ps(Me => {
|
|
|
5320
5320
|
tsParseThisTypePredicate(e) {
|
|
5321
5321
|
this.next();
|
|
5322
5322
|
let s = this.startNodeAtNode(e);
|
|
5323
|
-
return s.parameterName = e, s.typeAnnotation = this.tsParseTypeAnnotation(
|
|
5323
|
+
return s.parameterName = e, s.typeAnnotation = this.tsParseTypeAnnotation(false), s.asserts = false, this.finishNode(s, "TSTypePredicate");
|
|
5324
5324
|
}
|
|
5325
5325
|
tsParseThisTypeNode() {
|
|
5326
5326
|
let e = this.startNode();
|
|
@@ -5343,7 +5343,7 @@ var rs = ps(Me => {
|
|
|
5343
5343
|
let i = {
|
|
5344
5344
|
value: -1
|
|
5345
5345
|
};
|
|
5346
|
-
return s.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this, e),
|
|
5346
|
+
return s.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this, e), false, true, i), s.params.length === 0 && this.raise(y.EmptyTypeParameters, {
|
|
5347
5347
|
at: s
|
|
5348
5348
|
}), i.value !== -1 && this.addExtra(s, "trailingComma", i.value), this.finishNode(s, "TSTypeParameterDeclaration");
|
|
5349
5349
|
}
|
|
@@ -5373,7 +5373,7 @@ var rs = ps(Me => {
|
|
|
5373
5373
|
return this.tsFillSignature(14, s), this.tsParseTypeMemberSemicolon(), this.finishNode(s, e);
|
|
5374
5374
|
}
|
|
5375
5375
|
tsIsUnambiguouslyIndexSignature() {
|
|
5376
|
-
return this.next(), S(this.state.type) ? (this.next(), this.match(14)) :
|
|
5376
|
+
return this.next(), S(this.state.type) ? (this.next(), this.match(14)) : false;
|
|
5377
5377
|
}
|
|
5378
5378
|
tsTryParseIndexSignature(e) {
|
|
5379
5379
|
if (!(this.match(0) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) return;
|
|
@@ -5384,7 +5384,7 @@ var rs = ps(Me => {
|
|
|
5384
5384
|
return i && (e.typeAnnotation = i), this.tsParseTypeMemberSemicolon(), this.finishNode(e, "TSIndexSignature");
|
|
5385
5385
|
}
|
|
5386
5386
|
tsParsePropertyOrMethodSignature(e, s) {
|
|
5387
|
-
this.eat(17) && (e.optional =
|
|
5387
|
+
this.eat(17) && (e.optional = true);
|
|
5388
5388
|
let i = e;
|
|
5389
5389
|
if (this.match(10) || this.match(47)) {
|
|
5390
5390
|
s && this.raise(y.ReadonlyForMethodSignature, {
|
|
@@ -5420,7 +5420,7 @@ var rs = ps(Me => {
|
|
|
5420
5420
|
return this.finishNode(r, "TSMethodSignature");
|
|
5421
5421
|
} else {
|
|
5422
5422
|
let r = i;
|
|
5423
|
-
s && (r.readonly =
|
|
5423
|
+
s && (r.readonly = true);
|
|
5424
5424
|
let n = this.tsTryParseTypeAnnotation();
|
|
5425
5425
|
return n && (r.typeAnnotation = n), this.tsParseTypeMemberSemicolon(), this.finishNode(r, "TSPropertySignature");
|
|
5426
5426
|
}
|
|
@@ -5430,7 +5430,7 @@ var rs = ps(Me => {
|
|
|
5430
5430
|
if (this.match(10) || this.match(47)) return this.tsParseSignatureMember("TSCallSignatureDeclaration", e);
|
|
5431
5431
|
if (this.match(77)) {
|
|
5432
5432
|
let i = this.startNode();
|
|
5433
|
-
return this.next(), this.match(10) || this.match(47) ? this.tsParseSignatureMember("TSConstructSignatureDeclaration", e) : (e.key = this.createIdentifier(i, "new"), this.tsParsePropertyOrMethodSignature(e,
|
|
5433
|
+
return this.next(), this.match(10) || this.match(47) ? this.tsParseSignatureMember("TSConstructSignatureDeclaration", e) : (e.key = this.createIdentifier(i, "new"), this.tsParsePropertyOrMethodSignature(e, false));
|
|
5434
5434
|
}
|
|
5435
5435
|
this.tsParseModifiers({
|
|
5436
5436
|
allowedModifiers: ["readonly"],
|
|
@@ -5449,7 +5449,7 @@ var rs = ps(Me => {
|
|
|
5449
5449
|
return this.expect(8), e;
|
|
5450
5450
|
}
|
|
5451
5451
|
tsIsStartOfMappedType() {
|
|
5452
|
-
return this.next(), this.eat(53) ? this.isContextual(120) : (this.isContextual(120) && this.next(), !this.match(0) || (this.next(), !this.tsIsIdentifier()) ?
|
|
5452
|
+
return this.next(), this.eat(53) ? this.isContextual(120) : (this.isContextual(120) && this.next(), !this.match(0) || (this.next(), !this.tsIsIdentifier()) ? false : (this.next(), this.match(58)));
|
|
5453
5453
|
}
|
|
5454
5454
|
tsParseMappedTypeParameter() {
|
|
5455
5455
|
let e = this.startNode();
|
|
@@ -5457,12 +5457,12 @@ var rs = ps(Me => {
|
|
|
5457
5457
|
}
|
|
5458
5458
|
tsParseMappedType() {
|
|
5459
5459
|
let e = this.startNode();
|
|
5460
|
-
return this.expect(5), this.match(53) ? (e.readonly = this.state.value, this.next(), this.expectContextual(120)) : this.eatContextual(120) && (e.readonly =
|
|
5460
|
+
return this.expect(5), this.match(53) ? (e.readonly = this.state.value, this.next(), this.expectContextual(120)) : this.eatContextual(120) && (e.readonly = true), this.expect(0), e.typeParameter = this.tsParseMappedTypeParameter(), e.nameType = this.eatContextual(93) ? this.tsParseType() : null, this.expect(3), this.match(53) ? (e.optional = this.state.value, this.next(), this.expect(17)) : this.eat(17) && (e.optional = true), e.typeAnnotation = this.tsTryParseType(), this.semicolon(), this.expect(8), this.finishNode(e, "TSMappedType");
|
|
5461
5461
|
}
|
|
5462
5462
|
tsParseTupleType() {
|
|
5463
5463
|
let e = this.startNode();
|
|
5464
|
-
e.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseTupleElementType.bind(this),
|
|
5465
|
-
let s =
|
|
5464
|
+
e.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseTupleElementType.bind(this), true, false);
|
|
5465
|
+
let s = false,
|
|
5466
5466
|
i = null;
|
|
5467
5467
|
return e.elementTypes.forEach(r => {
|
|
5468
5468
|
let {
|
|
@@ -5489,16 +5489,16 @@ var rs = ps(Me => {
|
|
|
5489
5489
|
n,
|
|
5490
5490
|
o,
|
|
5491
5491
|
l = M(this.state.type) ? this.lookaheadCharCode() : null;
|
|
5492
|
-
if (l === 58) i =
|
|
5493
|
-
n =
|
|
5492
|
+
if (l === 58) i = true, n = false, r = this.parseIdentifier(true), this.expect(14), o = this.tsParseType();else if (l === 63) {
|
|
5493
|
+
n = true;
|
|
5494
5494
|
let c = this.state.startLoc,
|
|
5495
5495
|
u = this.state.value,
|
|
5496
5496
|
d = this.tsParseNonArrayType();
|
|
5497
|
-
this.lookaheadCharCode() === 58 ? (i =
|
|
5497
|
+
this.lookaheadCharCode() === 58 ? (i = true, r = this.createIdentifier(this.startNodeAt(c), u), this.expect(17), this.expect(14), o = this.tsParseType()) : (i = false, o = d, this.expect(17));
|
|
5498
5498
|
} else o = this.tsParseType(), n = this.eat(17), i = this.eat(14);
|
|
5499
5499
|
if (i) {
|
|
5500
5500
|
let c;
|
|
5501
|
-
r ? (c = this.startNodeAtNode(r), c.optional = n, c.label = r, c.elementType = o, this.eat(17) && (c.optional =
|
|
5501
|
+
r ? (c = this.startNodeAtNode(r), c.optional = n, c.label = r, c.elementType = o, this.eat(17) && (c.optional = true, this.raise(y.TupleOptionalAfterType, {
|
|
5502
5502
|
at: this.state.lastTokStartLoc
|
|
5503
5503
|
}))) : (c = this.startNodeAtNode(o), c.optional = n, this.raise(y.InvalidTupleMemberLabel, {
|
|
5504
5504
|
at: o
|
|
@@ -5538,7 +5538,7 @@ var rs = ps(Me => {
|
|
|
5538
5538
|
}
|
|
5539
5539
|
tsParseTemplateLiteralType() {
|
|
5540
5540
|
let e = this.startNode();
|
|
5541
|
-
return e.literal = super.parseTemplate(
|
|
5541
|
+
return e.literal = super.parseTemplate(false), this.finishNode(e, "TSLiteralType");
|
|
5542
5542
|
}
|
|
5543
5543
|
parseTemplateSubstitution() {
|
|
5544
5544
|
return this.state.inType ? this.tsParseType() : super.parseTemplateSubstitution();
|
|
@@ -5650,10 +5650,10 @@ var rs = ps(Me => {
|
|
|
5650
5650
|
return this.tsParseUnionOrIntersectionType("TSUnionType", this.tsParseIntersectionTypeOrHigher.bind(this), 43);
|
|
5651
5651
|
}
|
|
5652
5652
|
tsIsStartOfFunctionType() {
|
|
5653
|
-
return this.match(47) ?
|
|
5653
|
+
return this.match(47) ? true : this.match(10) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this));
|
|
5654
5654
|
}
|
|
5655
5655
|
tsSkipParameterStart() {
|
|
5656
|
-
if (S(this.state.type) || this.match(78)) return this.next(),
|
|
5656
|
+
if (S(this.state.type) || this.match(78)) return this.next(), true;
|
|
5657
5657
|
if (this.match(5)) {
|
|
5658
5658
|
let {
|
|
5659
5659
|
errors: e
|
|
@@ -5662,7 +5662,7 @@ var rs = ps(Me => {
|
|
|
5662
5662
|
try {
|
|
5663
5663
|
return this.parseObjectLike(8, !0), e.length === s;
|
|
5664
5664
|
} catch {
|
|
5665
|
-
return
|
|
5665
|
+
return false;
|
|
5666
5666
|
}
|
|
5667
5667
|
}
|
|
5668
5668
|
if (this.match(0)) {
|
|
@@ -5674,10 +5674,10 @@ var rs = ps(Me => {
|
|
|
5674
5674
|
try {
|
|
5675
5675
|
return super.parseBindingList(3, 93, 1), e.length === s;
|
|
5676
5676
|
} catch {
|
|
5677
|
-
return
|
|
5677
|
+
return false;
|
|
5678
5678
|
}
|
|
5679
5679
|
}
|
|
5680
|
-
return
|
|
5680
|
+
return false;
|
|
5681
5681
|
}
|
|
5682
5682
|
tsIsUnambiguouslyStartOfFunctionType() {
|
|
5683
5683
|
return this.next(), !!(this.match(11) || this.match(21) || this.tsSkipParameterStart() && (this.match(14) || this.match(12) || this.match(17) || this.match(29) || this.match(11) && (this.next(), this.match(19))));
|
|
@@ -5690,11 +5690,11 @@ var rs = ps(Me => {
|
|
|
5690
5690
|
r = !!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));
|
|
5691
5691
|
if (r && this.match(78)) {
|
|
5692
5692
|
let h = this.tsParseThisTypeOrThisTypePredicate();
|
|
5693
|
-
return h.type === "TSThisType" ? (i.parameterName = h, i.asserts =
|
|
5693
|
+
return h.type === "TSThisType" ? (i.parameterName = h, i.asserts = true, i.typeAnnotation = null, h = this.finishNode(i, "TSTypePredicate")) : (this.resetStartLocationFromNode(h, i), h.asserts = true), s.typeAnnotation = h, this.finishNode(s, "TSTypeAnnotation");
|
|
5694
5694
|
}
|
|
5695
5695
|
let n = this.tsIsIdentifier() && this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));
|
|
5696
|
-
if (!n) return r ? (i.parameterName = this.parseIdentifier(), i.asserts = r, i.typeAnnotation = null, s.typeAnnotation = this.finishNode(i, "TSTypePredicate"), this.finishNode(s, "TSTypeAnnotation")) : this.tsParseTypeAnnotation(
|
|
5697
|
-
let o = this.tsParseTypeAnnotation(
|
|
5696
|
+
if (!n) return r ? (i.parameterName = this.parseIdentifier(), i.asserts = r, i.typeAnnotation = null, s.typeAnnotation = this.finishNode(i, "TSTypePredicate"), this.finishNode(s, "TSTypeAnnotation")) : this.tsParseTypeAnnotation(false, s);
|
|
5697
|
+
let o = this.tsParseTypeAnnotation(false);
|
|
5698
5698
|
return i.parameterName = n, i.typeAnnotation = o, i.asserts = r, s.typeAnnotation = this.finishNode(i, "TSTypePredicate"), this.finishNode(s, "TSTypeAnnotation");
|
|
5699
5699
|
});
|
|
5700
5700
|
}
|
|
@@ -5712,14 +5712,14 @@ var rs = ps(Me => {
|
|
|
5712
5712
|
if (this.isContextual(114) && !this.hasPrecedingLineBreak()) return this.next(), e;
|
|
5713
5713
|
}
|
|
5714
5714
|
tsParseTypePredicateAsserts() {
|
|
5715
|
-
if (this.state.type !== 107) return
|
|
5715
|
+
if (this.state.type !== 107) return false;
|
|
5716
5716
|
let e = this.state.containsEsc;
|
|
5717
|
-
return this.next(), !S(this.state.type) && !this.match(78) ?
|
|
5717
|
+
return this.next(), !S(this.state.type) && !this.match(78) ? false : (e && this.raise(p.InvalidEscapedReservedWord, {
|
|
5718
5718
|
at: this.state.lastTokStartLoc,
|
|
5719
5719
|
reservedWord: "asserts"
|
|
5720
|
-
}),
|
|
5720
|
+
}), true);
|
|
5721
5721
|
}
|
|
5722
|
-
tsParseTypeAnnotation(e =
|
|
5722
|
+
tsParseTypeAnnotation(e = true, s = this.startNode()) {
|
|
5723
5723
|
return this.tsInType(() => {
|
|
5724
5724
|
e && this.expect(14), s.typeAnnotation = this.tsParseType();
|
|
5725
5725
|
}), this.finishNode(s, "TSTypeAnnotation");
|
|
@@ -5735,7 +5735,7 @@ var rs = ps(Me => {
|
|
|
5735
5735
|
return this.isContextual(122) && this.lookahead().type === 77;
|
|
5736
5736
|
}
|
|
5737
5737
|
tsParseNonConditionalType() {
|
|
5738
|
-
return this.tsIsStartOfFunctionType() ? this.tsParseFunctionOrConstructorType("TSFunctionType") : this.match(77) ? this.tsParseFunctionOrConstructorType("TSConstructorType") : this.isAbstractConstructorSignature() ? this.tsParseFunctionOrConstructorType("TSConstructorType",
|
|
5738
|
+
return this.tsIsStartOfFunctionType() ? this.tsParseFunctionOrConstructorType("TSFunctionType") : this.match(77) ? this.tsParseFunctionOrConstructorType("TSConstructorType") : this.isAbstractConstructorSignature() ? this.tsParseFunctionOrConstructorType("TSConstructorType", true) : this.tsParseUnionTypeOrHigher();
|
|
5739
5739
|
}
|
|
5740
5740
|
tsParseTypeAssertion() {
|
|
5741
5741
|
this.getPluginOption("typescript", "disallowAmbiguousJSXLike") && this.raise(y.ReservedTypeAssertion, {
|
|
@@ -5757,7 +5757,7 @@ var rs = ps(Me => {
|
|
|
5757
5757
|
}
|
|
5758
5758
|
tsParseInterfaceDeclaration(e, s = {}) {
|
|
5759
5759
|
if (this.hasFollowingLineBreak()) return null;
|
|
5760
|
-
this.expectContextual(127), s.declare && (e.declare =
|
|
5760
|
+
this.expectContextual(127), s.declare && (e.declare = true), S(this.state.type) ? (e.id = this.parseIdentifier(), this.checkIdentifier(e.id, wr)) : (e.id = null, this.raise(y.MissingInterfaceName, {
|
|
5761
5761
|
at: this.state.startLoc
|
|
5762
5762
|
})), e.typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers), this.eat(81) && (e.extends = this.tsParseHeritageClause("extends"));
|
|
5763
5763
|
let i = this.startNode();
|
|
@@ -5783,7 +5783,7 @@ var rs = ps(Me => {
|
|
|
5783
5783
|
}
|
|
5784
5784
|
tsInType(e) {
|
|
5785
5785
|
let s = this.state.inType;
|
|
5786
|
-
this.state.inType =
|
|
5786
|
+
this.state.inType = true;
|
|
5787
5787
|
try {
|
|
5788
5788
|
return e();
|
|
5789
5789
|
} finally {
|
|
@@ -5792,7 +5792,7 @@ var rs = ps(Me => {
|
|
|
5792
5792
|
}
|
|
5793
5793
|
tsInDisallowConditionalTypesContext(e) {
|
|
5794
5794
|
let s = this.state.inDisallowConditionalTypesContext;
|
|
5795
|
-
this.state.inDisallowConditionalTypesContext =
|
|
5795
|
+
this.state.inDisallowConditionalTypesContext = true;
|
|
5796
5796
|
try {
|
|
5797
5797
|
return e();
|
|
5798
5798
|
} finally {
|
|
@@ -5801,7 +5801,7 @@ var rs = ps(Me => {
|
|
|
5801
5801
|
}
|
|
5802
5802
|
tsInAllowConditionalTypesContext(e) {
|
|
5803
5803
|
let s = this.state.inDisallowConditionalTypesContext;
|
|
5804
|
-
this.state.inDisallowConditionalTypesContext =
|
|
5804
|
+
this.state.inDisallowConditionalTypesContext = false;
|
|
5805
5805
|
try {
|
|
5806
5806
|
return e();
|
|
5807
5807
|
} finally {
|
|
@@ -5819,27 +5819,27 @@ var rs = ps(Me => {
|
|
|
5819
5819
|
}
|
|
5820
5820
|
tsParseEnumMember() {
|
|
5821
5821
|
let e = this.startNode();
|
|
5822
|
-
return e.id = this.match(131) ? super.parseStringLiteral(this.state.value) : this.parseIdentifier(
|
|
5822
|
+
return e.id = this.match(131) ? super.parseStringLiteral(this.state.value) : this.parseIdentifier(true), this.eat(29) && (e.initializer = super.parseMaybeAssignAllowIn()), this.finishNode(e, "TSEnumMember");
|
|
5823
5823
|
}
|
|
5824
5824
|
tsParseEnumDeclaration(e, s = {}) {
|
|
5825
|
-
return s.const && (e.const =
|
|
5825
|
+
return s.const && (e.const = true), s.declare && (e.declare = true), this.expectContextual(124), e.id = this.parseIdentifier(), this.checkIdentifier(e.id, e.const ? kr : Vs), this.expect(5), e.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this)), this.expect(8), this.finishNode(e, "TSEnumDeclaration");
|
|
5826
5826
|
}
|
|
5827
5827
|
tsParseModuleBlock() {
|
|
5828
5828
|
let e = this.startNode();
|
|
5829
|
-
return this.scope.enter(ae), this.expect(5), super.parseBlockOrModuleBlockBody(e.body = [], void 0,
|
|
5829
|
+
return this.scope.enter(ae), this.expect(5), super.parseBlockOrModuleBlockBody(e.body = [], void 0, true, 8), this.scope.exit(), this.finishNode(e, "TSModuleBlock");
|
|
5830
5830
|
}
|
|
5831
|
-
tsParseModuleOrNamespaceDeclaration(e, s =
|
|
5831
|
+
tsParseModuleOrNamespaceDeclaration(e, s = false) {
|
|
5832
5832
|
if (e.id = this.parseIdentifier(), s || this.checkIdentifier(e.id, vr), this.eat(16)) {
|
|
5833
5833
|
let i = this.startNode();
|
|
5834
|
-
this.tsParseModuleOrNamespaceDeclaration(i,
|
|
5834
|
+
this.tsParseModuleOrNamespaceDeclaration(i, true), e.body = i;
|
|
5835
5835
|
} else this.scope.enter(le), this.prodParam.enter(pe), e.body = this.tsParseModuleBlock(), this.prodParam.exit(), this.scope.exit();
|
|
5836
5836
|
return this.finishNode(e, "TSModuleDeclaration");
|
|
5837
5837
|
}
|
|
5838
5838
|
tsParseAmbientExternalModuleDeclaration(e) {
|
|
5839
|
-
return this.isContextual(110) ? (e.global =
|
|
5839
|
+
return this.isContextual(110) ? (e.global = true, e.id = this.parseIdentifier()) : this.match(131) ? e.id = super.parseStringLiteral(this.state.value) : this.unexpected(), this.match(5) ? (this.scope.enter(le), this.prodParam.enter(pe), e.body = this.tsParseModuleBlock(), this.prodParam.exit(), this.scope.exit()) : this.semicolon(), this.finishNode(e, "TSModuleDeclaration");
|
|
5840
5840
|
}
|
|
5841
5841
|
tsParseImportEqualsDeclaration(e, s, i) {
|
|
5842
|
-
e.isExport = i ||
|
|
5842
|
+
e.isExport = i || false, e.id = s || this.parseIdentifier(), this.checkIdentifier(e.id, Ne), this.expect(29);
|
|
5843
5843
|
let r = this.tsParseModuleReference();
|
|
5844
5844
|
return e.importKind === "type" && r.type !== "TSExternalModuleReference" && this.raise(y.ImportAliasHasImportType, {
|
|
5845
5845
|
at: r
|
|
@@ -5849,11 +5849,11 @@ var rs = ps(Me => {
|
|
|
5849
5849
|
return this.isContextual(117) && this.lookaheadCharCode() === 40;
|
|
5850
5850
|
}
|
|
5851
5851
|
tsParseModuleReference() {
|
|
5852
|
-
return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(
|
|
5852
|
+
return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(false);
|
|
5853
5853
|
}
|
|
5854
5854
|
tsParseExternalModuleReference() {
|
|
5855
5855
|
let e = this.startNode();
|
|
5856
|
-
return this.expectContextual(117), this.expect(10), this.match(131) || this.unexpected(), e.expression = super.parseExprAtom(), this.expect(11), this.sawUnambiguousESM =
|
|
5856
|
+
return this.expectContextual(117), this.expect(10), this.match(131) || this.unexpected(), e.expression = super.parseExprAtom(), this.expect(11), this.sawUnambiguousESM = true, this.finishNode(e, "TSExternalModuleReference");
|
|
5857
5857
|
}
|
|
5858
5858
|
tsLookAhead(e) {
|
|
5859
5859
|
let s = this.state.clone(),
|
|
@@ -5867,7 +5867,7 @@ var rs = ps(Me => {
|
|
|
5867
5867
|
tsTryParse(e) {
|
|
5868
5868
|
let s = this.state.clone(),
|
|
5869
5869
|
i = e();
|
|
5870
|
-
if (i !== void 0 && i !==
|
|
5870
|
+
if (i !== void 0 && i !== false) return i;
|
|
5871
5871
|
this.state = s;
|
|
5872
5872
|
}
|
|
5873
5873
|
tsTryParseDeclare(e) {
|
|
@@ -5877,52 +5877,52 @@ var rs = ps(Me => {
|
|
|
5877
5877
|
return this.isContextual(99) && (s = 74, i = "let"), this.tsInAmbientContext(() => {
|
|
5878
5878
|
switch (s) {
|
|
5879
5879
|
case 68:
|
|
5880
|
-
return e.declare =
|
|
5880
|
+
return e.declare = true, super.parseFunctionStatement(e, false, false);
|
|
5881
5881
|
case 80:
|
|
5882
|
-
return e.declare =
|
|
5882
|
+
return e.declare = true, this.parseClass(e, true, false);
|
|
5883
5883
|
case 124:
|
|
5884
5884
|
return this.tsParseEnumDeclaration(e, {
|
|
5885
|
-
declare:
|
|
5885
|
+
declare: true
|
|
5886
5886
|
});
|
|
5887
5887
|
case 110:
|
|
5888
5888
|
return this.tsParseAmbientExternalModuleDeclaration(e);
|
|
5889
5889
|
case 75:
|
|
5890
5890
|
case 74:
|
|
5891
|
-
return !this.match(75) || !this.isLookaheadContextual("enum") ? (e.declare =
|
|
5892
|
-
const:
|
|
5893
|
-
declare:
|
|
5891
|
+
return !this.match(75) || !this.isLookaheadContextual("enum") ? (e.declare = true, this.parseVarStatement(e, i || this.state.value, true)) : (this.expect(75), this.tsParseEnumDeclaration(e, {
|
|
5892
|
+
const: true,
|
|
5893
|
+
declare: true
|
|
5894
5894
|
}));
|
|
5895
5895
|
case 127:
|
|
5896
5896
|
{
|
|
5897
5897
|
let r = this.tsParseInterfaceDeclaration(e, {
|
|
5898
|
-
declare:
|
|
5898
|
+
declare: true
|
|
5899
5899
|
});
|
|
5900
5900
|
if (r) return r;
|
|
5901
5901
|
}
|
|
5902
5902
|
default:
|
|
5903
|
-
if (S(s)) return this.tsParseDeclaration(e, this.state.value,
|
|
5903
|
+
if (S(s)) return this.tsParseDeclaration(e, this.state.value, true, null);
|
|
5904
5904
|
}
|
|
5905
5905
|
});
|
|
5906
5906
|
}
|
|
5907
5907
|
tsTryParseExportDeclaration() {
|
|
5908
|
-
return this.tsParseDeclaration(this.startNode(), this.state.value,
|
|
5908
|
+
return this.tsParseDeclaration(this.startNode(), this.state.value, true, null);
|
|
5909
5909
|
}
|
|
5910
5910
|
tsParseExpressionStatement(e, s, i) {
|
|
5911
5911
|
switch (s.name) {
|
|
5912
5912
|
case "declare":
|
|
5913
5913
|
{
|
|
5914
5914
|
let r = this.tsTryParseDeclare(e);
|
|
5915
|
-
return r && (r.declare =
|
|
5915
|
+
return r && (r.declare = true), r;
|
|
5916
5916
|
}
|
|
5917
5917
|
case "global":
|
|
5918
5918
|
if (this.match(5)) {
|
|
5919
5919
|
this.scope.enter(le), this.prodParam.enter(pe);
|
|
5920
5920
|
let r = e;
|
|
5921
|
-
return r.global =
|
|
5921
|
+
return r.global = true, r.id = s, r.body = this.tsParseModuleBlock(), this.scope.exit(), this.prodParam.exit(), this.finishNode(r, "TSModuleDeclaration");
|
|
5922
5922
|
}
|
|
5923
5923
|
break;
|
|
5924
5924
|
default:
|
|
5925
|
-
return this.tsParseDeclaration(e, s.name,
|
|
5925
|
+
return this.tsParseDeclaration(e, s.name, false, i);
|
|
5926
5926
|
}
|
|
5927
5927
|
}
|
|
5928
5928
|
tsParseDeclaration(e, s, i, r) {
|
|
@@ -5945,17 +5945,17 @@ var rs = ps(Me => {
|
|
|
5945
5945
|
}
|
|
5946
5946
|
}
|
|
5947
5947
|
tsCheckLineTerminator(e) {
|
|
5948
|
-
return e ? this.hasFollowingLineBreak() ?
|
|
5948
|
+
return e ? this.hasFollowingLineBreak() ? false : (this.next(), true) : !this.isLineTerminator();
|
|
5949
5949
|
}
|
|
5950
5950
|
tsTryParseGenericAsyncArrowFunction(e) {
|
|
5951
5951
|
if (!this.match(47)) return;
|
|
5952
5952
|
let s = this.state.maybeInArrowParameters;
|
|
5953
|
-
this.state.maybeInArrowParameters =
|
|
5953
|
+
this.state.maybeInArrowParameters = true;
|
|
5954
5954
|
let i = this.tsTryParseAndCatch(() => {
|
|
5955
5955
|
let r = this.startNodeAt(e);
|
|
5956
5956
|
return r.typeParameters = this.tsParseTypeParameters(this.tsParseConstModifier), super.parseFunctionParams(r), r.returnType = this.tsTryParseTypeOrTypePredicateAnnotation(), this.expect(19), r;
|
|
5957
5957
|
});
|
|
5958
|
-
if (this.state.maybeInArrowParameters = s, !!i) return super.parseArrowExpression(i, null,
|
|
5958
|
+
if (this.state.maybeInArrowParameters = s, !!i) return super.parseArrowExpression(i, null, true);
|
|
5959
5959
|
}
|
|
5960
5960
|
tsParseTypeArgumentsInExpression() {
|
|
5961
5961
|
if (this.reScan_lt() === 47) return this.tsParseTypeArguments();
|
|
@@ -5970,7 +5970,7 @@ var rs = ps(Me => {
|
|
|
5970
5970
|
return fr(this.state.type);
|
|
5971
5971
|
}
|
|
5972
5972
|
isExportDefaultSpecifier() {
|
|
5973
|
-
return this.tsIsDeclarationStart() ?
|
|
5973
|
+
return this.tsIsDeclarationStart() ? false : super.isExportDefaultSpecifier();
|
|
5974
5974
|
}
|
|
5975
5975
|
parseAssignableListItem(e, s) {
|
|
5976
5976
|
let i = this.state.startLoc,
|
|
@@ -6006,7 +6006,7 @@ var rs = ps(Me => {
|
|
|
6006
6006
|
setArrowFunctionParameters(e, s, i) {
|
|
6007
6007
|
super.setArrowFunctionParameters(e, s, i), this.tsDisallowOptionalPattern(e);
|
|
6008
6008
|
}
|
|
6009
|
-
parseFunctionBodyAndFinish(e, s, i =
|
|
6009
|
+
parseFunctionBodyAndFinish(e, s, i = false) {
|
|
6010
6010
|
this.match(14) && (e.returnType = this.tsParseTypeOrTypePredicateAnnotation(14));
|
|
6011
6011
|
let r = s === "FunctionDeclaration" ? "TSDeclareFunction" : s === "ClassMethod" || s === "ClassPrivateMethod" ? "TSDeclareMethod" : void 0;
|
|
6012
6012
|
return r && !this.match(5) && this.isLineTerminator() ? this.finishNode(e, r) : r === "TSDeclareFunction" && this.state.isAmbientContext && (this.raise(y.DeclareFunctionHasImplementation, {
|
|
@@ -6032,14 +6032,14 @@ var rs = ps(Me => {
|
|
|
6032
6032
|
}
|
|
6033
6033
|
parseSubscript(e, s, i, r) {
|
|
6034
6034
|
if (!this.hasPrecedingLineBreak() && this.match(35)) {
|
|
6035
|
-
this.state.canStartJSXElement =
|
|
6035
|
+
this.state.canStartJSXElement = false, this.next();
|
|
6036
6036
|
let o = this.startNodeAt(s);
|
|
6037
6037
|
return o.expression = e, this.finishNode(o, "TSNonNullExpression");
|
|
6038
6038
|
}
|
|
6039
|
-
let n =
|
|
6039
|
+
let n = false;
|
|
6040
6040
|
if (this.match(18) && this.lookaheadCharCode() === 60) {
|
|
6041
|
-
if (i) return r.stop =
|
|
6042
|
-
r.optionalChainMember = n =
|
|
6041
|
+
if (i) return r.stop = true, e;
|
|
6042
|
+
r.optionalChainMember = n = true, this.next();
|
|
6043
6043
|
}
|
|
6044
6044
|
if (this.match(47) || this.match(51)) {
|
|
6045
6045
|
let o,
|
|
@@ -6060,7 +6060,7 @@ var rs = ps(Me => {
|
|
|
6060
6060
|
}
|
|
6061
6061
|
if (!i && this.eat(10)) {
|
|
6062
6062
|
let d = this.startNodeAt(s);
|
|
6063
|
-
return d.callee = e, d.arguments = this.parseCallExpressionArguments(11,
|
|
6063
|
+
return d.callee = e, d.arguments = this.parseCallExpressionArguments(11, false), this.tsCheckForInvalidTypeCasts(d.arguments), d.typeParameters = l, r.optionalChainMember && (d.optional = n), this.finishCallExpression(d, r.optionalChainMember);
|
|
6064
6064
|
}
|
|
6065
6065
|
let c = this.state.type;
|
|
6066
6066
|
if (c === 48 || c === 52 || c !== 10 && gt(c) && !this.hasPrecedingLineBreak()) return;
|
|
@@ -6102,7 +6102,7 @@ var rs = ps(Me => {
|
|
|
6102
6102
|
}
|
|
6103
6103
|
checkDuplicateExports() {}
|
|
6104
6104
|
isPotentialImportPhase(e) {
|
|
6105
|
-
if (super.isPotentialImportPhase(e)) return
|
|
6105
|
+
if (super.isPotentialImportPhase(e)) return true;
|
|
6106
6106
|
if (this.isContextual(128)) {
|
|
6107
6107
|
let s = this.lookaheadCharCode();
|
|
6108
6108
|
return e ? s === 123 || s === 42 : s !== 61;
|
|
@@ -6117,7 +6117,7 @@ var rs = ps(Me => {
|
|
|
6117
6117
|
let s;
|
|
6118
6118
|
if (S(this.state.type) && this.lookaheadCharCode() === 61) return e.importKind = "value", this.tsParseImportEqualsDeclaration(e);
|
|
6119
6119
|
if (this.isContextual(128)) {
|
|
6120
|
-
let i = this.parseMaybeImportPhase(e,
|
|
6120
|
+
let i = this.parseMaybeImportPhase(e, false);
|
|
6121
6121
|
if (this.lookaheadCharCode() === 61) return this.tsParseImportEqualsDeclaration(e, i);
|
|
6122
6122
|
s = super.parseImportSpecifiersAndAfter(e, i);
|
|
6123
6123
|
} else s = super.parseImport(e);
|
|
@@ -6129,10 +6129,10 @@ var rs = ps(Me => {
|
|
|
6129
6129
|
if (this.match(83)) {
|
|
6130
6130
|
this.next();
|
|
6131
6131
|
let i = null;
|
|
6132
|
-
return this.isContextual(128) && this.isPotentialImportPhase(
|
|
6132
|
+
return this.isContextual(128) && this.isPotentialImportPhase(false) ? i = this.parseMaybeImportPhase(e, false) : e.importKind = "value", this.tsParseImportEqualsDeclaration(e, i, true);
|
|
6133
6133
|
} else if (this.eat(29)) {
|
|
6134
6134
|
let i = e;
|
|
6135
|
-
return i.expression = super.parseExpression(), this.semicolon(), this.sawUnambiguousESM =
|
|
6135
|
+
return i.expression = super.parseExpression(), this.semicolon(), this.sawUnambiguousESM = true, this.finishNode(i, "TSExportAssignment");
|
|
6136
6136
|
} else if (this.eatContextual(93)) {
|
|
6137
6137
|
let i = e;
|
|
6138
6138
|
return this.expectContextual(126), i.id = this.parseIdentifier(), this.semicolon(), this.finishNode(i, "TSNamespaceExportDeclaration");
|
|
@@ -6144,7 +6144,7 @@ var rs = ps(Me => {
|
|
|
6144
6144
|
parseExportDefaultExpression() {
|
|
6145
6145
|
if (this.isAbstractClass()) {
|
|
6146
6146
|
let e = this.startNode();
|
|
6147
|
-
return this.next(), e.abstract =
|
|
6147
|
+
return this.next(), e.abstract = true, this.parseClass(e, true, true);
|
|
6148
6148
|
}
|
|
6149
6149
|
if (this.match(127)) {
|
|
6150
6150
|
let e = this.tsParseInterfaceDeclaration(this.startNode());
|
|
@@ -6152,7 +6152,7 @@ var rs = ps(Me => {
|
|
|
6152
6152
|
}
|
|
6153
6153
|
return super.parseExportDefaultExpression();
|
|
6154
6154
|
}
|
|
6155
|
-
parseVarStatement(e, s, i =
|
|
6155
|
+
parseVarStatement(e, s, i = false) {
|
|
6156
6156
|
let {
|
|
6157
6157
|
isAmbientContext: r
|
|
6158
6158
|
} = this.state,
|
|
@@ -6172,7 +6172,7 @@ var rs = ps(Me => {
|
|
|
6172
6172
|
if (this.match(75) && this.isLookaheadContextual("enum")) {
|
|
6173
6173
|
let i = this.startNode();
|
|
6174
6174
|
return this.expect(75), this.tsParseEnumDeclaration(i, {
|
|
6175
|
-
const:
|
|
6175
|
+
const: true
|
|
6176
6176
|
});
|
|
6177
6177
|
}
|
|
6178
6178
|
if (this.isContextual(124)) return this.tsParseEnumDeclaration(this.startNode());
|
|
@@ -6196,7 +6196,7 @@ var rs = ps(Me => {
|
|
|
6196
6196
|
this.tsParseModifiers({
|
|
6197
6197
|
allowedModifiers: r,
|
|
6198
6198
|
disallowedModifiers: ["in", "out"],
|
|
6199
|
-
stopOnStartOfClassStaticBlock:
|
|
6199
|
+
stopOnStartOfClassStaticBlock: true,
|
|
6200
6200
|
errorTemplate: y.InvalidModifierOnTypeParameterPositions
|
|
6201
6201
|
}, s);
|
|
6202
6202
|
let n = () => {
|
|
@@ -6228,7 +6228,7 @@ var rs = ps(Me => {
|
|
|
6228
6228
|
})), super.parseClassMemberWithIsStatic(e, s, i, r);
|
|
6229
6229
|
}
|
|
6230
6230
|
parsePostMemberNameModifiers(e) {
|
|
6231
|
-
this.eat(17) && (e.optional =
|
|
6231
|
+
this.eat(17) && (e.optional = true), e.readonly && this.match(10) && this.raise(y.ClassMethodHasReadonly, {
|
|
6232
6232
|
at: e
|
|
6233
6233
|
}), e.declare && this.match(10) && this.raise(y.ClassMethodHasDeclare, {
|
|
6234
6234
|
at: e
|
|
@@ -6238,7 +6238,7 @@ var rs = ps(Me => {
|
|
|
6238
6238
|
return (s.type === "Identifier" ? this.tsParseExpressionStatement(e, s, i) : void 0) || super.parseExpressionStatement(e, s, i);
|
|
6239
6239
|
}
|
|
6240
6240
|
shouldParseExportDeclaration() {
|
|
6241
|
-
return this.tsIsDeclarationStart() ?
|
|
6241
|
+
return this.tsIsDeclarationStart() ? true : super.shouldParseExportDeclaration();
|
|
6242
6242
|
}
|
|
6243
6243
|
parseConditional(e, s, i) {
|
|
6244
6244
|
if (!this.state.maybeInArrowParameters || !this.match(17)) return super.parseConditional(e, s, i);
|
|
@@ -6246,7 +6246,7 @@ var rs = ps(Me => {
|
|
|
6246
6246
|
return r.node ? (r.error && (this.state = r.failState), r.node) : (r.error && super.setOptionalParametersError(i, r.error), e);
|
|
6247
6247
|
}
|
|
6248
6248
|
parseParenItem(e, s) {
|
|
6249
|
-
if (e = super.parseParenItem(e, s), this.eat(17) && (e.optional =
|
|
6249
|
+
if (e = super.parseParenItem(e, s), this.eat(17) && (e.optional = true, this.resetEndLocation(e)), this.match(14)) {
|
|
6250
6250
|
let i = this.startNodeAt(s);
|
|
6251
6251
|
return i.expression = e, i.typeAnnotation = this.tsParseTypeAnnotation(), this.finishNode(i, "TSTypeCastExpression");
|
|
6252
6252
|
}
|
|
@@ -6260,7 +6260,7 @@ var rs = ps(Me => {
|
|
|
6260
6260
|
at: this.state.startLoc
|
|
6261
6261
|
});
|
|
6262
6262
|
let n = S(this.state.type) && this.tsTryParseExportDeclaration() || super.parseExportDeclaration(e);
|
|
6263
|
-
return n ? ((n.type === "TSInterfaceDeclaration" || n.type === "TSTypeAliasDeclaration" || i) && (e.exportKind = "type"), i && (this.resetStartLocation(n, s), n.declare =
|
|
6263
|
+
return n ? ((n.type === "TSInterfaceDeclaration" || n.type === "TSTypeAliasDeclaration" || i) && (e.exportKind = "type"), i && (this.resetStartLocation(n, s), n.declare = true), n) : null;
|
|
6264
6264
|
}
|
|
6265
6265
|
parseClassId(e, s, i, r) {
|
|
6266
6266
|
if ((!s || i) && this.isContextual(111)) return;
|
|
@@ -6269,7 +6269,7 @@ var rs = ps(Me => {
|
|
|
6269
6269
|
n && (e.typeParameters = n);
|
|
6270
6270
|
}
|
|
6271
6271
|
parseClassPropertyAnnotation(e) {
|
|
6272
|
-
e.optional || (this.eat(35) ? e.definite =
|
|
6272
|
+
e.optional || (this.eat(35) ? e.definite = true : this.eat(17) && (e.optional = true));
|
|
6273
6273
|
let s = this.tsTryParseTypeAnnotation();
|
|
6274
6274
|
s && (e.typeAnnotation = s);
|
|
6275
6275
|
}
|
|
@@ -6306,7 +6306,7 @@ var rs = ps(Me => {
|
|
|
6306
6306
|
at: h
|
|
6307
6307
|
});
|
|
6308
6308
|
let {
|
|
6309
|
-
declare: l =
|
|
6309
|
+
declare: l = false,
|
|
6310
6310
|
kind: c
|
|
6311
6311
|
} = s;
|
|
6312
6312
|
l && (c === "get" || c === "set") && this.raise(y.DeclareAccessor, {
|
|
@@ -6333,7 +6333,7 @@ var rs = ps(Me => {
|
|
|
6333
6333
|
i && (e.typeParameters = i), super.parseFunctionParams(e, s);
|
|
6334
6334
|
}
|
|
6335
6335
|
parseVarId(e, s) {
|
|
6336
|
-
super.parseVarId(e, s), e.id.type === "Identifier" && !this.hasPrecedingLineBreak() && this.eat(35) && (e.definite =
|
|
6336
|
+
super.parseVarId(e, s), e.id.type === "Identifier" && !this.hasPrecedingLineBreak() && this.eat(35) && (e.definite = true);
|
|
6337
6337
|
let i = this.tsTryParseTypeAnnotation();
|
|
6338
6338
|
i && (e.id.typeAnnotation = i, this.resetEndLocation(e.id));
|
|
6339
6339
|
}
|
|
@@ -6389,7 +6389,7 @@ var rs = ps(Me => {
|
|
|
6389
6389
|
}
|
|
6390
6390
|
parseAssignableListItemTypes(e, s) {
|
|
6391
6391
|
if (!(s & 2)) return e;
|
|
6392
|
-
this.eat(17) && (e.optional =
|
|
6392
|
+
this.eat(17) && (e.optional = true);
|
|
6393
6393
|
let i = this.tsTryParseTypeAnnotation();
|
|
6394
6394
|
return i && (e.typeAnnotation = i), this.resetEndLocation(e), e;
|
|
6395
6395
|
}
|
|
@@ -6398,12 +6398,12 @@ var rs = ps(Me => {
|
|
|
6398
6398
|
case "TSTypeCastExpression":
|
|
6399
6399
|
return this.isAssignable(e.expression, s);
|
|
6400
6400
|
case "TSParameterProperty":
|
|
6401
|
-
return
|
|
6401
|
+
return true;
|
|
6402
6402
|
default:
|
|
6403
6403
|
return super.isAssignable(e, s);
|
|
6404
6404
|
}
|
|
6405
6405
|
}
|
|
6406
|
-
toAssignable(e, s =
|
|
6406
|
+
toAssignable(e, s = false) {
|
|
6407
6407
|
switch (e.type) {
|
|
6408
6408
|
case "ParenthesizedExpression":
|
|
6409
6409
|
this.toAssignableParenthesizedExpression(e, s);
|
|
@@ -6443,7 +6443,7 @@ var rs = ps(Me => {
|
|
|
6443
6443
|
case "TSSatisfiesExpression":
|
|
6444
6444
|
case "TSTypeAssertion":
|
|
6445
6445
|
case "TSNonNullExpression":
|
|
6446
|
-
this.checkToRestConversion(e.expression,
|
|
6446
|
+
this.checkToRestConversion(e.expression, false);
|
|
6447
6447
|
break;
|
|
6448
6448
|
default:
|
|
6449
6449
|
super.checkToRestConversion(e, s);
|
|
@@ -6451,16 +6451,16 @@ var rs = ps(Me => {
|
|
|
6451
6451
|
}
|
|
6452
6452
|
isValidLVal(e, s, i) {
|
|
6453
6453
|
return ra({
|
|
6454
|
-
TSTypeCastExpression:
|
|
6454
|
+
TSTypeCastExpression: true,
|
|
6455
6455
|
TSParameterProperty: "parameter",
|
|
6456
6456
|
TSNonNullExpression: "expression",
|
|
6457
|
-
TSAsExpression: (i !== W || !s) && ["expression",
|
|
6458
|
-
TSSatisfiesExpression: (i !== W || !s) && ["expression",
|
|
6459
|
-
TSTypeAssertion: (i !== W || !s) && ["expression",
|
|
6457
|
+
TSAsExpression: (i !== W || !s) && ["expression", true],
|
|
6458
|
+
TSSatisfiesExpression: (i !== W || !s) && ["expression", true],
|
|
6459
|
+
TSTypeAssertion: (i !== W || !s) && ["expression", true]
|
|
6460
6460
|
}, e) || super.isValidLVal(e, s, i);
|
|
6461
6461
|
}
|
|
6462
6462
|
parseBindingAtom() {
|
|
6463
|
-
return this.state.type === 78 ? this.parseIdentifier(
|
|
6463
|
+
return this.state.type === 78 ? this.parseIdentifier(true) : super.parseBindingAtom();
|
|
6464
6464
|
}
|
|
6465
6465
|
parseMaybeDecoratorArguments(e) {
|
|
6466
6466
|
if (this.match(47) || this.match(51)) {
|
|
@@ -6474,7 +6474,7 @@ var rs = ps(Me => {
|
|
|
6474
6474
|
return super.parseMaybeDecoratorArguments(e);
|
|
6475
6475
|
}
|
|
6476
6476
|
checkCommaAfterRest(e) {
|
|
6477
|
-
return this.state.isAmbientContext && this.match(12) && this.lookaheadCharCode() === e ? (this.next(),
|
|
6477
|
+
return this.state.isAmbientContext && this.match(12) && this.lookaheadCharCode() === e ? (this.next(), false) : super.checkCommaAfterRest(e);
|
|
6478
6478
|
}
|
|
6479
6479
|
isClassMethod() {
|
|
6480
6480
|
return this.match(47) || super.isClassMethod();
|
|
@@ -6524,7 +6524,7 @@ var rs = ps(Me => {
|
|
|
6524
6524
|
return e.expression.typeAnnotation = e.typeAnnotation, this.resetEndLocation(e.expression, e.typeAnnotation.loc.end), e.expression;
|
|
6525
6525
|
}
|
|
6526
6526
|
shouldParseArrow(e) {
|
|
6527
|
-
return this.match(14) ? e.every(s => this.isAssignable(s,
|
|
6527
|
+
return this.match(14) ? e.every(s => this.isAssignable(s, true)) : super.shouldParseArrow(e);
|
|
6528
6528
|
}
|
|
6529
6529
|
shouldParseAsyncArrow() {
|
|
6530
6530
|
return this.match(14) || super.shouldParseAsyncArrow();
|
|
@@ -6551,7 +6551,7 @@ var rs = ps(Me => {
|
|
|
6551
6551
|
}
|
|
6552
6552
|
tsInAmbientContext(e) {
|
|
6553
6553
|
let s = this.state.isAmbientContext;
|
|
6554
|
-
this.state.isAmbientContext =
|
|
6554
|
+
this.state.isAmbientContext = true;
|
|
6555
6555
|
try {
|
|
6556
6556
|
return e();
|
|
6557
6557
|
} finally {
|
|
@@ -6568,9 +6568,9 @@ var rs = ps(Me => {
|
|
|
6568
6568
|
}
|
|
6569
6569
|
}
|
|
6570
6570
|
tsParseAbstractDeclaration(e, s) {
|
|
6571
|
-
if (this.match(80)) return e.abstract =
|
|
6571
|
+
if (this.match(80)) return e.abstract = true, this.maybeTakeDecorators(s, this.parseClass(e, true, false));
|
|
6572
6572
|
if (this.isContextual(127)) {
|
|
6573
|
-
if (!this.hasFollowingLineBreak()) return e.abstract =
|
|
6573
|
+
if (!this.hasFollowingLineBreak()) return e.abstract = true, this.raise(y.NonClassMethodPropertyHasAbstractModifer, {
|
|
6574
6574
|
at: e
|
|
6575
6575
|
}), this.tsParseInterfaceDeclaration(e);
|
|
6576
6576
|
} else this.unexpected(null, 80);
|
|
@@ -6595,32 +6595,32 @@ var rs = ps(Me => {
|
|
|
6595
6595
|
return !!this.getPluginOption("typescript", "dts");
|
|
6596
6596
|
}
|
|
6597
6597
|
parse() {
|
|
6598
|
-
return this.shouldParseAsAmbientContext() && (this.state.isAmbientContext =
|
|
6598
|
+
return this.shouldParseAsAmbientContext() && (this.state.isAmbientContext = true), super.parse();
|
|
6599
6599
|
}
|
|
6600
6600
|
getExpression() {
|
|
6601
|
-
return this.shouldParseAsAmbientContext() && (this.state.isAmbientContext =
|
|
6601
|
+
return this.shouldParseAsAmbientContext() && (this.state.isAmbientContext = true), super.getExpression();
|
|
6602
6602
|
}
|
|
6603
6603
|
parseExportSpecifier(e, s, i, r) {
|
|
6604
|
-
return !s && r ? (this.parseTypeOnlyImportExportSpecifier(e,
|
|
6604
|
+
return !s && r ? (this.parseTypeOnlyImportExportSpecifier(e, false, i), this.finishNode(e, "ExportSpecifier")) : (e.exportKind = "value", super.parseExportSpecifier(e, s, i, r));
|
|
6605
6605
|
}
|
|
6606
6606
|
parseImportSpecifier(e, s, i, r, n) {
|
|
6607
|
-
return !s && r ? (this.parseTypeOnlyImportExportSpecifier(e,
|
|
6607
|
+
return !s && r ? (this.parseTypeOnlyImportExportSpecifier(e, true, i), this.finishNode(e, "ImportSpecifier")) : (e.importKind = "value", super.parseImportSpecifier(e, s, i, r, i ? ys : Ne));
|
|
6608
6608
|
}
|
|
6609
6609
|
parseTypeOnlyImportExportSpecifier(e, s, i) {
|
|
6610
6610
|
let r = s ? "imported" : "local",
|
|
6611
6611
|
n = s ? "local" : "exported",
|
|
6612
6612
|
o = e[r],
|
|
6613
6613
|
h,
|
|
6614
|
-
l =
|
|
6615
|
-
c =
|
|
6614
|
+
l = false,
|
|
6615
|
+
c = true,
|
|
6616
6616
|
u = o.loc.start;
|
|
6617
6617
|
if (this.isContextual(93)) {
|
|
6618
6618
|
let f = this.parseIdentifier();
|
|
6619
6619
|
if (this.isContextual(93)) {
|
|
6620
6620
|
let x = this.parseIdentifier();
|
|
6621
|
-
M(this.state.type) ? (l =
|
|
6622
|
-
} else M(this.state.type) ? (c =
|
|
6623
|
-
} else M(this.state.type) && (l =
|
|
6621
|
+
M(this.state.type) ? (l = true, o = f, h = s ? this.parseIdentifier() : this.parseModuleExportName(), c = false) : (h = x, c = false);
|
|
6622
|
+
} else M(this.state.type) ? (c = false, h = s ? this.parseIdentifier() : this.parseModuleExportName()) : (l = true, o = f);
|
|
6623
|
+
} else M(this.state.type) && (l = true, s ? (o = this.parseIdentifier(true), this.isContextual(93) || this.checkReservedWord(o.name, o.loc.start, true, true)) : o = this.parseModuleExportName());
|
|
6624
6624
|
l && i && this.raise(s ? y.TypeModifierIsUsedInTypeImports : y.TypeModifierIsUsedInTypeExports, {
|
|
6625
6625
|
at: u
|
|
6626
6626
|
}), e[r] = o, e[n] = h;
|
|
@@ -6629,27 +6629,27 @@ var rs = ps(Me => {
|
|
|
6629
6629
|
}
|
|
6630
6630
|
};
|
|
6631
6631
|
function la(a) {
|
|
6632
|
-
if (a.type !== "MemberExpression") return
|
|
6632
|
+
if (a.type !== "MemberExpression") return false;
|
|
6633
6633
|
let {
|
|
6634
6634
|
computed: t,
|
|
6635
6635
|
property: e
|
|
6636
6636
|
} = a;
|
|
6637
|
-
return t && e.type !== "StringLiteral" && (e.type !== "TemplateLiteral" || e.expressions.length > 0) ?
|
|
6637
|
+
return t && e.type !== "StringLiteral" && (e.type !== "TemplateLiteral" || e.expressions.length > 0) ? false : ei(a.object);
|
|
6638
6638
|
}
|
|
6639
6639
|
function ca(a, t) {
|
|
6640
6640
|
var e;
|
|
6641
6641
|
let {
|
|
6642
6642
|
type: s
|
|
6643
6643
|
} = a;
|
|
6644
|
-
if ((e = a.extra) != null && e.parenthesized) return
|
|
6644
|
+
if ((e = a.extra) != null && e.parenthesized) return false;
|
|
6645
6645
|
if (t) {
|
|
6646
6646
|
if (s === "Literal") {
|
|
6647
6647
|
let {
|
|
6648
6648
|
value: i
|
|
6649
6649
|
} = a;
|
|
6650
|
-
if (typeof i == "string" || typeof i == "boolean") return
|
|
6650
|
+
if (typeof i == "string" || typeof i == "boolean") return true;
|
|
6651
6651
|
}
|
|
6652
|
-
} else if (s === "StringLiteral" || s === "BooleanLiteral") return
|
|
6652
|
+
} else if (s === "StringLiteral" || s === "BooleanLiteral") return true;
|
|
6653
6653
|
return !!(Zs(a, t) || pa(a, t) || s === "TemplateLiteral" && a.expressions.length === 0 || la(a));
|
|
6654
6654
|
}
|
|
6655
6655
|
function Zs(a, t) {
|
|
@@ -6661,12 +6661,12 @@ var rs = ps(Me => {
|
|
|
6661
6661
|
operator: e,
|
|
6662
6662
|
argument: s
|
|
6663
6663
|
} = a;
|
|
6664
|
-
if (e === "-" && Zs(s, t)) return
|
|
6664
|
+
if (e === "-" && Zs(s, t)) return true;
|
|
6665
6665
|
}
|
|
6666
|
-
return
|
|
6666
|
+
return false;
|
|
6667
6667
|
}
|
|
6668
6668
|
function ei(a) {
|
|
6669
|
-
return a.type === "Identifier" ?
|
|
6669
|
+
return a.type === "Identifier" ? true : a.type !== "MemberExpression" || a.computed ? false : ei(a.object);
|
|
6670
6670
|
}
|
|
6671
6671
|
var Ss = V`placeholders`({
|
|
6672
6672
|
ClassNameIsRequired: "A class name is required.",
|
|
@@ -6676,7 +6676,7 @@ var rs = ps(Me => {
|
|
|
6676
6676
|
parsePlaceholder(e) {
|
|
6677
6677
|
if (this.match(142)) {
|
|
6678
6678
|
let s = this.startNode();
|
|
6679
|
-
return this.next(), this.assertNoSpace(), s.name = super.parseIdentifier(
|
|
6679
|
+
return this.next(), this.assertNoSpace(), s.name = super.parseIdentifier(true), this.assertNoSpace(), this.expect(142), this.finishPlaceholder(s, e);
|
|
6680
6680
|
}
|
|
6681
6681
|
}
|
|
6682
6682
|
finishPlaceholder(e, s) {
|
|
@@ -6750,13 +6750,13 @@ var rs = ps(Me => {
|
|
|
6750
6750
|
isExportDefaultSpecifier() {
|
|
6751
6751
|
if (this.match(65)) {
|
|
6752
6752
|
let e = this.nextTokenStart();
|
|
6753
|
-
if (this.isUnparsedContextual(e, "from") && this.input.startsWith(J(142), this.nextTokenStartSince(e + 4))) return
|
|
6753
|
+
if (this.isUnparsedContextual(e, "from") && this.input.startsWith(J(142), this.nextTokenStartSince(e + 4))) return true;
|
|
6754
6754
|
}
|
|
6755
6755
|
return super.isExportDefaultSpecifier();
|
|
6756
6756
|
}
|
|
6757
6757
|
maybeParseExportDefaultSpecifier(e, s) {
|
|
6758
6758
|
var i;
|
|
6759
|
-
return (i = e.specifiers) != null && i.length ?
|
|
6759
|
+
return (i = e.specifiers) != null && i.length ? true : super.maybeParseExportDefaultSpecifier(e, s);
|
|
6760
6760
|
}
|
|
6761
6761
|
checkExport(e) {
|
|
6762
6762
|
let {
|
|
@@ -6805,9 +6805,9 @@ var rs = ps(Me => {
|
|
|
6805
6805
|
if (typeof n == "string") return r && n === e;
|
|
6806
6806
|
{
|
|
6807
6807
|
let [o, h] = n;
|
|
6808
|
-
if (o !== e) return
|
|
6809
|
-
for (let l of i) if (h[l] !== s[l]) return
|
|
6810
|
-
return
|
|
6808
|
+
if (o !== e) return false;
|
|
6809
|
+
for (let l of i) if (h[l] !== s[l]) return false;
|
|
6810
|
+
return true;
|
|
6811
6811
|
}
|
|
6812
6812
|
});
|
|
6813
6813
|
}
|
|
@@ -6873,23 +6873,23 @@ var rs = ps(Me => {
|
|
|
6873
6873
|
sourceFilename: void 0,
|
|
6874
6874
|
startColumn: 0,
|
|
6875
6875
|
startLine: 1,
|
|
6876
|
-
allowAwaitOutsideFunction:
|
|
6877
|
-
allowReturnOutsideFunction:
|
|
6878
|
-
allowNewTargetOutsideFunction:
|
|
6879
|
-
allowImportExportEverywhere:
|
|
6880
|
-
allowSuperOutsideMethod:
|
|
6881
|
-
allowUndeclaredExports:
|
|
6876
|
+
allowAwaitOutsideFunction: false,
|
|
6877
|
+
allowReturnOutsideFunction: false,
|
|
6878
|
+
allowNewTargetOutsideFunction: false,
|
|
6879
|
+
allowImportExportEverywhere: false,
|
|
6880
|
+
allowSuperOutsideMethod: false,
|
|
6881
|
+
allowUndeclaredExports: false,
|
|
6882
6882
|
plugins: [],
|
|
6883
6883
|
strictMode: null,
|
|
6884
|
-
ranges:
|
|
6885
|
-
tokens:
|
|
6886
|
-
createParenthesizedExpressions:
|
|
6887
|
-
errorRecovery:
|
|
6888
|
-
attachComment:
|
|
6889
|
-
annexB:
|
|
6884
|
+
ranges: false,
|
|
6885
|
+
tokens: false,
|
|
6886
|
+
createParenthesizedExpressions: false,
|
|
6887
|
+
errorRecovery: false,
|
|
6888
|
+
attachComment: true,
|
|
6889
|
+
annexB: true
|
|
6890
6890
|
};
|
|
6891
6891
|
function ya(a) {
|
|
6892
|
-
if (a && a.annexB != null && a.annexB !==
|
|
6892
|
+
if (a && a.annexB != null && a.annexB !== false) throw new Error("The `annexB` option can only be set to `false`.");
|
|
6893
6893
|
let t = {};
|
|
6894
6894
|
for (let e of Object.keys(Is)) t[e] = a && a[e] != null ? a[e] : Is[e];
|
|
6895
6895
|
return t;
|
|
@@ -6907,7 +6907,7 @@ var rs = ps(Me => {
|
|
|
6907
6907
|
}
|
|
6908
6908
|
s.used && (i ? i.doubleProtoLoc === null && (i.doubleProtoLoc = r.loc.start) : this.raise(p.DuplicateProto, {
|
|
6909
6909
|
at: r
|
|
6910
|
-
})), s.used =
|
|
6910
|
+
})), s.used = true;
|
|
6911
6911
|
}
|
|
6912
6912
|
}
|
|
6913
6913
|
shouldExitDescending(t, e) {
|
|
@@ -6948,7 +6948,7 @@ var rs = ps(Me => {
|
|
|
6948
6948
|
return e && (o = e.call(this, o, s)), o;
|
|
6949
6949
|
}
|
|
6950
6950
|
let i;
|
|
6951
|
-
t ? i =
|
|
6951
|
+
t ? i = false : (t = new ue(), i = true);
|
|
6952
6952
|
let {
|
|
6953
6953
|
type: r
|
|
6954
6954
|
} = this.state;
|
|
@@ -6958,14 +6958,14 @@ var rs = ps(Me => {
|
|
|
6958
6958
|
let o = this.startNodeAt(s),
|
|
6959
6959
|
h = this.state.value;
|
|
6960
6960
|
if (o.operator = h, this.match(29)) {
|
|
6961
|
-
this.toAssignable(n,
|
|
6961
|
+
this.toAssignable(n, true), o.left = n;
|
|
6962
6962
|
let l = s.index;
|
|
6963
6963
|
t.doubleProtoLoc != null && t.doubleProtoLoc.index >= l && (t.doubleProtoLoc = null), t.shorthandAssignLoc != null && t.shorthandAssignLoc.index >= l && (t.shorthandAssignLoc = null), t.privateKeyLoc != null && t.privateKeyLoc.index >= l && (this.checkDestructuringPrivate(t), t.privateKeyLoc = null);
|
|
6964
6964
|
} else o.left = n;
|
|
6965
6965
|
return this.next(), o.right = this.parseMaybeAssign(), this.checkLVal(n, {
|
|
6966
6966
|
in: this.finishNode(o, "AssignmentExpression")
|
|
6967
6967
|
}), o;
|
|
6968
|
-
} else i && this.checkExpressionErrors(t,
|
|
6968
|
+
} else i && this.checkExpressionErrors(t, true);
|
|
6969
6969
|
return n;
|
|
6970
6970
|
}
|
|
6971
6971
|
parseMaybeConditional(t) {
|
|
@@ -7080,9 +7080,9 @@ var rs = ps(Me => {
|
|
|
7080
7080
|
let r = this.match(34),
|
|
7081
7081
|
n = this.startNode();
|
|
7082
7082
|
if (pr(this.state.type)) {
|
|
7083
|
-
n.operator = this.state.value, n.prefix =
|
|
7083
|
+
n.operator = this.state.value, n.prefix = true, this.match(72) && this.expectPlugin("throwExpressions");
|
|
7084
7084
|
let h = this.match(89);
|
|
7085
|
-
if (this.next(), n.argument = this.parseMaybeUnary(null,
|
|
7085
|
+
if (this.next(), n.argument = this.parseMaybeUnary(null, true), this.checkExpressionErrors(t, true), this.state.strict && h) {
|
|
7086
7086
|
let l = n.argument;
|
|
7087
7087
|
l.type === "Identifier" ? this.raise(p.StrictDelete, {
|
|
7088
7088
|
at: n
|
|
@@ -7112,10 +7112,10 @@ var rs = ps(Me => {
|
|
|
7112
7112
|
}
|
|
7113
7113
|
let i = this.state.startLoc,
|
|
7114
7114
|
r = this.parseExprSubscripts(s);
|
|
7115
|
-
if (this.checkExpressionErrors(s,
|
|
7115
|
+
if (this.checkExpressionErrors(s, false)) return r;
|
|
7116
7116
|
for (; cr(this.state.type) && !this.canInsertSemicolon();) {
|
|
7117
7117
|
let n = this.startNodeAt(i);
|
|
7118
|
-
n.operator = this.state.value, n.prefix =
|
|
7118
|
+
n.operator = this.state.value, n.prefix = false, n.argument = r, this.next(), this.checkLVal(r, {
|
|
7119
7119
|
in: r = this.finishNode(n, "UpdateExpression")
|
|
7120
7120
|
});
|
|
7121
7121
|
}
|
|
@@ -7129,11 +7129,11 @@ var rs = ps(Me => {
|
|
|
7129
7129
|
}
|
|
7130
7130
|
parseSubscripts(t, e, s) {
|
|
7131
7131
|
let i = {
|
|
7132
|
-
optionalChainMember:
|
|
7132
|
+
optionalChainMember: false,
|
|
7133
7133
|
maybeAsyncArrow: this.atPossibleAsyncArrow(t),
|
|
7134
|
-
stop:
|
|
7134
|
+
stop: false
|
|
7135
7135
|
};
|
|
7136
|
-
do t = this.parseSubscript(t, e, s, i), i.maybeAsyncArrow =
|
|
7136
|
+
do t = this.parseSubscript(t, e, s, i), i.maybeAsyncArrow = false; while (!i.stop);
|
|
7137
7137
|
return t;
|
|
7138
7138
|
}
|
|
7139
7139
|
parseSubscript(t, e, s, i) {
|
|
@@ -7142,33 +7142,33 @@ var rs = ps(Me => {
|
|
|
7142
7142
|
} = this.state;
|
|
7143
7143
|
if (!s && r === 15) return this.parseBind(t, e, s, i);
|
|
7144
7144
|
if (Je(r)) return this.parseTaggedTemplateExpression(t, e, i);
|
|
7145
|
-
let n =
|
|
7145
|
+
let n = false;
|
|
7146
7146
|
if (r === 18) {
|
|
7147
7147
|
if (s && (this.raise(p.OptionalChainingNoNew, {
|
|
7148
7148
|
at: this.state.startLoc
|
|
7149
|
-
}), this.lookaheadCharCode() === 40)) return i.stop =
|
|
7150
|
-
i.optionalChainMember = n =
|
|
7149
|
+
}), this.lookaheadCharCode() === 40)) return i.stop = true, t;
|
|
7150
|
+
i.optionalChainMember = n = true, this.next();
|
|
7151
7151
|
}
|
|
7152
7152
|
if (!s && this.match(10)) return this.parseCoverCallAndAsyncArrowHead(t, e, i, n);
|
|
7153
7153
|
{
|
|
7154
7154
|
let o = this.eat(0);
|
|
7155
|
-
return o || n || this.eat(16) ? this.parseMember(t, e, i, o, n) : (i.stop =
|
|
7155
|
+
return o || n || this.eat(16) ? this.parseMember(t, e, i, o, n) : (i.stop = true, t);
|
|
7156
7156
|
}
|
|
7157
7157
|
}
|
|
7158
7158
|
parseMember(t, e, s, i, r) {
|
|
7159
7159
|
let n = this.startNodeAt(e);
|
|
7160
7160
|
return n.object = t, n.computed = i, i ? (n.property = this.parseExpression(), this.expect(3)) : this.match(136) ? (t.type === "Super" && this.raise(p.SuperPrivateField, {
|
|
7161
7161
|
at: e
|
|
7162
|
-
}), this.classScope.usePrivateName(this.state.value, this.state.startLoc), n.property = this.parsePrivateName()) : n.property = this.parseIdentifier(
|
|
7162
|
+
}), this.classScope.usePrivateName(this.state.value, this.state.startLoc), n.property = this.parsePrivateName()) : n.property = this.parseIdentifier(true), s.optionalChainMember ? (n.optional = r, this.finishNode(n, "OptionalMemberExpression")) : this.finishNode(n, "MemberExpression");
|
|
7163
7163
|
}
|
|
7164
7164
|
parseBind(t, e, s, i) {
|
|
7165
7165
|
let r = this.startNodeAt(e);
|
|
7166
|
-
return r.object = t, this.next(), r.callee = this.parseNoCallExpr(), i.stop =
|
|
7166
|
+
return r.object = t, this.next(), r.callee = this.parseNoCallExpr(), i.stop = true, this.parseSubscripts(this.finishNode(r, "BindExpression"), e, s);
|
|
7167
7167
|
}
|
|
7168
7168
|
parseCoverCallAndAsyncArrowHead(t, e, s, i) {
|
|
7169
7169
|
let r = this.state.maybeInArrowParameters,
|
|
7170
7170
|
n = null;
|
|
7171
|
-
this.state.maybeInArrowParameters =
|
|
7171
|
+
this.state.maybeInArrowParameters = true, this.next();
|
|
7172
7172
|
let o = this.startNodeAt(e);
|
|
7173
7173
|
o.callee = t;
|
|
7174
7174
|
let {
|
|
@@ -7177,14 +7177,14 @@ var rs = ps(Me => {
|
|
|
7177
7177
|
} = s;
|
|
7178
7178
|
h && (this.expressionScope.enter(Wr()), n = new ue()), l && (o.optional = i), i ? o.arguments = this.parseCallExpressionArguments(11) : o.arguments = this.parseCallExpressionArguments(11, t.type === "Import", t.type !== "Super", o, n);
|
|
7179
7179
|
let c = this.finishCallExpression(o, l);
|
|
7180
|
-
return h && this.shouldParseAsyncArrow() && !i ? (s.stop =
|
|
7180
|
+
return h && this.shouldParseAsyncArrow() && !i ? (s.stop = true, this.checkDestructuringPrivate(n), this.expressionScope.validateAsPattern(), this.expressionScope.exit(), c = this.parseAsyncArrowFromCallExpression(this.startNodeAt(e), c)) : (h && (this.checkExpressionErrors(n, true), this.expressionScope.exit()), this.toReferencedArguments(c)), this.state.maybeInArrowParameters = r, c;
|
|
7181
7181
|
}
|
|
7182
7182
|
toReferencedArguments(t, e) {
|
|
7183
7183
|
this.toReferencedListDeep(t.arguments, e);
|
|
7184
7184
|
}
|
|
7185
7185
|
parseTaggedTemplateExpression(t, e, s) {
|
|
7186
7186
|
let i = this.startNodeAt(e);
|
|
7187
|
-
return i.tag = t, i.quasi = this.parseTemplate(
|
|
7187
|
+
return i.tag = t, i.quasi = this.parseTemplate(true), s.optionalChainMember && this.raise(p.OptionalChainingNoTemplate, {
|
|
7188
7188
|
at: e
|
|
7189
7189
|
}), this.finishNode(i, "TaggedTemplateExpression");
|
|
7190
7190
|
}
|
|
@@ -7205,16 +7205,16 @@ var rs = ps(Me => {
|
|
|
7205
7205
|
}
|
|
7206
7206
|
parseCallExpressionArguments(t, e, s, i, r) {
|
|
7207
7207
|
let n = [],
|
|
7208
|
-
o =
|
|
7208
|
+
o = true,
|
|
7209
7209
|
h = this.state.inFSharpPipelineDirectBody;
|
|
7210
|
-
for (this.state.inFSharpPipelineDirectBody =
|
|
7211
|
-
if (o) o =
|
|
7210
|
+
for (this.state.inFSharpPipelineDirectBody = false; !this.eat(t);) {
|
|
7211
|
+
if (o) o = false;else if (this.expect(12), this.match(t)) {
|
|
7212
7212
|
e && !this.hasPlugin("importAttributes") && !this.hasPlugin("importAssertions") && !this.hasPlugin("moduleAttributes") && this.raise(p.ImportCallArgumentTrailingComma, {
|
|
7213
7213
|
at: this.state.lastTokStartLoc
|
|
7214
7214
|
}), i && this.addTrailingCommaExtraToNode(i), this.next();
|
|
7215
7215
|
break;
|
|
7216
7216
|
}
|
|
7217
|
-
n.push(this.parseExprListItem(
|
|
7217
|
+
n.push(this.parseExprListItem(false, r, s));
|
|
7218
7218
|
}
|
|
7219
7219
|
return this.state.inFSharpPipelineDirectBody = h, n;
|
|
7220
7220
|
}
|
|
@@ -7223,11 +7223,11 @@ var rs = ps(Me => {
|
|
|
7223
7223
|
}
|
|
7224
7224
|
parseAsyncArrowFromCallExpression(t, e) {
|
|
7225
7225
|
var s;
|
|
7226
|
-
return this.resetPreviousNodeTrailingComments(e), this.expect(19), this.parseArrowExpression(t, e.arguments,
|
|
7226
|
+
return this.resetPreviousNodeTrailingComments(e), this.expect(19), this.parseArrowExpression(t, e.arguments, true, (s = e.extra) == null ? void 0 : s.trailingCommaLoc), e.innerComments && De(t, e.innerComments), e.callee.trailingComments && De(t, e.callee.trailingComments), t;
|
|
7227
7227
|
}
|
|
7228
7228
|
parseNoCallExpr() {
|
|
7229
7229
|
let t = this.state.startLoc;
|
|
7230
|
-
return this.parseSubscripts(this.parseExprAtom(), t,
|
|
7230
|
+
return this.parseSubscripts(this.parseExprAtom(), t, true);
|
|
7231
7231
|
}
|
|
7232
7232
|
parseExprAtom(t) {
|
|
7233
7233
|
let e,
|
|
@@ -7245,7 +7245,7 @@ var rs = ps(Me => {
|
|
|
7245
7245
|
case 78:
|
|
7246
7246
|
return e = this.startNode(), this.next(), this.finishNode(e, "ThisExpression");
|
|
7247
7247
|
case 90:
|
|
7248
|
-
return this.parseDo(this.startNode(),
|
|
7248
|
+
return this.parseDo(this.startNode(), false);
|
|
7249
7249
|
case 56:
|
|
7250
7250
|
case 31:
|
|
7251
7251
|
return this.readRegexp(), this.parseRegExpLiteral(this.state.value);
|
|
@@ -7260,9 +7260,9 @@ var rs = ps(Me => {
|
|
|
7260
7260
|
case 84:
|
|
7261
7261
|
return this.parseNullLiteral();
|
|
7262
7262
|
case 85:
|
|
7263
|
-
return this.parseBooleanLiteral(
|
|
7263
|
+
return this.parseBooleanLiteral(true);
|
|
7264
7264
|
case 86:
|
|
7265
|
-
return this.parseBooleanLiteral(
|
|
7265
|
+
return this.parseBooleanLiteral(false);
|
|
7266
7266
|
case 10:
|
|
7267
7267
|
{
|
|
7268
7268
|
let r = this.state.potentialArrowAt === this.state.start;
|
|
@@ -7270,25 +7270,25 @@ var rs = ps(Me => {
|
|
|
7270
7270
|
}
|
|
7271
7271
|
case 2:
|
|
7272
7272
|
case 1:
|
|
7273
|
-
return this.parseArrayLike(this.state.type === 2 ? 4 : 3,
|
|
7273
|
+
return this.parseArrayLike(this.state.type === 2 ? 4 : 3, false, true);
|
|
7274
7274
|
case 0:
|
|
7275
|
-
return this.parseArrayLike(3,
|
|
7275
|
+
return this.parseArrayLike(3, true, false, t);
|
|
7276
7276
|
case 6:
|
|
7277
7277
|
case 7:
|
|
7278
|
-
return this.parseObjectLike(this.state.type === 6 ? 9 : 8,
|
|
7278
|
+
return this.parseObjectLike(this.state.type === 6 ? 9 : 8, false, true);
|
|
7279
7279
|
case 5:
|
|
7280
|
-
return this.parseObjectLike(8,
|
|
7280
|
+
return this.parseObjectLike(8, false, false, t);
|
|
7281
7281
|
case 68:
|
|
7282
7282
|
return this.parseFunctionOrFunctionSent();
|
|
7283
7283
|
case 26:
|
|
7284
7284
|
s = this.parseDecorators();
|
|
7285
7285
|
case 80:
|
|
7286
|
-
return this.parseClass(this.maybeTakeDecorators(s, this.startNode()),
|
|
7286
|
+
return this.parseClass(this.maybeTakeDecorators(s, this.startNode()), false);
|
|
7287
7287
|
case 77:
|
|
7288
7288
|
return this.parseNewOrNewTarget();
|
|
7289
7289
|
case 25:
|
|
7290
7290
|
case 24:
|
|
7291
|
-
return this.parseTemplate(
|
|
7291
|
+
return this.parseTemplate(false);
|
|
7292
7292
|
case 15:
|
|
7293
7293
|
{
|
|
7294
7294
|
e = this.startNode(), this.next(), e.object = null;
|
|
@@ -7337,9 +7337,9 @@ var rs = ps(Me => {
|
|
|
7337
7337
|
} = this.state;
|
|
7338
7338
|
if (h === 68) return this.resetPreviousNodeTrailingComments(o), this.next(), this.parseAsyncFunctionExpression(this.startNodeAtNode(o));
|
|
7339
7339
|
if (S(h)) return this.lookaheadCharCode() === 61 ? this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(o)) : o;
|
|
7340
|
-
if (h === 90) return this.resetPreviousNodeTrailingComments(o), this.parseDo(this.startNodeAtNode(o),
|
|
7340
|
+
if (h === 90) return this.resetPreviousNodeTrailingComments(o), this.parseDo(this.startNodeAtNode(o), true);
|
|
7341
7341
|
}
|
|
7342
|
-
return r && this.match(19) && !this.canInsertSemicolon() ? (this.next(), this.parseArrowExpression(this.startNodeAtNode(o), [o],
|
|
7342
|
+
return r && this.match(19) && !this.canInsertSemicolon() ? (this.next(), this.parseArrowExpression(this.startNodeAtNode(o), [o], false)) : o;
|
|
7343
7343
|
} else this.unexpected();
|
|
7344
7344
|
}
|
|
7345
7345
|
}
|
|
@@ -7380,11 +7380,11 @@ var rs = ps(Me => {
|
|
|
7380
7380
|
}
|
|
7381
7381
|
}
|
|
7382
7382
|
parseAsyncArrowUnaryFunction(t) {
|
|
7383
|
-
this.prodParam.enter(qe(
|
|
7383
|
+
this.prodParam.enter(qe(true, this.prodParam.hasYield));
|
|
7384
7384
|
let e = [this.parseIdentifier()];
|
|
7385
7385
|
return this.prodParam.exit(), this.hasPrecedingLineBreak() && this.raise(p.LineTerminatorBeforeArrow, {
|
|
7386
7386
|
at: this.state.curPosition()
|
|
7387
|
-
}), this.expect(19), this.parseArrowExpression(t, e,
|
|
7387
|
+
}), this.expect(19), this.parseArrowExpression(t, e, true);
|
|
7388
7388
|
}
|
|
7389
7389
|
parseDo(t, e) {
|
|
7390
7390
|
this.expectPlugin("doExpressions"), e && this.expectPlugin("asyncDoExpressions"), t.async = e, this.next();
|
|
@@ -7418,7 +7418,7 @@ var rs = ps(Me => {
|
|
|
7418
7418
|
parseMetaProperty(t, e, s) {
|
|
7419
7419
|
t.meta = e;
|
|
7420
7420
|
let i = this.state.containsEsc;
|
|
7421
|
-
return t.property = this.parseIdentifier(
|
|
7421
|
+
return t.property = this.parseIdentifier(true), (t.property.name !== s || i) && this.raise(p.UnsupportedMetaProperty, {
|
|
7422
7422
|
at: t.property,
|
|
7423
7423
|
target: e.name,
|
|
7424
7424
|
onlyValidPropertyName: s
|
|
@@ -7428,7 +7428,7 @@ var rs = ps(Me => {
|
|
|
7428
7428
|
let e = this.createIdentifier(this.startNodeAtNode(t), "import");
|
|
7429
7429
|
return this.next(), this.isContextual(100) && (this.inModule || this.raise(p.ImportMetaOutsideModule, {
|
|
7430
7430
|
at: e
|
|
7431
|
-
}), this.sawUnambiguousESM =
|
|
7431
|
+
}), this.sawUnambiguousESM = true), this.parseMetaProperty(t, e, "meta");
|
|
7432
7432
|
}
|
|
7433
7433
|
parseLiteralAtNode(t, e, s) {
|
|
7434
7434
|
return this.addExtra(s, "rawValue", t), this.addExtra(s, "raw", this.input.slice(s.start, this.state.end)), s.value = t, this.next(), this.finishNode(s, e);
|
|
@@ -7467,15 +7467,15 @@ var rs = ps(Me => {
|
|
|
7467
7467
|
this.next(), this.expressionScope.enter(Hr());
|
|
7468
7468
|
let i = this.state.maybeInArrowParameters,
|
|
7469
7469
|
r = this.state.inFSharpPipelineDirectBody;
|
|
7470
|
-
this.state.maybeInArrowParameters =
|
|
7470
|
+
this.state.maybeInArrowParameters = true, this.state.inFSharpPipelineDirectBody = false;
|
|
7471
7471
|
let n = this.state.startLoc,
|
|
7472
7472
|
o = [],
|
|
7473
7473
|
h = new ue(),
|
|
7474
|
-
l =
|
|
7474
|
+
l = true,
|
|
7475
7475
|
c,
|
|
7476
7476
|
u;
|
|
7477
7477
|
for (; !this.match(11);) {
|
|
7478
|
-
if (l) l =
|
|
7478
|
+
if (l) l = false;else if (this.expect(12, h.optionalParametersLoc === null ? null : h.optionalParametersLoc), this.match(11)) {
|
|
7479
7479
|
u = this.state.startLoc;
|
|
7480
7480
|
break;
|
|
7481
7481
|
}
|
|
@@ -7487,10 +7487,10 @@ var rs = ps(Me => {
|
|
|
7487
7487
|
let d = this.state.lastTokEndLoc;
|
|
7488
7488
|
this.expect(11), this.state.maybeInArrowParameters = i, this.state.inFSharpPipelineDirectBody = r;
|
|
7489
7489
|
let f = this.startNodeAt(e);
|
|
7490
|
-
return t && this.shouldParseArrow(o) && (f = this.parseArrow(f)) ? (this.checkDestructuringPrivate(h), this.expressionScope.validateAsPattern(), this.expressionScope.exit(), this.parseArrowExpression(f, o,
|
|
7490
|
+
return t && this.shouldParseArrow(o) && (f = this.parseArrow(f)) ? (this.checkDestructuringPrivate(h), this.expressionScope.validateAsPattern(), this.expressionScope.exit(), this.parseArrowExpression(f, o, false), f) : (this.expressionScope.exit(), o.length || this.unexpected(this.state.lastTokStartLoc), u && this.unexpected(u), c && this.unexpected(c), this.checkExpressionErrors(h, true), this.toReferencedListDeep(o, true), o.length > 1 ? (s = this.startNodeAt(n), s.expressions = o, this.finishNode(s, "SequenceExpression"), this.resetEndLocation(s, d)) : s = o[0], this.wrapParenthesis(e, s));
|
|
7491
7491
|
}
|
|
7492
7492
|
wrapParenthesis(t, e) {
|
|
7493
|
-
if (!this.options.createParenthesizedExpressions) return this.addExtra(e, "parenthesized",
|
|
7493
|
+
if (!this.options.createParenthesizedExpressions) return this.addExtra(e, "parenthesized", true), this.addExtra(e, "parenStart", t.index), this.takeSurroundingComments(e, t.index, this.state.lastTokEndLoc.index), e;
|
|
7494
7494
|
let s = this.startNodeAt(t);
|
|
7495
7495
|
return s.expression = e, this.finishNode(s, "ParenthesizedExpression");
|
|
7496
7496
|
}
|
|
@@ -7563,26 +7563,26 @@ var rs = ps(Me => {
|
|
|
7563
7563
|
parseObjectLike(t, e, s, i) {
|
|
7564
7564
|
s && this.expectPlugin("recordAndTuple");
|
|
7565
7565
|
let r = this.state.inFSharpPipelineDirectBody;
|
|
7566
|
-
this.state.inFSharpPipelineDirectBody =
|
|
7566
|
+
this.state.inFSharpPipelineDirectBody = false;
|
|
7567
7567
|
let n = Object.create(null),
|
|
7568
|
-
o =
|
|
7568
|
+
o = true,
|
|
7569
7569
|
h = this.startNode();
|
|
7570
7570
|
for (h.properties = [], this.next(); !this.match(t);) {
|
|
7571
|
-
if (o) o =
|
|
7571
|
+
if (o) o = false;else if (this.expect(12), this.match(t)) {
|
|
7572
7572
|
this.addTrailingCommaExtraToNode(h);
|
|
7573
7573
|
break;
|
|
7574
7574
|
}
|
|
7575
7575
|
let c;
|
|
7576
7576
|
e ? c = this.parseBindingProperty() : (c = this.parsePropertyDefinition(i), this.checkProto(c, s, n, i)), s && !this.isObjectProperty(c) && c.type !== "SpreadElement" && this.raise(p.InvalidRecordProperty, {
|
|
7577
7577
|
at: c
|
|
7578
|
-
}), c.shorthand && this.addExtra(c, "shorthand",
|
|
7578
|
+
}), c.shorthand && this.addExtra(c, "shorthand", true), h.properties.push(c);
|
|
7579
7579
|
}
|
|
7580
7580
|
this.next(), this.state.inFSharpPipelineDirectBody = r;
|
|
7581
7581
|
let l = "ObjectExpression";
|
|
7582
7582
|
return e ? l = "ObjectPattern" : s && (l = "RecordExpression"), this.finishNode(h, l);
|
|
7583
7583
|
}
|
|
7584
7584
|
addTrailingCommaExtraToNode(t) {
|
|
7585
|
-
this.addExtra(t, "trailingComma", this.state.lastTokStart), this.addExtra(t, "trailingCommaLoc", this.state.lastTokStartLoc,
|
|
7585
|
+
this.addExtra(t, "trailingComma", this.state.lastTokStart), this.addExtra(t, "trailingCommaLoc", this.state.lastTokStartLoc, false);
|
|
7586
7586
|
}
|
|
7587
7587
|
maybeAsyncOrAccessorProp(t) {
|
|
7588
7588
|
return !t.computed && t.key.type === "Identifier" && (this.isLiteralPropertyName() || this.match(0) || this.match(55));
|
|
@@ -7593,23 +7593,23 @@ var rs = ps(Me => {
|
|
|
7593
7593
|
at: this.state.startLoc
|
|
7594
7594
|
}); this.match(26);) e.push(this.parseDecorator());
|
|
7595
7595
|
let s = this.startNode(),
|
|
7596
|
-
i =
|
|
7597
|
-
r =
|
|
7596
|
+
i = false,
|
|
7597
|
+
r = false,
|
|
7598
7598
|
n;
|
|
7599
7599
|
if (this.match(21)) return e.length && this.unexpected(), this.parseSpread();
|
|
7600
|
-
e.length && (s.decorators = e, e = []), s.method =
|
|
7600
|
+
e.length && (s.decorators = e, e = []), s.method = false, t && (n = this.state.startLoc);
|
|
7601
7601
|
let o = this.eat(55);
|
|
7602
7602
|
this.parsePropertyNamePrefixOperator(s);
|
|
7603
7603
|
let h = this.state.containsEsc,
|
|
7604
7604
|
l = this.parsePropertyName(s, t);
|
|
7605
7605
|
if (!o && !h && this.maybeAsyncOrAccessorProp(s)) {
|
|
7606
7606
|
let c = l.name;
|
|
7607
|
-
c === "async" && !this.hasPrecedingLineBreak() && (i =
|
|
7607
|
+
c === "async" && !this.hasPrecedingLineBreak() && (i = true, this.resetPreviousNodeTrailingComments(l), o = this.eat(55), this.parsePropertyName(s)), (c === "get" || c === "set") && (r = true, this.resetPreviousNodeTrailingComments(l), s.kind = c, this.match(55) && (o = true, this.raise(p.AccessorIsGenerator, {
|
|
7608
7608
|
at: this.state.curPosition(),
|
|
7609
7609
|
kind: c
|
|
7610
7610
|
}), this.next()), this.parsePropertyName(s));
|
|
7611
7611
|
}
|
|
7612
|
-
return this.parseObjPropValue(s, n, o, i,
|
|
7612
|
+
return this.parseObjPropValue(s, n, o, i, false, r, t);
|
|
7613
7613
|
}
|
|
7614
7614
|
getGetterSetterExpectedParamCount(t) {
|
|
7615
7615
|
return t.kind === "get" ? 0 : 1;
|
|
@@ -7629,21 +7629,21 @@ var rs = ps(Me => {
|
|
|
7629
7629
|
}
|
|
7630
7630
|
parseObjectMethod(t, e, s, i, r) {
|
|
7631
7631
|
if (r) {
|
|
7632
|
-
let n = this.parseMethod(t, e,
|
|
7632
|
+
let n = this.parseMethod(t, e, false, false, false, "ObjectMethod");
|
|
7633
7633
|
return this.checkGetterSetterParams(n), n;
|
|
7634
7634
|
}
|
|
7635
|
-
if (s || e || this.match(10)) return i && this.unexpected(), t.kind = "method", t.method =
|
|
7635
|
+
if (s || e || this.match(10)) return i && this.unexpected(), t.kind = "method", t.method = true, this.parseMethod(t, e, s, false, false, "ObjectMethod");
|
|
7636
7636
|
}
|
|
7637
7637
|
parseObjectProperty(t, e, s, i) {
|
|
7638
|
-
if (t.shorthand =
|
|
7638
|
+
if (t.shorthand = false, this.eat(14)) return t.value = s ? this.parseMaybeDefault(this.state.startLoc) : this.parseMaybeAssignAllowIn(i), this.finishNode(t, "ObjectProperty");
|
|
7639
7639
|
if (!t.computed && t.key.type === "Identifier") {
|
|
7640
|
-
if (this.checkReservedWord(t.key.name, t.key.loc.start,
|
|
7640
|
+
if (this.checkReservedWord(t.key.name, t.key.loc.start, true, false), s) t.value = this.parseMaybeDefault(e, K(t.key));else if (this.match(29)) {
|
|
7641
7641
|
let r = this.state.startLoc;
|
|
7642
7642
|
i != null ? i.shorthandAssignLoc === null && (i.shorthandAssignLoc = r) : this.raise(p.InvalidCoverInitializedName, {
|
|
7643
7643
|
at: r
|
|
7644
7644
|
}), t.value = this.parseMaybeDefault(e, K(t.key));
|
|
7645
7645
|
} else t.value = K(t.key);
|
|
7646
|
-
return t.shorthand =
|
|
7646
|
+
return t.shorthand = true, this.finishNode(t, "ObjectProperty");
|
|
7647
7647
|
}
|
|
7648
7648
|
}
|
|
7649
7649
|
parseObjPropValue(t, e, s, i, r, n, o) {
|
|
@@ -7651,13 +7651,13 @@ var rs = ps(Me => {
|
|
|
7651
7651
|
return h || this.unexpected(), h;
|
|
7652
7652
|
}
|
|
7653
7653
|
parsePropertyName(t, e) {
|
|
7654
|
-
if (this.eat(0)) t.computed =
|
|
7654
|
+
if (this.eat(0)) t.computed = true, t.key = this.parseMaybeAssignAllowIn(), this.expect(3);else {
|
|
7655
7655
|
let {
|
|
7656
7656
|
type: s,
|
|
7657
7657
|
value: i
|
|
7658
7658
|
} = this.state,
|
|
7659
7659
|
r;
|
|
7660
|
-
if (M(s)) r = this.parseIdentifier(
|
|
7660
|
+
if (M(s)) r = this.parseIdentifier(true);else switch (s) {
|
|
7661
7661
|
case 132:
|
|
7662
7662
|
r = this.parseNumericLiteral(i);
|
|
7663
7663
|
break;
|
|
@@ -7681,44 +7681,44 @@ var rs = ps(Me => {
|
|
|
7681
7681
|
default:
|
|
7682
7682
|
this.unexpected();
|
|
7683
7683
|
}
|
|
7684
|
-
t.key = r, s !== 136 && (t.computed =
|
|
7684
|
+
t.key = r, s !== 136 && (t.computed = false);
|
|
7685
7685
|
}
|
|
7686
7686
|
return t.key;
|
|
7687
7687
|
}
|
|
7688
7688
|
initFunction(t, e) {
|
|
7689
|
-
t.id = null, t.generator =
|
|
7689
|
+
t.id = null, t.generator = false, t.async = e;
|
|
7690
7690
|
}
|
|
7691
|
-
parseMethod(t, e, s, i, r, n, o =
|
|
7691
|
+
parseMethod(t, e, s, i, r, n, o = false) {
|
|
7692
7692
|
this.initFunction(t, s), t.generator = e, this.scope.enter(z | Xe | (o ? ee : 0) | (r ? _s : 0)), this.prodParam.enter(qe(s, t.generator)), this.parseFunctionParams(t, i);
|
|
7693
|
-
let h = this.parseFunctionBodyAndFinish(t, n,
|
|
7693
|
+
let h = this.parseFunctionBodyAndFinish(t, n, true);
|
|
7694
7694
|
return this.prodParam.exit(), this.scope.exit(), h;
|
|
7695
7695
|
}
|
|
7696
7696
|
parseArrayLike(t, e, s, i) {
|
|
7697
7697
|
s && this.expectPlugin("recordAndTuple");
|
|
7698
7698
|
let r = this.state.inFSharpPipelineDirectBody;
|
|
7699
|
-
this.state.inFSharpPipelineDirectBody =
|
|
7699
|
+
this.state.inFSharpPipelineDirectBody = false;
|
|
7700
7700
|
let n = this.startNode();
|
|
7701
7701
|
return this.next(), n.elements = this.parseExprList(t, !s, i, n), this.state.inFSharpPipelineDirectBody = r, this.finishNode(n, s ? "TupleExpression" : "ArrayExpression");
|
|
7702
7702
|
}
|
|
7703
7703
|
parseArrowExpression(t, e, s, i) {
|
|
7704
7704
|
this.scope.enter(z | Qt);
|
|
7705
|
-
let r = qe(s,
|
|
7705
|
+
let r = qe(s, false);
|
|
7706
7706
|
!this.match(5) && this.prodParam.hasIn && (r |= re), this.prodParam.enter(r), this.initFunction(t, s);
|
|
7707
7707
|
let n = this.state.maybeInArrowParameters;
|
|
7708
|
-
return e && (this.state.maybeInArrowParameters =
|
|
7708
|
+
return e && (this.state.maybeInArrowParameters = true, this.setArrowFunctionParameters(t, e, i)), this.state.maybeInArrowParameters = false, this.parseFunctionBody(t, true), this.prodParam.exit(), this.scope.exit(), this.state.maybeInArrowParameters = n, this.finishNode(t, "ArrowFunctionExpression");
|
|
7709
7709
|
}
|
|
7710
7710
|
setArrowFunctionParameters(t, e, s) {
|
|
7711
|
-
this.toAssignableList(e, s,
|
|
7711
|
+
this.toAssignableList(e, s, false), t.params = e;
|
|
7712
7712
|
}
|
|
7713
|
-
parseFunctionBodyAndFinish(t, e, s =
|
|
7714
|
-
return this.parseFunctionBody(t,
|
|
7713
|
+
parseFunctionBodyAndFinish(t, e, s = false) {
|
|
7714
|
+
return this.parseFunctionBody(t, false, s), this.finishNode(t, e);
|
|
7715
7715
|
}
|
|
7716
|
-
parseFunctionBody(t, e, s =
|
|
7716
|
+
parseFunctionBody(t, e, s = false) {
|
|
7717
7717
|
let i = e && !this.match(5);
|
|
7718
|
-
if (this.expressionScope.enter(Xs()), i) t.body = this.parseMaybeAssign(), this.checkParams(t,
|
|
7718
|
+
if (this.expressionScope.enter(Xs()), i) t.body = this.parseMaybeAssign(), this.checkParams(t, false, e, false);else {
|
|
7719
7719
|
let r = this.state.strict,
|
|
7720
7720
|
n = this.state.labels;
|
|
7721
|
-
this.state.labels = [], this.prodParam.enter(this.prodParam.currentFlags() | Ys), t.body = this.parseBlock(
|
|
7721
|
+
this.state.labels = [], this.prodParam.enter(this.prodParam.currentFlags() | Ys), t.body = this.parseBlock(true, false, o => {
|
|
7722
7722
|
let h = !this.isSimpleParamList(t.params);
|
|
7723
7723
|
o && h && this.raise(p.IllegalLanguageModeDirective, {
|
|
7724
7724
|
at: (t.kind === "method" || t.kind === "constructor") && t.key ? t.key.loc.end : t
|
|
@@ -7733,10 +7733,10 @@ var rs = ps(Me => {
|
|
|
7733
7733
|
return t.type === "Identifier";
|
|
7734
7734
|
}
|
|
7735
7735
|
isSimpleParamList(t) {
|
|
7736
|
-
for (let e = 0, s = t.length; e < s; e++) if (!this.isSimpleParameter(t[e])) return
|
|
7737
|
-
return
|
|
7736
|
+
for (let e = 0, s = t.length; e < s; e++) if (!this.isSimpleParameter(t[e])) return false;
|
|
7737
|
+
return true;
|
|
7738
7738
|
}
|
|
7739
|
-
checkParams(t, e, s, i =
|
|
7739
|
+
checkParams(t, e, s, i = true) {
|
|
7740
7740
|
let r = !e && new Set(),
|
|
7741
7741
|
n = {
|
|
7742
7742
|
type: "FormalParameters"
|
|
@@ -7750,9 +7750,9 @@ var rs = ps(Me => {
|
|
|
7750
7750
|
}
|
|
7751
7751
|
parseExprList(t, e, s, i) {
|
|
7752
7752
|
let r = [],
|
|
7753
|
-
n =
|
|
7753
|
+
n = true;
|
|
7754
7754
|
for (; !this.eat(t);) {
|
|
7755
|
-
if (n) n =
|
|
7755
|
+
if (n) n = false;else if (this.expect(12), this.match(t)) {
|
|
7756
7756
|
i && this.addTrailingCommaExtraToNode(i), this.next();
|
|
7757
7757
|
break;
|
|
7758
7758
|
}
|
|
@@ -7793,7 +7793,7 @@ var rs = ps(Me => {
|
|
|
7793
7793
|
} = this.state;
|
|
7794
7794
|
M(i) ? e = this.state.value : this.unexpected();
|
|
7795
7795
|
let r = ar(i);
|
|
7796
|
-
return t ? r && this.replaceToken(130) : this.checkReservedWord(e, s, r,
|
|
7796
|
+
return t ? r && this.replaceToken(130) : this.checkReservedWord(e, s, r, false), this.next(), e;
|
|
7797
7797
|
}
|
|
7798
7798
|
checkReservedWord(t, e, s, i) {
|
|
7799
7799
|
if (t.length > 10 || !Er(t)) return;
|
|
@@ -7849,10 +7849,10 @@ var rs = ps(Me => {
|
|
|
7849
7849
|
at: e
|
|
7850
7850
|
}), this.eat(55) && this.raise(p.ObsoleteAwaitStar, {
|
|
7851
7851
|
at: e
|
|
7852
|
-
}), !this.scope.inFunction && !this.options.allowAwaitOutsideFunction && (this.isAmbiguousAwait() ? this.ambiguousScriptDifferentAst =
|
|
7852
|
+
}), !this.scope.inFunction && !this.options.allowAwaitOutsideFunction && (this.isAmbiguousAwait() ? this.ambiguousScriptDifferentAst = true : this.sawUnambiguousESM = true), this.state.soloAwait || (e.argument = this.parseMaybeUnary(null, true)), this.finishNode(e, "AwaitExpression");
|
|
7853
7853
|
}
|
|
7854
7854
|
isAmbiguousAwait() {
|
|
7855
|
-
if (this.hasPrecedingLineBreak()) return
|
|
7855
|
+
if (this.hasPrecedingLineBreak()) return true;
|
|
7856
7856
|
let {
|
|
7857
7857
|
type: t
|
|
7858
7858
|
} = this.state;
|
|
@@ -7863,7 +7863,7 @@ var rs = ps(Me => {
|
|
|
7863
7863
|
this.expressionScope.recordParameterInitializerError(p.YieldInParameter, {
|
|
7864
7864
|
at: t
|
|
7865
7865
|
}), this.next();
|
|
7866
|
-
let e =
|
|
7866
|
+
let e = false,
|
|
7867
7867
|
s = null;
|
|
7868
7868
|
if (!this.hasPrecedingLineBreak()) switch (e = this.eat(55), this.state.type) {
|
|
7869
7869
|
case 13:
|
|
@@ -7901,9 +7901,9 @@ var rs = ps(Me => {
|
|
|
7901
7901
|
case "MemberExpression":
|
|
7902
7902
|
return !t.computed && this.isSimpleReference(t.object);
|
|
7903
7903
|
case "Identifier":
|
|
7904
|
-
return
|
|
7904
|
+
return true;
|
|
7905
7905
|
default:
|
|
7906
|
-
return
|
|
7906
|
+
return false;
|
|
7907
7907
|
}
|
|
7908
7908
|
}
|
|
7909
7909
|
checkSmartPipeTopicBodyEarlyErrors(t) {
|
|
@@ -7944,7 +7944,7 @@ var rs = ps(Me => {
|
|
|
7944
7944
|
}
|
|
7945
7945
|
withSoloAwaitPermittingContext(t) {
|
|
7946
7946
|
let e = this.state.soloAwait;
|
|
7947
|
-
this.state.soloAwait =
|
|
7947
|
+
this.state.soloAwait = true;
|
|
7948
7948
|
try {
|
|
7949
7949
|
return t();
|
|
7950
7950
|
} finally {
|
|
@@ -7966,7 +7966,7 @@ var rs = ps(Me => {
|
|
|
7966
7966
|
disallowInAnd(t) {
|
|
7967
7967
|
let e = this.prodParam.currentFlags();
|
|
7968
7968
|
if (re & e) {
|
|
7969
|
-
this.prodParam.enter(e &
|
|
7969
|
+
this.prodParam.enter(e & -9);
|
|
7970
7970
|
try {
|
|
7971
7971
|
return t();
|
|
7972
7972
|
} finally {
|
|
@@ -7988,7 +7988,7 @@ var rs = ps(Me => {
|
|
|
7988
7988
|
let e = this.state.startLoc;
|
|
7989
7989
|
this.state.potentialArrowAt = this.state.start;
|
|
7990
7990
|
let s = this.state.inFSharpPipelineDirectBody;
|
|
7991
|
-
this.state.inFSharpPipelineDirectBody =
|
|
7991
|
+
this.state.inFSharpPipelineDirectBody = true;
|
|
7992
7992
|
let i = this.parseExprOp(this.parseMaybeUnaryOrPrivate(), e, t);
|
|
7993
7993
|
return this.state.inFSharpPipelineDirectBody = s, i;
|
|
7994
7994
|
}
|
|
@@ -7998,7 +7998,7 @@ var rs = ps(Me => {
|
|
|
7998
7998
|
this.next(), this.match(5) || this.unexpected(null, 5);
|
|
7999
7999
|
let e = this.startNodeAt(this.state.endLoc);
|
|
8000
8000
|
this.next();
|
|
8001
|
-
let s = this.initializeScopes(
|
|
8001
|
+
let s = this.initializeScopes(true);
|
|
8002
8002
|
this.enterInitialScopes();
|
|
8003
8003
|
try {
|
|
8004
8004
|
t.body = this.parseProgram(e, 8, "module");
|
|
@@ -8112,7 +8112,7 @@ var rs = ps(Me => {
|
|
|
8112
8112
|
return t.program = this.parseProgram(e), t.comments = this.state.comments, this.options.tokens && (t.tokens = Ta(this.tokens, this.input)), this.finishNode(t, "File");
|
|
8113
8113
|
}
|
|
8114
8114
|
parseProgram(t, e = 137, s = this.options.sourceType) {
|
|
8115
|
-
if (t.sourceType = s, t.interpreter = this.parseInterpreterDirective(), this.parseBlockBody(t,
|
|
8115
|
+
if (t.sourceType = s, t.interpreter = this.parseInterpreterDirective(), this.parseBlockBody(t, true, true, e), this.inModule && !this.options.allowUndeclaredExports && this.scope.undefinedExports.size > 0) for (let [r, n] of Array.from(this.scope.undefinedExports)) this.raise(p.ModuleExportUndefined, {
|
|
8116
8116
|
at: n,
|
|
8117
8117
|
localName: r
|
|
8118
8118
|
});
|
|
@@ -8134,15 +8134,15 @@ var rs = ps(Me => {
|
|
|
8134
8134
|
return t.value = this.state.value, this.next(), this.finishNode(t, "InterpreterDirective");
|
|
8135
8135
|
}
|
|
8136
8136
|
isLet() {
|
|
8137
|
-
return this.isContextual(99) ? this.hasFollowingBindingAtom() :
|
|
8137
|
+
return this.isContextual(99) ? this.hasFollowingBindingAtom() : false;
|
|
8138
8138
|
}
|
|
8139
8139
|
chStartsBindingIdentifier(t, e) {
|
|
8140
8140
|
if ($(t)) {
|
|
8141
8141
|
if (xt.lastIndex = e, xt.test(this.input)) {
|
|
8142
8142
|
let s = this.codePointAtPos(xt.lastIndex);
|
|
8143
|
-
if (!he(s) && s !== 92) return
|
|
8143
|
+
if (!he(s) && s !== 92) return false;
|
|
8144
8144
|
}
|
|
8145
|
-
return
|
|
8145
|
+
return true;
|
|
8146
8146
|
} else return t === 92;
|
|
8147
8147
|
}
|
|
8148
8148
|
chStartsBindingPattern(t) {
|
|
@@ -8163,17 +8163,17 @@ var rs = ps(Me => {
|
|
|
8163
8163
|
type: t,
|
|
8164
8164
|
containsEsc: e
|
|
8165
8165
|
} = this.lookahead();
|
|
8166
|
-
if (t === 101 && !e) return
|
|
8167
|
-
if (S(t) && !this.hasFollowingLineBreak()) return this.expectPlugin("explicitResourceManagement"),
|
|
8166
|
+
if (t === 101 && !e) return false;
|
|
8167
|
+
if (S(t) && !this.hasFollowingLineBreak()) return this.expectPlugin("explicitResourceManagement"), true;
|
|
8168
8168
|
}
|
|
8169
8169
|
startsAwaitUsing() {
|
|
8170
8170
|
let t = this.nextTokenInLineStart();
|
|
8171
8171
|
if (this.isUnparsedContextual(t, "using")) {
|
|
8172
8172
|
t = this.nextTokenInLineStartSince(t + 5);
|
|
8173
8173
|
let e = this.codePointAtPos(t);
|
|
8174
|
-
if (this.chStartsBindingIdentifier(e, t)) return this.expectPlugin("explicitResourceManagement"),
|
|
8174
|
+
if (this.chStartsBindingIdentifier(e, t)) return this.expectPlugin("explicitResourceManagement"), true;
|
|
8175
8175
|
}
|
|
8176
|
-
return
|
|
8176
|
+
return false;
|
|
8177
8177
|
}
|
|
8178
8178
|
parseModuleItem() {
|
|
8179
8179
|
return this.parseStatementLike(15);
|
|
@@ -8181,7 +8181,7 @@ var rs = ps(Me => {
|
|
|
8181
8181
|
parseStatementListItem() {
|
|
8182
8182
|
return this.parseStatementLike(6 | (!this.options.annexB || this.state.strict ? 0 : 8));
|
|
8183
8183
|
}
|
|
8184
|
-
parseStatementOrSloppyAnnexBFunctionDeclaration(t =
|
|
8184
|
+
parseStatementOrSloppyAnnexBFunctionDeclaration(t = false) {
|
|
8185
8185
|
let e = 0;
|
|
8186
8186
|
return this.options.annexB && !this.state.strict && (e |= 4, t && (e |= 8)), this.parseStatementLike(e);
|
|
8187
8187
|
}
|
|
@@ -8190,7 +8190,7 @@ var rs = ps(Me => {
|
|
|
8190
8190
|
}
|
|
8191
8191
|
parseStatementLike(t) {
|
|
8192
8192
|
let e = null;
|
|
8193
|
-
return this.match(26) && (e = this.parseDecorators(
|
|
8193
|
+
return this.match(26) && (e = this.parseDecorators(true)), this.parseStatementContent(t, e);
|
|
8194
8194
|
}
|
|
8195
8195
|
parseStatementContent(t, e) {
|
|
8196
8196
|
let s = this.state.type,
|
|
@@ -8200,9 +8200,9 @@ var rs = ps(Me => {
|
|
|
8200
8200
|
o = t & 1;
|
|
8201
8201
|
switch (s) {
|
|
8202
8202
|
case 60:
|
|
8203
|
-
return this.parseBreakContinueStatement(i,
|
|
8203
|
+
return this.parseBreakContinueStatement(i, true);
|
|
8204
8204
|
case 63:
|
|
8205
|
-
return this.parseBreakContinueStatement(i,
|
|
8205
|
+
return this.parseBreakContinueStatement(i, false);
|
|
8206
8206
|
case 64:
|
|
8207
8207
|
return this.parseDebuggerStatement(i);
|
|
8208
8208
|
case 90:
|
|
@@ -8213,9 +8213,9 @@ var rs = ps(Me => {
|
|
|
8213
8213
|
if (this.lookaheadCharCode() === 46) break;
|
|
8214
8214
|
return n || this.raise(this.state.strict ? p.StrictFunction : this.options.annexB ? p.SloppyFunctionAnnexB : p.SloppyFunction, {
|
|
8215
8215
|
at: this.state.startLoc
|
|
8216
|
-
}), this.parseFunctionStatement(i,
|
|
8216
|
+
}), this.parseFunctionStatement(i, false, !r && n);
|
|
8217
8217
|
case 80:
|
|
8218
|
-
return r || this.unexpected(), this.parseClass(this.maybeTakeDecorators(e, i),
|
|
8218
|
+
return r || this.unexpected(), this.parseClass(this.maybeTakeDecorators(e, i), true);
|
|
8219
8219
|
case 69:
|
|
8220
8220
|
return this.parseIfStatement(i);
|
|
8221
8221
|
case 70:
|
|
@@ -8275,12 +8275,12 @@ var rs = ps(Me => {
|
|
|
8275
8275
|
at: this.state.startLoc
|
|
8276
8276
|
}), this.next();
|
|
8277
8277
|
let c;
|
|
8278
|
-
return s === 83 ? (c = this.parseImport(i), c.type === "ImportDeclaration" && (!c.importKind || c.importKind === "value") && (this.sawUnambiguousESM =
|
|
8278
|
+
return s === 83 ? (c = this.parseImport(i), c.type === "ImportDeclaration" && (!c.importKind || c.importKind === "value") && (this.sawUnambiguousESM = true)) : (c = this.parseExport(i, e), (c.type === "ExportNamedDeclaration" && (!c.exportKind || c.exportKind === "value") || c.type === "ExportAllDeclaration" && (!c.exportKind || c.exportKind === "value") || c.type === "ExportDefaultDeclaration") && (this.sawUnambiguousESM = true)), this.assertModuleNodeAllowed(c), c;
|
|
8279
8279
|
}
|
|
8280
8280
|
default:
|
|
8281
8281
|
if (this.isAsyncFunction()) return r || this.raise(p.AsyncFunctionInSingleStatementContext, {
|
|
8282
8282
|
at: this.state.startLoc
|
|
8283
|
-
}), this.next(), this.parseFunctionStatement(i,
|
|
8283
|
+
}), this.next(), this.parseFunctionStatement(i, true, !r && n);
|
|
8284
8284
|
}
|
|
8285
8285
|
let h = this.state.value,
|
|
8286
8286
|
l = this.parseExpression();
|
|
@@ -8292,7 +8292,7 @@ var rs = ps(Me => {
|
|
|
8292
8292
|
});
|
|
8293
8293
|
}
|
|
8294
8294
|
decoratorsEnabledBeforeExport() {
|
|
8295
|
-
return this.hasPlugin("decorators-legacy") ?
|
|
8295
|
+
return this.hasPlugin("decorators-legacy") ? true : this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport") !== false;
|
|
8296
8296
|
}
|
|
8297
8297
|
maybeTakeDecorators(t, e, s) {
|
|
8298
8298
|
return t && (e.decorators && e.decorators.length > 0 ? (typeof this.getPluginOption("decorators", "decoratorsBeforeExport") != "boolean" && this.raise(p.DecoratorsBeforeAfterExport, {
|
|
@@ -8322,13 +8322,13 @@ var rs = ps(Me => {
|
|
|
8322
8322
|
let i = this.state.startLoc;
|
|
8323
8323
|
this.next(), s = this.parseExpression(), this.expect(11), s = this.wrapParenthesis(i, s);
|
|
8324
8324
|
let r = this.state.startLoc;
|
|
8325
|
-
t.expression = this.parseMaybeDecoratorArguments(s), this.getPluginOption("decorators", "allowCallParenthesized") ===
|
|
8325
|
+
t.expression = this.parseMaybeDecoratorArguments(s), this.getPluginOption("decorators", "allowCallParenthesized") === false && t.expression !== s && this.raise(p.DecoratorArgumentsOutsideParentheses, {
|
|
8326
8326
|
at: r
|
|
8327
8327
|
});
|
|
8328
8328
|
} else {
|
|
8329
|
-
for (s = this.parseIdentifier(
|
|
8329
|
+
for (s = this.parseIdentifier(false); this.eat(16);) {
|
|
8330
8330
|
let i = this.startNodeAt(e);
|
|
8331
|
-
i.object = s, this.match(136) ? (this.classScope.usePrivateName(this.state.value, this.state.startLoc), i.property = this.parsePrivateName()) : i.property = this.parseIdentifier(
|
|
8331
|
+
i.object = s, this.match(136) ? (this.classScope.usePrivateName(this.state.value, this.state.startLoc), i.property = this.parsePrivateName()) : i.property = this.parseIdentifier(true), i.computed = false, s = this.finishNode(i, "MemberExpression");
|
|
8332
8332
|
}
|
|
8333
8333
|
t.expression = this.parseMaybeDecoratorArguments(s);
|
|
8334
8334
|
}
|
|
@@ -8338,7 +8338,7 @@ var rs = ps(Me => {
|
|
|
8338
8338
|
parseMaybeDecoratorArguments(t) {
|
|
8339
8339
|
if (this.eat(10)) {
|
|
8340
8340
|
let e = this.startNodeAtNode(t);
|
|
8341
|
-
return e.callee = t, e.arguments = this.parseCallExpressionArguments(11,
|
|
8341
|
+
return e.callee = t, e.arguments = this.parseCallExpressionArguments(11, false), this.toReferencedList(e.arguments), this.finishNode(e, "CallExpression");
|
|
8342
8342
|
}
|
|
8343
8343
|
return t;
|
|
8344
8344
|
}
|
|
@@ -8384,7 +8384,7 @@ var rs = ps(Me => {
|
|
|
8384
8384
|
d;
|
|
8385
8385
|
h ? (d = "await using", this.isAwaitAllowed() || this.raise(p.AwaitUsingNotInAsyncContext, {
|
|
8386
8386
|
at: this.state.startLoc
|
|
8387
|
-
}), this.next()) : d = this.state.value, this.next(), this.parseVar(u,
|
|
8387
|
+
}), this.next()) : d = this.state.value, this.next(), this.parseVar(u, true, d);
|
|
8388
8388
|
let f = this.finishNode(u, "VariableDeclaration"),
|
|
8389
8389
|
x = this.match(58);
|
|
8390
8390
|
return x && l && this.raise(p.ForInUsing, {
|
|
@@ -8394,21 +8394,21 @@ var rs = ps(Me => {
|
|
|
8394
8394
|
}
|
|
8395
8395
|
let i = this.isContextual(95),
|
|
8396
8396
|
r = new ue(),
|
|
8397
|
-
n = this.parseExpression(
|
|
8397
|
+
n = this.parseExpression(true, r),
|
|
8398
8398
|
o = this.isContextual(101);
|
|
8399
8399
|
if (o && (s && this.raise(p.ForOfLet, {
|
|
8400
8400
|
at: n
|
|
8401
8401
|
}), e === null && i && n.type === "Identifier" && this.raise(p.ForOfAsync, {
|
|
8402
8402
|
at: n
|
|
8403
8403
|
})), o || this.match(58)) {
|
|
8404
|
-
this.checkDestructuringPrivate(r), this.toAssignable(n,
|
|
8404
|
+
this.checkDestructuringPrivate(r), this.toAssignable(n, true);
|
|
8405
8405
|
let h = o ? "ForOfStatement" : "ForInStatement";
|
|
8406
8406
|
return this.checkLVal(n, {
|
|
8407
8407
|
in: {
|
|
8408
8408
|
type: h
|
|
8409
8409
|
}
|
|
8410
8410
|
}), this.parseForIn(t, n, e);
|
|
8411
|
-
} else this.checkExpressionErrors(r,
|
|
8411
|
+
} else this.checkExpressionErrors(r, true);
|
|
8412
8412
|
return e !== null && this.unexpected(e), this.parseFor(t, n);
|
|
8413
8413
|
}
|
|
8414
8414
|
parseFunctionStatement(t, e, s) {
|
|
@@ -8431,7 +8431,7 @@ var rs = ps(Me => {
|
|
|
8431
8431
|
let r = this.match(61);
|
|
8432
8432
|
s && this.finishNode(s, "SwitchCase"), e.push(s = this.startNode()), s.consequent = [], this.next(), r ? s.test = this.parseExpression() : (i && this.raise(p.MultipleDefaultsInSwitch, {
|
|
8433
8433
|
at: this.state.lastTokStartLoc
|
|
8434
|
-
}), i =
|
|
8434
|
+
}), i = true, s.test = null), this.expect(14);
|
|
8435
8435
|
} else s ? s.consequent.push(this.parseStatementListItem()) : this.unexpected();
|
|
8436
8436
|
return this.scope.exit(), s && this.finishNode(s, "SwitchCase"), this.next(), this.state.labels.pop(), this.finishNode(t, "SwitchStatement");
|
|
8437
8437
|
}
|
|
@@ -8452,14 +8452,14 @@ var rs = ps(Me => {
|
|
|
8452
8452
|
parseTryStatement(t) {
|
|
8453
8453
|
if (this.next(), t.block = this.parseBlock(), t.handler = null, this.match(62)) {
|
|
8454
8454
|
let e = this.startNode();
|
|
8455
|
-
this.next(), this.match(10) ? (this.expect(10), e.param = this.parseCatchClauseParam(), this.expect(11)) : (e.param = null, this.scope.enter(ae)), e.body = this.withSmartMixTopicForbiddingContext(() => this.parseBlock(
|
|
8455
|
+
this.next(), this.match(10) ? (this.expect(10), e.param = this.parseCatchClauseParam(), this.expect(11)) : (e.param = null, this.scope.enter(ae)), e.body = this.withSmartMixTopicForbiddingContext(() => this.parseBlock(false, false)), this.scope.exit(), t.handler = this.finishNode(e, "CatchClause");
|
|
8456
8456
|
}
|
|
8457
8457
|
return t.finalizer = this.eat(67) ? this.parseBlock() : null, !t.handler && !t.finalizer && this.raise(p.NoCatchOrFinally, {
|
|
8458
8458
|
at: t
|
|
8459
8459
|
}), this.finishNode(t, "TryStatement");
|
|
8460
8460
|
}
|
|
8461
|
-
parseVarStatement(t, e, s =
|
|
8462
|
-
return this.next(), this.parseVar(t,
|
|
8461
|
+
parseVarStatement(t, e, s = false) {
|
|
8462
|
+
return this.next(), this.parseVar(t, false, e, s), this.semicolon(), this.finishNode(t, "VariableDeclaration");
|
|
8463
8463
|
}
|
|
8464
8464
|
parseWhileStatement(t) {
|
|
8465
8465
|
return this.next(), t.test = this.parseHeaderExpression(), this.state.labels.push(yt), t.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()), this.state.labels.pop(), this.finishNode(t, "WhileStatement");
|
|
@@ -8486,14 +8486,14 @@ var rs = ps(Me => {
|
|
|
8486
8486
|
name: e,
|
|
8487
8487
|
kind: r,
|
|
8488
8488
|
statementStart: this.state.start
|
|
8489
|
-
}), t.body = i & 8 ? this.parseStatementOrSloppyAnnexBFunctionDeclaration(
|
|
8489
|
+
}), t.body = i & 8 ? this.parseStatementOrSloppyAnnexBFunctionDeclaration(true) : this.parseStatement(), this.state.labels.pop(), t.label = s, this.finishNode(t, "LabeledStatement");
|
|
8490
8490
|
}
|
|
8491
8491
|
parseExpressionStatement(t, e, s) {
|
|
8492
8492
|
return t.expression = e, this.semicolon(), this.finishNode(t, "ExpressionStatement");
|
|
8493
8493
|
}
|
|
8494
|
-
parseBlock(t =
|
|
8494
|
+
parseBlock(t = false, e = true, s) {
|
|
8495
8495
|
let i = this.startNode();
|
|
8496
|
-
return t && this.state.strictErrors.clear(), this.expect(5), e && this.scope.enter(ae), this.parseBlockBody(i, t,
|
|
8496
|
+
return t && this.state.strictErrors.clear(), this.expect(5), e && this.scope.enter(ae), this.parseBlockBody(i, t, false, 8, s), e && this.scope.exit(), this.finishNode(i, "BlockStatement");
|
|
8497
8497
|
}
|
|
8498
8498
|
isValidDirective(t) {
|
|
8499
8499
|
return t.type === "ExpressionStatement" && t.expression.type === "StringLiteral" && !t.expression.extra.parenthesized;
|
|
@@ -8505,24 +8505,24 @@ var rs = ps(Me => {
|
|
|
8505
8505
|
}
|
|
8506
8506
|
parseBlockOrModuleBlockBody(t, e, s, i, r) {
|
|
8507
8507
|
let n = this.state.strict,
|
|
8508
|
-
o =
|
|
8509
|
-
h =
|
|
8508
|
+
o = false,
|
|
8509
|
+
h = false;
|
|
8510
8510
|
for (; !this.match(i);) {
|
|
8511
8511
|
let l = s ? this.parseModuleItem() : this.parseStatementListItem();
|
|
8512
8512
|
if (e && !h) {
|
|
8513
8513
|
if (this.isValidDirective(l)) {
|
|
8514
8514
|
let c = this.stmtToDirective(l);
|
|
8515
|
-
e.push(c), !o && c.value.value === "use strict" && (o =
|
|
8515
|
+
e.push(c), !o && c.value.value === "use strict" && (o = true, this.setStrict(true));
|
|
8516
8516
|
continue;
|
|
8517
8517
|
}
|
|
8518
|
-
h =
|
|
8518
|
+
h = true, this.state.strictErrors.clear();
|
|
8519
8519
|
}
|
|
8520
8520
|
t.push(l);
|
|
8521
8521
|
}
|
|
8522
|
-
r && r.call(this, o), n || this.setStrict(
|
|
8522
|
+
r && r.call(this, o), n || this.setStrict(false), this.next();
|
|
8523
8523
|
}
|
|
8524
8524
|
parseFor(t, e) {
|
|
8525
|
-
return t.init = e, this.semicolon(
|
|
8525
|
+
return t.init = e, this.semicolon(false), t.test = this.match(13) ? null : this.parseExpression(), this.semicolon(false), t.update = this.match(11) ? null : this.parseExpression(), this.expect(11), t.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()), this.scope.exit(), this.state.labels.pop(), this.finishNode(t, "ForStatement");
|
|
8526
8526
|
}
|
|
8527
8527
|
parseForIn(t, e, s) {
|
|
8528
8528
|
let i = this.match(58);
|
|
@@ -8536,7 +8536,7 @@ var rs = ps(Me => {
|
|
|
8536
8536
|
}
|
|
8537
8537
|
}), t.left = e, t.right = i ? this.parseExpression() : this.parseMaybeAssignAllowIn(), this.expect(11), t.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()), this.scope.exit(), this.state.labels.pop(), this.finishNode(t, i ? "ForInStatement" : "ForOfStatement");
|
|
8538
8538
|
}
|
|
8539
|
-
parseVar(t, e, s, i =
|
|
8539
|
+
parseVar(t, e, s, i = false) {
|
|
8540
8540
|
let r = t.declarations = [];
|
|
8541
8541
|
for (t.kind = s;;) {
|
|
8542
8542
|
let n = this.startNode();
|
|
@@ -8569,9 +8569,9 @@ var rs = ps(Me => {
|
|
|
8569
8569
|
n = !!(e & 8);
|
|
8570
8570
|
this.initFunction(t, n), this.match(55) && (s && this.raise(p.GeneratorInSingleStatementContext, {
|
|
8571
8571
|
at: this.state.startLoc
|
|
8572
|
-
}), this.next(), t.generator =
|
|
8572
|
+
}), this.next(), t.generator = true), i && (t.id = this.parseFunctionId(r));
|
|
8573
8573
|
let o = this.state.maybeInArrowParameters;
|
|
8574
|
-
return this.state.maybeInArrowParameters =
|
|
8574
|
+
return this.state.maybeInArrowParameters = false, this.scope.enter(z), this.prodParam.enter(qe(n, t.generator)), i || (t.id = this.parseFunctionId()), this.parseFunctionParams(t, false), this.withSmartMixTopicForbiddingContext(() => {
|
|
8575
8575
|
this.parseFunctionBodyAndFinish(t, i ? "FunctionDeclaration" : "FunctionExpression");
|
|
8576
8576
|
}), this.prodParam.exit(), this.scope.exit(), i && !s && this.registerFunctionStatementId(t), this.state.maybeInArrowParameters = o, t;
|
|
8577
8577
|
}
|
|
@@ -8587,7 +8587,7 @@ var rs = ps(Me => {
|
|
|
8587
8587
|
parseClass(t, e, s) {
|
|
8588
8588
|
this.next();
|
|
8589
8589
|
let i = this.state.strict;
|
|
8590
|
-
return this.state.strict =
|
|
8590
|
+
return this.state.strict = true, this.parseClassId(t, e, s), this.parseClassSuper(t), t.body = this.parseClassBody(!!t.superClass, i), this.finishNode(t, e ? "ClassDeclaration" : "ClassExpression");
|
|
8591
8591
|
}
|
|
8592
8592
|
isClassProperty() {
|
|
8593
8593
|
return this.match(29) || this.match(13) || this.match(8);
|
|
@@ -8601,7 +8601,7 @@ var rs = ps(Me => {
|
|
|
8601
8601
|
parseClassBody(t, e) {
|
|
8602
8602
|
this.classScope.enter();
|
|
8603
8603
|
let s = {
|
|
8604
|
-
hadConstructor:
|
|
8604
|
+
hadConstructor: false,
|
|
8605
8605
|
hadSuperClass: t
|
|
8606
8606
|
},
|
|
8607
8607
|
i = [],
|
|
@@ -8629,15 +8629,15 @@ var rs = ps(Me => {
|
|
|
8629
8629
|
return this.classScope.exit(), this.finishNode(r, "ClassBody");
|
|
8630
8630
|
}
|
|
8631
8631
|
parseClassMemberFromModifier(t, e) {
|
|
8632
|
-
let s = this.parseIdentifier(
|
|
8632
|
+
let s = this.parseIdentifier(true);
|
|
8633
8633
|
if (this.isClassMethod()) {
|
|
8634
8634
|
let i = e;
|
|
8635
|
-
return i.kind = "method", i.computed =
|
|
8635
|
+
return i.kind = "method", i.computed = false, i.key = s, i.static = false, this.pushClassMethod(t, i, false, false, false, false), true;
|
|
8636
8636
|
} else if (this.isClassProperty()) {
|
|
8637
8637
|
let i = e;
|
|
8638
|
-
return i.computed =
|
|
8638
|
+
return i.computed = false, i.key = s, i.static = false, t.body.push(this.parseClassProperty(i)), true;
|
|
8639
8639
|
}
|
|
8640
|
-
return this.resetPreviousNodeTrailingComments(s),
|
|
8640
|
+
return this.resetPreviousNodeTrailingComments(s), false;
|
|
8641
8641
|
}
|
|
8642
8642
|
parseClassMember(t, e, s) {
|
|
8643
8643
|
let i = this.isContextual(104);
|
|
@@ -8662,12 +8662,12 @@ var rs = ps(Me => {
|
|
|
8662
8662
|
c.kind = "method";
|
|
8663
8663
|
let C = this.match(136);
|
|
8664
8664
|
if (this.parseClassElementName(c), C) {
|
|
8665
|
-
this.pushClassPrivateMethod(t, n,
|
|
8665
|
+
this.pushClassPrivateMethod(t, n, true, false);
|
|
8666
8666
|
return;
|
|
8667
8667
|
}
|
|
8668
8668
|
this.isNonstaticConstructor(r) && this.raise(p.ConstructorIsGenerator, {
|
|
8669
8669
|
at: r.key
|
|
8670
|
-
}), this.pushClassMethod(t, r,
|
|
8670
|
+
}), this.pushClassMethod(t, r, true, false, false, false);
|
|
8671
8671
|
return;
|
|
8672
8672
|
}
|
|
8673
8673
|
let d = S(this.state.type) && !this.state.containsEsc,
|
|
@@ -8676,30 +8676,30 @@ var rs = ps(Me => {
|
|
|
8676
8676
|
I = this.state.startLoc;
|
|
8677
8677
|
if (this.parsePostMemberNameModifiers(u), this.isClassMethod()) {
|
|
8678
8678
|
if (c.kind = "method", f) {
|
|
8679
|
-
this.pushClassPrivateMethod(t, n,
|
|
8679
|
+
this.pushClassPrivateMethod(t, n, false, false);
|
|
8680
8680
|
return;
|
|
8681
8681
|
}
|
|
8682
8682
|
let C = this.isNonstaticConstructor(r),
|
|
8683
|
-
w =
|
|
8683
|
+
w = false;
|
|
8684
8684
|
C && (r.kind = "constructor", s.hadConstructor && !this.hasPlugin("typescript") && this.raise(p.DuplicateConstructor, {
|
|
8685
8685
|
at: x
|
|
8686
8686
|
}), C && this.hasPlugin("typescript") && e.override && this.raise(p.OverrideOnConstructor, {
|
|
8687
8687
|
at: x
|
|
8688
|
-
}), s.hadConstructor =
|
|
8688
|
+
}), s.hadConstructor = true, w = s.hadSuperClass), this.pushClassMethod(t, r, false, false, C, w);
|
|
8689
8689
|
} else if (this.isClassProperty()) f ? this.pushClassPrivateProperty(t, h) : this.pushClassProperty(t, o);else if (d && x.name === "async" && !this.isLineTerminator()) {
|
|
8690
8690
|
this.resetPreviousNodeTrailingComments(x);
|
|
8691
8691
|
let C = this.eat(55);
|
|
8692
8692
|
u.optional && this.unexpected(I), c.kind = "method";
|
|
8693
8693
|
let w = this.match(136);
|
|
8694
|
-
this.parseClassElementName(c), this.parsePostMemberNameModifiers(u), w ? this.pushClassPrivateMethod(t, n, C,
|
|
8694
|
+
this.parseClassElementName(c), this.parsePostMemberNameModifiers(u), w ? this.pushClassPrivateMethod(t, n, C, true) : (this.isNonstaticConstructor(r) && this.raise(p.ConstructorIsAsync, {
|
|
8695
8695
|
at: r.key
|
|
8696
|
-
}), this.pushClassMethod(t, r, C,
|
|
8696
|
+
}), this.pushClassMethod(t, r, C, true, false, false));
|
|
8697
8697
|
} else if (d && (x.name === "get" || x.name === "set") && !(this.match(55) && this.isLineTerminator())) {
|
|
8698
8698
|
this.resetPreviousNodeTrailingComments(x), c.kind = x.name;
|
|
8699
8699
|
let C = this.match(136);
|
|
8700
|
-
this.parseClassElementName(r), C ? this.pushClassPrivateMethod(t, n,
|
|
8700
|
+
this.parseClassElementName(r), C ? this.pushClassPrivateMethod(t, n, false, false) : (this.isNonstaticConstructor(r) && this.raise(p.ConstructorIsAccessor, {
|
|
8701
8701
|
at: r.key
|
|
8702
|
-
}), this.pushClassMethod(t, r,
|
|
8702
|
+
}), this.pushClassMethod(t, r, false, false, false, false)), this.checkGetterSetterParams(r);
|
|
8703
8703
|
} else if (d && x.name === "accessor" && !this.isLineTerminator()) {
|
|
8704
8704
|
this.expectPlugin("decoratorAutoAccessors"), this.resetPreviousNodeTrailingComments(x);
|
|
8705
8705
|
let C = this.match(136);
|
|
@@ -8728,7 +8728,7 @@ var rs = ps(Me => {
|
|
|
8728
8728
|
let i = this.state.labels;
|
|
8729
8729
|
this.state.labels = [], this.prodParam.enter(pe);
|
|
8730
8730
|
let r = e.body = [];
|
|
8731
|
-
this.parseBlockOrModuleBlockBody(r, void 0,
|
|
8731
|
+
this.parseBlockOrModuleBlockBody(r, void 0, false, 8), this.prodParam.exit(), this.scope.exit(), this.state.labels = i, t.body.push(this.finishNode(e, "StaticBlock")), (s = e.decorators) != null && s.length && this.raise(p.DecoratorStaticBlock, {
|
|
8732
8732
|
at: e
|
|
8733
8733
|
});
|
|
8734
8734
|
}
|
|
@@ -8752,10 +8752,10 @@ var rs = ps(Me => {
|
|
|
8752
8752
|
t.body.push(i), s && this.classScope.declarePrivateName(this.getPrivateNameSV(i.key), dt, i.key.loc.start);
|
|
8753
8753
|
}
|
|
8754
8754
|
pushClassMethod(t, e, s, i, r, n) {
|
|
8755
|
-
t.body.push(this.parseMethod(e, s, i, r, n, "ClassMethod",
|
|
8755
|
+
t.body.push(this.parseMethod(e, s, i, r, n, "ClassMethod", true));
|
|
8756
8756
|
}
|
|
8757
8757
|
pushClassPrivateMethod(t, e, s, i) {
|
|
8758
|
-
let r = this.parseMethod(e, s, i,
|
|
8758
|
+
let r = this.parseMethod(e, s, i, false, false, "ClassPrivateMethod", true);
|
|
8759
8759
|
t.body.push(r);
|
|
8760
8760
|
let n = r.kind === "get" ? r.static ? Dr : Or : r.kind === "set" ? r.static ? Mr : Br : dt;
|
|
8761
8761
|
this.declareClassPrivateMethodInScope(r, n);
|
|
@@ -8785,7 +8785,7 @@ var rs = ps(Me => {
|
|
|
8785
8785
|
t.superClass = this.eat(81) ? this.parseExprSubscripts() : null;
|
|
8786
8786
|
}
|
|
8787
8787
|
parseExport(t, e) {
|
|
8788
|
-
let s = this.parseMaybeImportPhase(t,
|
|
8788
|
+
let s = this.parseMaybeImportPhase(t, true),
|
|
8789
8789
|
i = this.maybeParseExportDefaultSpecifier(t, s),
|
|
8790
8790
|
r = !i || this.eat(12),
|
|
8791
8791
|
n = r && this.eatExportStar(t),
|
|
@@ -8796,13 +8796,13 @@ var rs = ps(Me => {
|
|
|
8796
8796
|
if (i && this.unexpected(), e) throw this.raise(p.UnsupportedDecoratorExport, {
|
|
8797
8797
|
at: t
|
|
8798
8798
|
});
|
|
8799
|
-
return this.parseExportFrom(t,
|
|
8799
|
+
return this.parseExportFrom(t, true), this.finishNode(t, "ExportAllDeclaration");
|
|
8800
8800
|
}
|
|
8801
8801
|
let c = this.maybeParseExportNamedSpecifiers(t);
|
|
8802
8802
|
i && r && !n && !c && this.unexpected(null, 5), o && h && this.unexpected(null, 97);
|
|
8803
8803
|
let u;
|
|
8804
8804
|
if (l || c) {
|
|
8805
|
-
if (u =
|
|
8805
|
+
if (u = false, e) throw this.raise(p.UnsupportedDecoratorExport, {
|
|
8806
8806
|
at: t
|
|
8807
8807
|
});
|
|
8808
8808
|
this.parseExportFrom(t, l);
|
|
@@ -8810,7 +8810,7 @@ var rs = ps(Me => {
|
|
|
8810
8810
|
if (l || c || u) {
|
|
8811
8811
|
var d;
|
|
8812
8812
|
let f = t;
|
|
8813
|
-
if (this.checkExport(f,
|
|
8813
|
+
if (this.checkExport(f, true, false, !!f.source), ((d = f.declaration) == null ? void 0 : d.type) === "ClassDeclaration") this.maybeTakeDecorators(e, f.declaration, f);else if (e) throw this.raise(p.UnsupportedDecoratorExport, {
|
|
8814
8814
|
at: t
|
|
8815
8815
|
});
|
|
8816
8816
|
return this.finishNode(f, "ExportNamedDeclaration");
|
|
@@ -8821,7 +8821,7 @@ var rs = ps(Me => {
|
|
|
8821
8821
|
if (f.declaration = x, x.type === "ClassDeclaration") this.maybeTakeDecorators(e, x, f);else if (e) throw this.raise(p.UnsupportedDecoratorExport, {
|
|
8822
8822
|
at: t
|
|
8823
8823
|
});
|
|
8824
|
-
return this.checkExport(f,
|
|
8824
|
+
return this.checkExport(f, true, true), this.finishNode(f, "ExportDefaultDeclaration");
|
|
8825
8825
|
}
|
|
8826
8826
|
this.unexpected(null, 5);
|
|
8827
8827
|
}
|
|
@@ -8831,33 +8831,33 @@ var rs = ps(Me => {
|
|
|
8831
8831
|
maybeParseExportDefaultSpecifier(t, e) {
|
|
8832
8832
|
if (e || this.isExportDefaultSpecifier()) {
|
|
8833
8833
|
this.expectPlugin("exportDefaultFrom", e == null ? void 0 : e.loc.start);
|
|
8834
|
-
let s = e || this.parseIdentifier(
|
|
8834
|
+
let s = e || this.parseIdentifier(true),
|
|
8835
8835
|
i = this.startNodeAtNode(s);
|
|
8836
|
-
return i.exported = s, t.specifiers = [this.finishNode(i, "ExportDefaultSpecifier")],
|
|
8836
|
+
return i.exported = s, t.specifiers = [this.finishNode(i, "ExportDefaultSpecifier")], true;
|
|
8837
8837
|
}
|
|
8838
|
-
return
|
|
8838
|
+
return false;
|
|
8839
8839
|
}
|
|
8840
8840
|
maybeParseExportNamespaceSpecifier(t) {
|
|
8841
8841
|
if (this.isContextual(93)) {
|
|
8842
8842
|
t.specifiers || (t.specifiers = []);
|
|
8843
8843
|
let e = this.startNodeAt(this.state.lastTokStartLoc);
|
|
8844
|
-
return this.next(), e.exported = this.parseModuleExportName(), t.specifiers.push(this.finishNode(e, "ExportNamespaceSpecifier")),
|
|
8844
|
+
return this.next(), e.exported = this.parseModuleExportName(), t.specifiers.push(this.finishNode(e, "ExportNamespaceSpecifier")), true;
|
|
8845
8845
|
}
|
|
8846
|
-
return
|
|
8846
|
+
return false;
|
|
8847
8847
|
}
|
|
8848
8848
|
maybeParseExportNamedSpecifiers(t) {
|
|
8849
8849
|
if (this.match(5)) {
|
|
8850
8850
|
t.specifiers || (t.specifiers = []);
|
|
8851
8851
|
let e = t.exportKind === "type";
|
|
8852
|
-
return t.specifiers.push(...this.parseExportSpecifiers(e)), t.source = null, t.declaration = null, this.hasPlugin("importAssertions") && (t.assertions = []),
|
|
8852
|
+
return t.specifiers.push(...this.parseExportSpecifiers(e)), t.source = null, t.declaration = null, this.hasPlugin("importAssertions") && (t.assertions = []), true;
|
|
8853
8853
|
}
|
|
8854
|
-
return
|
|
8854
|
+
return false;
|
|
8855
8855
|
}
|
|
8856
8856
|
maybeParseExportDeclaration(t) {
|
|
8857
|
-
return this.shouldParseExportDeclaration() ? (t.specifiers = [], t.source = null, this.hasPlugin("importAssertions") && (t.assertions = []), t.declaration = this.parseExportDeclaration(t),
|
|
8857
|
+
return this.shouldParseExportDeclaration() ? (t.specifiers = [], t.source = null, this.hasPlugin("importAssertions") && (t.assertions = []), t.declaration = this.parseExportDeclaration(t), true) : false;
|
|
8858
8858
|
}
|
|
8859
8859
|
isAsyncFunction() {
|
|
8860
|
-
if (!this.isContextual(95)) return
|
|
8860
|
+
if (!this.isContextual(95)) return false;
|
|
8861
8861
|
let t = this.nextTokenInLineStart();
|
|
8862
8862
|
return this.isUnparsedContextual(t, "function");
|
|
8863
8863
|
}
|
|
@@ -8865,10 +8865,10 @@ var rs = ps(Me => {
|
|
|
8865
8865
|
let t = this.startNode();
|
|
8866
8866
|
if (this.match(68)) return this.next(), this.parseFunction(t, 5);
|
|
8867
8867
|
if (this.isAsyncFunction()) return this.next(), this.next(), this.parseFunction(t, 13);
|
|
8868
|
-
if (this.match(80)) return this.parseClass(t,
|
|
8869
|
-
if (this.match(26)) return this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport") ===
|
|
8868
|
+
if (this.match(80)) return this.parseClass(t, true, true);
|
|
8869
|
+
if (this.match(26)) return this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport") === true && this.raise(p.DecoratorBeforeExport, {
|
|
8870
8870
|
at: this.state.startLoc
|
|
8871
|
-
}), this.parseClass(this.maybeTakeDecorators(this.parseDecorators(
|
|
8871
|
+
}), this.parseClass(this.maybeTakeDecorators(this.parseDecorators(false), this.startNode()), true, true);
|
|
8872
8872
|
if (this.match(75) || this.match(74) || this.isLet()) throw this.raise(p.UnsupportedDefaultExport, {
|
|
8873
8873
|
at: this.state.startLoc
|
|
8874
8874
|
});
|
|
@@ -8876,29 +8876,29 @@ var rs = ps(Me => {
|
|
|
8876
8876
|
return this.semicolon(), e;
|
|
8877
8877
|
}
|
|
8878
8878
|
parseExportDeclaration(t) {
|
|
8879
|
-
return this.match(80) ? this.parseClass(this.startNode(),
|
|
8879
|
+
return this.match(80) ? this.parseClass(this.startNode(), true, false) : this.parseStatementListItem();
|
|
8880
8880
|
}
|
|
8881
8881
|
isExportDefaultSpecifier() {
|
|
8882
8882
|
let {
|
|
8883
8883
|
type: t
|
|
8884
8884
|
} = this.state;
|
|
8885
8885
|
if (S(t)) {
|
|
8886
|
-
if (t === 95 && !this.state.containsEsc || t === 99) return
|
|
8886
|
+
if (t === 95 && !this.state.containsEsc || t === 99) return false;
|
|
8887
8887
|
if ((t === 128 || t === 127) && !this.state.containsEsc) {
|
|
8888
8888
|
let {
|
|
8889
8889
|
type: i
|
|
8890
8890
|
} = this.lookahead();
|
|
8891
|
-
if (S(i) && i !== 97 || i === 5) return this.expectOnePlugin(["flow", "typescript"]),
|
|
8891
|
+
if (S(i) && i !== 97 || i === 5) return this.expectOnePlugin(["flow", "typescript"]), false;
|
|
8892
8892
|
}
|
|
8893
|
-
} else if (!this.match(65)) return
|
|
8893
|
+
} else if (!this.match(65)) return false;
|
|
8894
8894
|
let e = this.nextTokenStart(),
|
|
8895
8895
|
s = this.isUnparsedContextual(e, "from");
|
|
8896
|
-
if (this.input.charCodeAt(e) === 44 || S(this.state.type) && s) return
|
|
8896
|
+
if (this.input.charCodeAt(e) === 44 || S(this.state.type) && s) return true;
|
|
8897
8897
|
if (this.match(65) && s) {
|
|
8898
8898
|
let i = this.input.charCodeAt(this.nextTokenStartSince(e + 4));
|
|
8899
8899
|
return i === 34 || i === 39;
|
|
8900
8900
|
}
|
|
8901
|
-
return
|
|
8901
|
+
return false;
|
|
8902
8902
|
}
|
|
8903
8903
|
parseExportFrom(t, e) {
|
|
8904
8904
|
this.eatContextual(97) ? (t.source = this.parseImportSource(), this.checkExport(t), this.maybeParseImportAttributes(t), this.checkJSONModuleImport(t)) : e && this.unexpected(), this.semicolon();
|
|
@@ -8907,9 +8907,9 @@ var rs = ps(Me => {
|
|
|
8907
8907
|
let {
|
|
8908
8908
|
type: t
|
|
8909
8909
|
} = this.state;
|
|
8910
|
-
return t === 26 && (this.expectOnePlugin(["decorators", "decorators-legacy"]), this.hasPlugin("decorators")) ? (this.getPluginOption("decorators", "decoratorsBeforeExport") ===
|
|
8910
|
+
return t === 26 && (this.expectOnePlugin(["decorators", "decorators-legacy"]), this.hasPlugin("decorators")) ? (this.getPluginOption("decorators", "decoratorsBeforeExport") === true && this.raise(p.DecoratorBeforeExport, {
|
|
8911
8911
|
at: this.state.startLoc
|
|
8912
|
-
}),
|
|
8912
|
+
}), true) : t === 74 || t === 75 || t === 68 || t === 80 || this.isLet() || this.isAsyncFunction();
|
|
8913
8913
|
}
|
|
8914
8914
|
checkExport(t, e, s, i) {
|
|
8915
8915
|
if (e) {
|
|
@@ -8934,7 +8934,7 @@ var rs = ps(Me => {
|
|
|
8934
8934
|
at: n,
|
|
8935
8935
|
localName: l.value,
|
|
8936
8936
|
exportName: h
|
|
8937
|
-
}) : (this.checkReservedWord(l.name, l.loc.start,
|
|
8937
|
+
}) : (this.checkReservedWord(l.name, l.loc.start, true, false), this.scope.checkLocalExport(l));
|
|
8938
8938
|
}
|
|
8939
8939
|
} else if (t.declaration) {
|
|
8940
8940
|
if (t.declaration.type === "FunctionDeclaration" || t.declaration.type === "ClassDeclaration") {
|
|
@@ -8958,9 +8958,9 @@ var rs = ps(Me => {
|
|
|
8958
8958
|
}
|
|
8959
8959
|
parseExportSpecifiers(t) {
|
|
8960
8960
|
let e = [],
|
|
8961
|
-
s =
|
|
8961
|
+
s = true;
|
|
8962
8962
|
for (this.expect(5); !this.eat(8);) {
|
|
8963
|
-
if (s) s =
|
|
8963
|
+
if (s) s = false;else if (this.expect(12), this.eat(8)) break;
|
|
8964
8964
|
let i = this.isContextual(128),
|
|
8965
8965
|
r = this.match(131),
|
|
8966
8966
|
n = this.startNode();
|
|
@@ -8980,13 +8980,13 @@ var rs = ps(Me => {
|
|
|
8980
8980
|
surrogateCharCode: e[0].charCodeAt(0)
|
|
8981
8981
|
}), t;
|
|
8982
8982
|
}
|
|
8983
|
-
return this.parseIdentifier(
|
|
8983
|
+
return this.parseIdentifier(true);
|
|
8984
8984
|
}
|
|
8985
8985
|
isJSONModuleImport(t) {
|
|
8986
8986
|
return t.assertions != null ? t.assertions.some(({
|
|
8987
8987
|
key: e,
|
|
8988
8988
|
value: s
|
|
8989
|
-
}) => s.value === "json" && (e.type === "Identifier" ? e.name === "type" : e.value === "type")) :
|
|
8989
|
+
}) => s.value === "json" && (e.type === "Identifier" ? e.name === "type" : e.value === "type")) : false;
|
|
8990
8990
|
}
|
|
8991
8991
|
checkImportReflection(t) {
|
|
8992
8992
|
if (t.module) {
|
|
@@ -9018,11 +9018,11 @@ var rs = ps(Me => {
|
|
|
9018
9018
|
return !t && this.isContextual(125);
|
|
9019
9019
|
}
|
|
9020
9020
|
applyImportPhase(t, e, s, i) {
|
|
9021
|
-
e || (s === "module" ? (this.expectPlugin("importReflection", i), t.module =
|
|
9021
|
+
e || (s === "module" ? (this.expectPlugin("importReflection", i), t.module = true) : this.hasPlugin("importReflection") && (t.module = false));
|
|
9022
9022
|
}
|
|
9023
9023
|
parseMaybeImportPhase(t, e) {
|
|
9024
9024
|
if (!this.isPotentialImportPhase(e)) return this.applyImportPhase(t, e, null), null;
|
|
9025
|
-
let s = this.parseIdentifier(
|
|
9025
|
+
let s = this.parseIdentifier(true),
|
|
9026
9026
|
{
|
|
9027
9027
|
type: i
|
|
9028
9028
|
} = this.state;
|
|
@@ -9035,7 +9035,7 @@ var rs = ps(Me => {
|
|
|
9035
9035
|
return S(e) ? e !== 97 || this.lookaheadCharCode() === 102 : e !== 12;
|
|
9036
9036
|
}
|
|
9037
9037
|
parseImport(t) {
|
|
9038
|
-
return this.match(131) ? this.parseImportSourceAndAttributes(t) : this.parseImportSpecifiersAndAfter(t, this.parseMaybeImportPhase(t,
|
|
9038
|
+
return this.match(131) ? this.parseImportSourceAndAttributes(t) : this.parseImportSpecifiersAndAfter(t, this.parseMaybeImportPhase(t, false));
|
|
9039
9039
|
}
|
|
9040
9040
|
parseImportSpecifiersAndAfter(t, e) {
|
|
9041
9041
|
t.specifiers = [];
|
|
@@ -9071,7 +9071,7 @@ var rs = ps(Me => {
|
|
|
9071
9071
|
if (e.has(i) && this.raise(p.ModuleAttributesWithDuplicateKeys, {
|
|
9072
9072
|
at: this.state.startLoc,
|
|
9073
9073
|
key: i
|
|
9074
|
-
}), e.add(i), this.match(131) ? s.key = this.parseStringLiteral(i) : s.key = this.parseIdentifier(
|
|
9074
|
+
}), e.add(i), this.match(131) ? s.key = this.parseStringLiteral(i) : s.key = this.parseIdentifier(true), this.expect(14), !this.match(131)) throw this.raise(p.ModuleAttributeInvalidValue, {
|
|
9075
9075
|
at: this.state.startLoc
|
|
9076
9076
|
});
|
|
9077
9077
|
s.value = this.parseStringLiteral(this.state.value), t.push(this.finishNode(s, "ImportAttribute"));
|
|
@@ -9083,7 +9083,7 @@ var rs = ps(Me => {
|
|
|
9083
9083
|
e = new Set();
|
|
9084
9084
|
do {
|
|
9085
9085
|
let s = this.startNode();
|
|
9086
|
-
if (s.key = this.parseIdentifier(
|
|
9086
|
+
if (s.key = this.parseIdentifier(true), s.key.name !== "type" && this.raise(p.ModuleAttributeDifferentFromType, {
|
|
9087
9087
|
at: s.key
|
|
9088
9088
|
}), e.has(s.key.name) && this.raise(p.ModuleAttributesWithDuplicateKeys, {
|
|
9089
9089
|
at: s.key,
|
|
@@ -9097,33 +9097,33 @@ var rs = ps(Me => {
|
|
|
9097
9097
|
}
|
|
9098
9098
|
maybeParseImportAttributes(t) {
|
|
9099
9099
|
let e,
|
|
9100
|
-
s =
|
|
9100
|
+
s = false;
|
|
9101
9101
|
if (this.match(76)) {
|
|
9102
9102
|
if (this.hasPrecedingLineBreak() && this.lookaheadCharCode() === 40) return;
|
|
9103
|
-
this.next(), this.hasPlugin("moduleAttributes") ? e = this.parseModuleAttributes() : (this.expectImportAttributesPlugin(), e = this.parseImportAttributes()), s =
|
|
9104
|
-
} else if (this.isContextual(94) && !this.hasPrecedingLineBreak()) this.hasPlugin("importAttributes") ? (this.getPluginOption("importAttributes", "deprecatedAssertSyntax") !==
|
|
9103
|
+
this.next(), this.hasPlugin("moduleAttributes") ? e = this.parseModuleAttributes() : (this.expectImportAttributesPlugin(), e = this.parseImportAttributes()), s = true;
|
|
9104
|
+
} else if (this.isContextual(94) && !this.hasPrecedingLineBreak()) this.hasPlugin("importAttributes") ? (this.getPluginOption("importAttributes", "deprecatedAssertSyntax") !== true && this.raise(p.ImportAttributesUseAssert, {
|
|
9105
9105
|
at: this.state.startLoc
|
|
9106
|
-
}), this.addExtra(t, "deprecatedAssertSyntax",
|
|
9106
|
+
}), this.addExtra(t, "deprecatedAssertSyntax", true)) : this.expectOnePlugin(["importAttributes", "importAssertions"]), this.next(), e = this.parseImportAttributes();else if (this.hasPlugin("importAttributes") || this.hasPlugin("importAssertions")) e = [];else if (this.hasPlugin("moduleAttributes")) e = [];else return;
|
|
9107
9107
|
!s && this.hasPlugin("importAssertions") ? t.assertions = e : t.attributes = e;
|
|
9108
9108
|
}
|
|
9109
9109
|
maybeParseDefaultImportSpecifier(t, e) {
|
|
9110
9110
|
if (e) {
|
|
9111
9111
|
let s = this.startNodeAtNode(e);
|
|
9112
|
-
return s.local = e, t.specifiers.push(this.finishImportSpecifier(s, "ImportDefaultSpecifier")),
|
|
9113
|
-
} else if (M(this.state.type)) return this.parseImportSpecifierLocal(t, this.startNode(), "ImportDefaultSpecifier"),
|
|
9114
|
-
return
|
|
9112
|
+
return s.local = e, t.specifiers.push(this.finishImportSpecifier(s, "ImportDefaultSpecifier")), true;
|
|
9113
|
+
} else if (M(this.state.type)) return this.parseImportSpecifierLocal(t, this.startNode(), "ImportDefaultSpecifier"), true;
|
|
9114
|
+
return false;
|
|
9115
9115
|
}
|
|
9116
9116
|
maybeParseStarImportSpecifier(t) {
|
|
9117
9117
|
if (this.match(55)) {
|
|
9118
9118
|
let e = this.startNode();
|
|
9119
|
-
return this.next(), this.expectContextual(93), this.parseImportSpecifierLocal(t, e, "ImportNamespaceSpecifier"),
|
|
9119
|
+
return this.next(), this.expectContextual(93), this.parseImportSpecifierLocal(t, e, "ImportNamespaceSpecifier"), true;
|
|
9120
9120
|
}
|
|
9121
|
-
return
|
|
9121
|
+
return false;
|
|
9122
9122
|
}
|
|
9123
9123
|
parseNamedImportSpecifiers(t) {
|
|
9124
|
-
let e =
|
|
9124
|
+
let e = true;
|
|
9125
9125
|
for (this.expect(5); !this.eat(8);) {
|
|
9126
|
-
if (e) e =
|
|
9126
|
+
if (e) e = false;else {
|
|
9127
9127
|
if (this.eat(14)) throw this.raise(p.DestructureNamedImport, {
|
|
9128
9128
|
at: this.state.startLoc
|
|
9129
9129
|
});
|
|
@@ -9146,7 +9146,7 @@ var rs = ps(Me => {
|
|
|
9146
9146
|
at: t,
|
|
9147
9147
|
importName: n.value
|
|
9148
9148
|
});
|
|
9149
|
-
this.checkReservedWord(n.name, t.loc.start,
|
|
9149
|
+
this.checkReservedWord(n.name, t.loc.start, true, true), t.local || (t.local = K(n));
|
|
9150
9150
|
}
|
|
9151
9151
|
return this.finishImportSpecifier(t, "ImportSpecifier", r);
|
|
9152
9152
|
}
|
|
@@ -9199,7 +9199,7 @@ var rs = ps(Me => {
|
|
|
9199
9199
|
}
|
|
9200
9200
|
function Aa(a, t) {
|
|
9201
9201
|
let e = we(t, a);
|
|
9202
|
-
return e.options.strictMode && (e.state.strict =
|
|
9202
|
+
return e.options.strictMode && (e.state.strict = true), e.getExpression();
|
|
9203
9203
|
}
|
|
9204
9204
|
function Sa(a) {
|
|
9205
9205
|
let t = {};
|
|
@@ -9230,7 +9230,7 @@ var rs = ps(Me => {
|
|
|
9230
9230
|
var mi = ps(ie => {
|
|
9231
9231
|
|
|
9232
9232
|
Object.defineProperty(ie, "__esModule", {
|
|
9233
|
-
value:
|
|
9233
|
+
value: true
|
|
9234
9234
|
});
|
|
9235
9235
|
ie.extract = _a;
|
|
9236
9236
|
ie.parse = Ua;
|
|
@@ -9305,7 +9305,7 @@ var cs = {};
|
|
|
9305
9305
|
zi(cs, {
|
|
9306
9306
|
parsers: () => dn
|
|
9307
9307
|
});
|
|
9308
|
-
var lt = pt(rs()
|
|
9308
|
+
var lt = pt(rs());
|
|
9309
9309
|
function wa(a) {
|
|
9310
9310
|
let t = [];
|
|
9311
9311
|
for (let e of a) try {
|
|
@@ -9326,7 +9326,7 @@ function Ia(a) {
|
|
|
9326
9326
|
}
|
|
9327
9327
|
var rt = Ia;
|
|
9328
9328
|
function Na(a, t) {
|
|
9329
|
-
if (t ===
|
|
9329
|
+
if (t === false) return false;
|
|
9330
9330
|
if (a.charAt(t) === "/" && a.charAt(t + 1) === "*") {
|
|
9331
9331
|
for (let e = t + 2; e < a.length; ++e) if (a.charAt(e) === "*" && a.charAt(e + 1) === "/") return e + 2;
|
|
9332
9332
|
}
|
|
@@ -9335,7 +9335,7 @@ function Na(a, t) {
|
|
|
9335
9335
|
var ii = Na;
|
|
9336
9336
|
function ka(a, t, e) {
|
|
9337
9337
|
let s = !!(e != null && e.backwards);
|
|
9338
|
-
if (t ===
|
|
9338
|
+
if (t === false) return false;
|
|
9339
9339
|
let i = a.charAt(t);
|
|
9340
9340
|
if (s) {
|
|
9341
9341
|
if (a.charAt(t - 1) === "\r" && i === `
|
|
@@ -9354,7 +9354,7 @@ var ri = ka;
|
|
|
9354
9354
|
function at(a) {
|
|
9355
9355
|
return (t, e, s) => {
|
|
9356
9356
|
let i = !!(s != null && s.backwards);
|
|
9357
|
-
if (e ===
|
|
9357
|
+
if (e === false) return false;
|
|
9358
9358
|
let {
|
|
9359
9359
|
length: r
|
|
9360
9360
|
} = t,
|
|
@@ -9366,13 +9366,13 @@ function at(a) {
|
|
|
9366
9366
|
} else if (!a.includes(o)) return n;
|
|
9367
9367
|
i ? n-- : n++;
|
|
9368
9368
|
}
|
|
9369
|
-
return n === -1 || n === r ? n :
|
|
9369
|
+
return n === -1 || n === r ? n : false;
|
|
9370
9370
|
};
|
|
9371
9371
|
}
|
|
9372
9372
|
var ai = at(" "),
|
|
9373
9373
|
ni = at(/[^\n\r]/);
|
|
9374
9374
|
function va(a, t) {
|
|
9375
|
-
return t ===
|
|
9375
|
+
return t === false ? false : a.charAt(t) === "/" && a.charAt(t + 1) === "/" ? ni(a, t) : t;
|
|
9376
9376
|
}
|
|
9377
9377
|
var oi = va;
|
|
9378
9378
|
function La(a, t) {
|
|
@@ -9382,7 +9382,7 @@ function La(a, t) {
|
|
|
9382
9382
|
return s;
|
|
9383
9383
|
}
|
|
9384
9384
|
var hi = La;
|
|
9385
|
-
var ye = pt(mi()
|
|
9385
|
+
var ye = pt(mi());
|
|
9386
9386
|
function $a(a) {
|
|
9387
9387
|
let t = rt(a);
|
|
9388
9388
|
t && (a = a.slice(t.length + 1));
|
|
@@ -9863,7 +9863,7 @@ function tn(a, t) {
|
|
|
9863
9863
|
let h = D(n);
|
|
9864
9864
|
if (!r.has(h)) return o.extra = {
|
|
9865
9865
|
...o.extra,
|
|
9866
|
-
parenthesized:
|
|
9866
|
+
parenthesized: true
|
|
9867
9867
|
}, o;
|
|
9868
9868
|
}
|
|
9869
9869
|
});
|
|
@@ -9875,7 +9875,7 @@ function tn(a, t) {
|
|
|
9875
9875
|
break;
|
|
9876
9876
|
case "VariableDeclaration":
|
|
9877
9877
|
{
|
|
9878
|
-
let n = as(
|
|
9878
|
+
let n = as(false, r.declarations, -1);
|
|
9879
9879
|
n != null && n.init && i(r, n);
|
|
9880
9880
|
break;
|
|
9881
9881
|
}
|
|
@@ -9906,7 +9906,7 @@ function tn(a, t) {
|
|
|
9906
9906
|
case "TopicReference":
|
|
9907
9907
|
a.extra = {
|
|
9908
9908
|
...a.extra,
|
|
9909
|
-
__isUsingHackPipeline:
|
|
9909
|
+
__isUsingHackPipeline: true
|
|
9910
9910
|
};
|
|
9911
9911
|
break;
|
|
9912
9912
|
case "ExportAllDeclaration":
|
|
@@ -9931,7 +9931,7 @@ function tn(a, t) {
|
|
|
9931
9931
|
break;
|
|
9932
9932
|
}
|
|
9933
9933
|
}), X(a.comments)) {
|
|
9934
|
-
let r = as(
|
|
9934
|
+
let r = as(false, a.comments, -1);
|
|
9935
9935
|
for (let n = a.comments.length - 2; n >= 0; n--) {
|
|
9936
9936
|
let o = a.comments[n];
|
|
9937
9937
|
_(o) === D(r) && Be(o) && Be(r) && ns(o) && ns(r) && (a.comments.splice(n + 1, 1), o.value += "*//*" + r.value, o.range = [D(o), _(r)]), r = o;
|
|
@@ -9994,18 +9994,18 @@ var ht = rn;
|
|
|
9994
9994
|
var Te = a => xe(cn(a)),
|
|
9995
9995
|
an = {
|
|
9996
9996
|
sourceType: "module",
|
|
9997
|
-
allowImportExportEverywhere:
|
|
9998
|
-
allowReturnOutsideFunction:
|
|
9999
|
-
allowNewTargetOutsideFunction:
|
|
10000
|
-
allowSuperOutsideMethod:
|
|
10001
|
-
allowUndeclaredExports:
|
|
10002
|
-
errorRecovery:
|
|
10003
|
-
createParenthesizedExpressions:
|
|
9997
|
+
allowImportExportEverywhere: true,
|
|
9998
|
+
allowReturnOutsideFunction: true,
|
|
9999
|
+
allowNewTargetOutsideFunction: true,
|
|
10000
|
+
allowSuperOutsideMethod: true,
|
|
10001
|
+
allowUndeclaredExports: true,
|
|
10002
|
+
errorRecovery: true,
|
|
10003
|
+
createParenthesizedExpressions: true,
|
|
10004
10004
|
plugins: ["doExpressions", "exportDefaultFrom", "functionBind", "functionSent", "throwExpressions", "partialApplication", "decorators", "decimal", "moduleBlocks", "asyncDoExpressions", "regexpUnicodeSets", "destructuringPrivate", "decoratorAutoAccessors", "importReflection", "explicitResourceManagement", ["importAttributes", {
|
|
10005
|
-
deprecatedAssertSyntax:
|
|
10005
|
+
deprecatedAssertSyntax: true
|
|
10006
10006
|
}]],
|
|
10007
|
-
tokens:
|
|
10008
|
-
ranges:
|
|
10007
|
+
tokens: true,
|
|
10008
|
+
ranges: true
|
|
10009
10009
|
},
|
|
10010
10010
|
nn = ["recordAndTuple", {
|
|
10011
10011
|
syntaxType: "hash"
|
|
@@ -10026,11 +10026,11 @@ var Te = a => xe(cn(a)),
|
|
|
10026
10026
|
on = /@(?:no)?flow\b/;
|
|
10027
10027
|
function hn(a, t) {
|
|
10028
10028
|
var i;
|
|
10029
|
-
if ((i = t.filepath) != null && i.endsWith(".js.flow")) return
|
|
10029
|
+
if ((i = t.filepath) != null && i.endsWith(".js.flow")) return true;
|
|
10030
10030
|
let e = rt(a);
|
|
10031
10031
|
e && (a = a.slice(e.length));
|
|
10032
10032
|
let s = hi(a, 0);
|
|
10033
|
-
return s !==
|
|
10033
|
+
return s !== false && (a = a.slice(0, s)), on.test(a);
|
|
10034
10034
|
}
|
|
10035
10035
|
function ln(a, t, e) {
|
|
10036
10036
|
let s = a(t, e),
|
|
@@ -10039,7 +10039,7 @@ function ln(a, t, e) {
|
|
|
10039
10039
|
return s;
|
|
10040
10040
|
}
|
|
10041
10041
|
function cn({
|
|
10042
|
-
isExpression: a =
|
|
10042
|
+
isExpression: a = false,
|
|
10043
10043
|
optionsCombinations: t
|
|
10044
10044
|
}) {
|
|
10045
10045
|
return (e, s = {}) => {
|
|
@@ -10078,17 +10078,17 @@ var pn = new Set(["StrictNumericEscape", "StrictWith", "StrictOctalLiteral", "St
|
|
|
10078
10078
|
optionsCombinations: [R(["jsx", "typescript"]), R(["typescript"])]
|
|
10079
10079
|
}),
|
|
10080
10080
|
ki = Te({
|
|
10081
|
-
isExpression:
|
|
10081
|
+
isExpression: true,
|
|
10082
10082
|
optionsCombinations: [R(["jsx"])]
|
|
10083
10083
|
}),
|
|
10084
10084
|
vi = Te({
|
|
10085
|
-
isExpression:
|
|
10085
|
+
isExpression: true,
|
|
10086
10086
|
optionsCombinations: [R(["typescript"])]
|
|
10087
10087
|
}),
|
|
10088
10088
|
Di = Te({
|
|
10089
10089
|
optionsCombinations: [R(["jsx", ["flow", {
|
|
10090
|
-
all:
|
|
10091
|
-
enums:
|
|
10090
|
+
all: true,
|
|
10091
|
+
enums: true
|
|
10092
10092
|
}], "flowComments"])]
|
|
10093
10093
|
}),
|
|
10094
10094
|
un = Te({
|
|
@@ -10106,10 +10106,10 @@ var pn = new Set(["StrictNumericEscape", "StrictWith", "StrictOctalLiteral", "St
|
|
|
10106
10106
|
__vue_ts_event_binding: Ni,
|
|
10107
10107
|
__babel_estree: un
|
|
10108
10108
|
};
|
|
10109
|
-
var Bi = pt(rs()
|
|
10109
|
+
var Bi = pt(rs());
|
|
10110
10110
|
function Fi(a = {}) {
|
|
10111
10111
|
let {
|
|
10112
|
-
allowComments: t =
|
|
10112
|
+
allowComments: t = true
|
|
10113
10113
|
} = a;
|
|
10114
10114
|
return function (s) {
|
|
10115
10115
|
let i;
|
|
@@ -10191,13 +10191,13 @@ var Oi = Fi(),
|
|
|
10191
10191
|
json: xe({
|
|
10192
10192
|
parse: Oi,
|
|
10193
10193
|
hasPragma() {
|
|
10194
|
-
return
|
|
10194
|
+
return true;
|
|
10195
10195
|
}
|
|
10196
10196
|
}),
|
|
10197
10197
|
json5: xe(Oi),
|
|
10198
10198
|
"json-stringify": xe({
|
|
10199
10199
|
parse: Fi({
|
|
10200
|
-
allowComments:
|
|
10200
|
+
allowComments: false
|
|
10201
10201
|
}),
|
|
10202
10202
|
astFormat: "estree-json"
|
|
10203
10203
|
})
|