@galadrim/galadmin 0.1.38 → 0.1.40
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/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/front/build/asset-manifest.json +3 -3
- package/src/front/build/index.html +1 -1
- package/src/front/build/static/js/{main.4ce5340d.chunk.js → main.8a63b422.chunk.js} +2 -2
- package/src/front/build/static/js/main.8a63b422.chunk.js.map +1 -0
- package/src/front/node_modules/.cache/.eslintcache +1 -1
- package/src/front/node_modules/.cache/babel-loader/0046fa6def7297665aceff65675276fb.json +1 -0
- package/src/front/node_modules/.cache/babel-loader/6b6404ad16b4fb247c0dfe43c03f4a02.json +1 -0
- package/src/front/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/ef/81/2c9ecc926af52757cb3670536bc07219d1ccfba4d898a451352553fa6634b48d69ec580dd7c756e5fbcdc72e870664ef6bd7dc1af98e94d9eb182ba93be9 +1 -0
- package/src/front/node_modules/.cache/terser-webpack-plugin/index-v5/{c2/e5/5451dd89bb0fd48f988bf27c7ee614c66eb91f7085c5b5c8cb33048d0c32 → 31/fe/6640db1983b9834e63d1a760fa17521e8cf616b567ef7114a0676aa6971a} +1 -1
- package/src/front/node_modules/.cache/terser-webpack-plugin/index-v5/6c/19/fe86ba5d7c4062f185480ad22dd3b9fae9b30149827224339f9a633a9a94 +1 -1
- package/src/front/node_modules/.cache/terser-webpack-plugin/index-v5/87/08/421190bfe6e50816e059da6c33526c9943732ef856ebd2752d0cbfb4a852 +1 -1
- package/src/front/node_modules/.package-lock.json +72 -72
- package/src/front/node_modules/@babel/code-frame/lib/index.js +5 -4
- package/src/front/node_modules/@babel/code-frame/lib/index.js.map +1 -1
- package/src/front/node_modules/@babel/code-frame/package.json +3 -2
- package/src/front/node_modules/@babel/core/lib/config/cache-contexts.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/caching.js +2 -2
- package/src/front/node_modules/@babel/core/lib/config/caching.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/config-chain.js +13 -13
- package/src/front/node_modules/@babel/core/lib/config/config-chain.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/config-descriptors.js +6 -6
- package/src/front/node_modules/@babel/core/lib/config/config-descriptors.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/files/configuration.js +44 -41
- package/src/front/node_modules/@babel/core/lib/config/files/configuration.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/files/import-meta-resolve.js +1 -1
- package/src/front/node_modules/@babel/core/lib/config/files/import-meta-resolve.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/files/index-browser.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/files/index.js +3 -3
- package/src/front/node_modules/@babel/core/lib/config/files/index.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/files/module-types.js +27 -8
- package/src/front/node_modules/@babel/core/lib/config/files/module-types.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/files/package.js +2 -2
- package/src/front/node_modules/@babel/core/lib/config/files/package.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/files/plugins.js +3 -3
- package/src/front/node_modules/@babel/core/lib/config/files/plugins.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/files/types.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/files/utils.js +2 -2
- package/src/front/node_modules/@babel/core/lib/config/files/utils.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/full.js +13 -13
- package/src/front/node_modules/@babel/core/lib/config/full.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/helpers/config-api.js +6 -6
- package/src/front/node_modules/@babel/core/lib/config/helpers/config-api.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/index.js +60 -40
- package/src/front/node_modules/@babel/core/lib/config/index.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/item.js +1 -1
- package/src/front/node_modules/@babel/core/lib/config/item.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/partial.js +15 -23
- package/src/front/node_modules/@babel/core/lib/config/partial.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/plugin.js +1 -1
- package/src/front/node_modules/@babel/core/lib/config/plugin.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/printer.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/resolve-targets-browser.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/resolve-targets.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/util.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/validation/option-assertions.js +1 -1
- package/src/front/node_modules/@babel/core/lib/config/validation/option-assertions.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/validation/options.js +3 -3
- package/src/front/node_modules/@babel/core/lib/config/validation/options.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/validation/plugins.js +1 -1
- package/src/front/node_modules/@babel/core/lib/config/validation/plugins.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/errors/config-error.js +1 -1
- package/src/front/node_modules/@babel/core/lib/errors/config-error.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/gensync-utils/functional.js +1 -1
- package/src/front/node_modules/@babel/core/lib/gensync-utils/functional.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/index.js +23 -23
- package/src/front/node_modules/@babel/core/lib/index.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/parse.js +6 -6
- package/src/front/node_modules/@babel/core/lib/parse.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/parser/index.js +1 -1
- package/src/front/node_modules/@babel/core/lib/parser/index.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/tools/build-external-helpers.js +1 -1
- package/src/front/node_modules/@babel/core/lib/tools/build-external-helpers.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/transform-ast.js +5 -5
- package/src/front/node_modules/@babel/core/lib/transform-ast.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/transform-file.js +5 -5
- package/src/front/node_modules/@babel/core/lib/transform-file.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/transform.js +5 -5
- package/src/front/node_modules/@babel/core/lib/transform.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js +1 -1
- package/src/front/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/transformation/file/file.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/transformation/file/generate.js +1 -1
- package/src/front/node_modules/@babel/core/lib/transformation/file/generate.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/transformation/index.js +6 -6
- package/src/front/node_modules/@babel/core/lib/transformation/index.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/transformation/normalize-file.js +4 -4
- package/src/front/node_modules/@babel/core/lib/transformation/normalize-file.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/transformation/normalize-opts.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/transformation/plugin-pass.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/vendor/import-meta-resolve.js.map +1 -1
- package/src/front/node_modules/@babel/core/package.json +15 -15
- package/src/front/node_modules/@babel/core/src/config/files/index-browser.ts +2 -2
- package/src/front/node_modules/@babel/core/src/config/files/index.ts +4 -4
- package/src/front/node_modules/@babel/core/src/config/resolve-targets-browser.ts +1 -1
- package/src/front/node_modules/@babel/core/src/config/resolve-targets.ts +1 -1
- package/src/front/node_modules/@babel/core/src/transform-file.ts +5 -5
- package/src/front/node_modules/@babel/generator/lib/buffer.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/generators/base.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/generators/classes.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/generators/expressions.js +1 -1
- package/src/front/node_modules/@babel/generator/lib/generators/expressions.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/generators/flow.js +2 -2
- package/src/front/node_modules/@babel/generator/lib/generators/flow.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/generators/index.js +11 -11
- package/src/front/node_modules/@babel/generator/lib/generators/index.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/generators/jsx.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/generators/methods.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/generators/modules.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/generators/statements.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/generators/template-literals.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/generators/types.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/generators/typescript.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/index.js +2 -2
- package/src/front/node_modules/@babel/generator/lib/index.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/node/index.js +2 -2
- package/src/front/node_modules/@babel/generator/lib/node/index.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/node/whitespace.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/printer.js +3 -3
- package/src/front/node_modules/@babel/generator/lib/printer.js.map +1 -1
- package/src/front/node_modules/@babel/generator/package.json +4 -4
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/debug.js +2 -2
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/debug.js.map +1 -1
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/filter-items.js +1 -1
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/filter-items.js.map +1 -1
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/index.js +6 -6
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/index.js.map +1 -1
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/pretty.js +1 -1
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/pretty.js.map +1 -1
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/utils.js +1 -1
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/utils.js.map +1 -1
- package/src/front/node_modules/@babel/helper-compilation-targets/package.json +2 -2
- package/src/front/node_modules/@babel/helper-module-imports/README.md +1 -1
- package/src/front/node_modules/@babel/helper-module-imports/lib/import-injector.js +2 -2
- package/src/front/node_modules/@babel/helper-module-imports/lib/import-injector.js.map +1 -1
- package/src/front/node_modules/@babel/helper-module-imports/lib/index.js +2 -2
- package/src/front/node_modules/@babel/helper-module-imports/lib/index.js.map +1 -1
- package/src/front/node_modules/@babel/helper-module-imports/package.json +4 -4
- package/src/front/node_modules/@babel/helper-module-transforms/lib/index.js +5 -5
- package/src/front/node_modules/@babel/helper-module-transforms/lib/index.js.map +1 -1
- package/src/front/node_modules/@babel/helper-module-transforms/lib/rewrite-live-references.js.map +1 -1
- package/src/front/node_modules/@babel/helper-module-transforms/package.json +5 -5
- package/src/front/node_modules/@babel/helper-validator-identifier/README.md +1 -1
- package/src/front/node_modules/@babel/helper-validator-identifier/lib/index.js +2 -2
- package/src/front/node_modules/@babel/helper-validator-identifier/lib/index.js.map +1 -1
- package/src/front/node_modules/@babel/helper-validator-identifier/package.json +1 -1
- package/src/front/node_modules/@babel/helper-validator-identifier/scripts/generate-identifier-regex.js +8 -6
- package/src/front/node_modules/@babel/helper-validator-option/README.md +1 -1
- package/src/front/node_modules/@babel/helper-validator-option/lib/index.js +2 -2
- package/src/front/node_modules/@babel/helper-validator-option/lib/index.js.map +1 -1
- package/src/front/node_modules/@babel/helper-validator-option/lib/validator.js +1 -1
- package/src/front/node_modules/@babel/helper-validator-option/lib/validator.js.map +1 -1
- package/src/front/node_modules/@babel/helper-validator-option/package.json +1 -1
- package/src/front/node_modules/@babel/helpers/lib/helpers-generated.js +21 -21
- package/src/front/node_modules/@babel/helpers/lib/helpers-generated.js.map +1 -1
- package/src/front/node_modules/@babel/helpers/lib/helpers.js +1 -1
- package/src/front/node_modules/@babel/helpers/lib/helpers.js.map +1 -1
- package/src/front/node_modules/@babel/helpers/lib/index.js +1 -1
- package/src/front/node_modules/@babel/helpers/lib/index.js.map +1 -1
- package/src/front/node_modules/@babel/helpers/package.json +7 -7
- package/src/front/node_modules/@babel/helpers/scripts/generate-helpers.js +1 -1
- package/src/front/node_modules/@babel/highlight/lib/index.js +6 -5
- package/src/front/node_modules/@babel/highlight/lib/index.js.map +1 -1
- package/src/front/node_modules/@babel/highlight/package.json +1 -1
- package/src/front/node_modules/@babel/parser/lib/index.js +52 -57
- package/src/front/node_modules/@babel/parser/lib/index.js.map +1 -1
- package/src/front/node_modules/@babel/parser/package.json +4 -4
- package/src/front/node_modules/@babel/template/README.md +1 -1
- package/src/front/node_modules/@babel/template/lib/builder.js +3 -3
- package/src/front/node_modules/@babel/template/lib/builder.js.map +1 -1
- package/src/front/node_modules/@babel/template/lib/index.js +2 -2
- package/src/front/node_modules/@babel/template/lib/index.js.map +1 -1
- package/src/front/node_modules/@babel/template/lib/literal.js +3 -3
- package/src/front/node_modules/@babel/template/lib/literal.js.map +1 -1
- package/src/front/node_modules/@babel/template/lib/parse.js.map +1 -1
- package/src/front/node_modules/@babel/template/lib/populate.js.map +1 -1
- package/src/front/node_modules/@babel/template/lib/string.js +3 -3
- package/src/front/node_modules/@babel/template/lib/string.js.map +1 -1
- package/src/front/node_modules/@babel/template/package.json +4 -4
- package/src/front/node_modules/@babel/traverse/lib/cache.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/context.js +2 -2
- package/src/front/node_modules/@babel/traverse/lib/context.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/hub.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/index.js +8 -8
- package/src/front/node_modules/@babel/traverse/lib/index.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/ancestry.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/comments.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/context.js +2 -2
- package/src/front/node_modules/@babel/traverse/lib/path/context.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/conversion.js +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/conversion.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/evaluation.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/family.js +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/family.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/index.js +17 -17
- package/src/front/node_modules/@babel/traverse/lib/path/index.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/inference/index.js +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/inference/index.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/inference/inferers.js +2 -2
- package/src/front/node_modules/@babel/traverse/lib/path/inference/inferers.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/introspection.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/lib/hoister.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/lib/virtual-types-validator.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/modification.js +3 -3
- package/src/front/node_modules/@babel/traverse/lib/path/modification.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/removal.js +3 -3
- package/src/front/node_modules/@babel/traverse/lib/path/removal.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/replacement.js +3 -3
- package/src/front/node_modules/@babel/traverse/lib/path/replacement.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/scope/binding.js +1 -3
- package/src/front/node_modules/@babel/traverse/lib/scope/binding.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/scope/index.js +5 -5
- package/src/front/node_modules/@babel/traverse/lib/scope/index.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/scope/lib/renamer.js +2 -2
- package/src/front/node_modules/@babel/traverse/lib/scope/lib/renamer.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/traverse-node.js +1 -1
- package/src/front/node_modules/@babel/traverse/lib/traverse-node.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/types.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/visitors.js +1 -1
- package/src/front/node_modules/@babel/traverse/lib/visitors.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/package.json +6 -6
- package/src/front/node_modules/@babel/types/lib/asserts/assertNode.js +1 -1
- package/src/front/node_modules/@babel/types/lib/asserts/assertNode.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/asserts/generated/index.js +2 -2
- package/src/front/node_modules/@babel/types/lib/asserts/generated/index.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/ast-types/generated/index.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js +3 -3
- package/src/front/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js +9 -9
- package/src/front/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/builders/generated/index.js +2 -2
- package/src/front/node_modules/@babel/types/lib/builders/generated/index.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/builders/generated/uppercase.js +1 -1
- package/src/front/node_modules/@babel/types/lib/builders/generated/uppercase.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/builders/react/buildChildren.js +5 -5
- package/src/front/node_modules/@babel/types/lib/builders/react/buildChildren.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js +5 -5
- package/src/front/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/builders/validateNode.js +3 -3
- package/src/front/node_modules/@babel/types/lib/builders/validateNode.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/clone/clone.js +1 -1
- package/src/front/node_modules/@babel/types/lib/clone/clone.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/clone/cloneDeep.js +1 -1
- package/src/front/node_modules/@babel/types/lib/clone/cloneDeep.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js +1 -1
- package/src/front/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/clone/cloneNode.js +6 -6
- package/src/front/node_modules/@babel/types/lib/clone/cloneNode.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js +1 -1
- package/src/front/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/comments/addComment.js +1 -1
- package/src/front/node_modules/@babel/types/lib/comments/addComment.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/comments/addComments.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/comments/inheritInnerComments.js +1 -1
- package/src/front/node_modules/@babel/types/lib/comments/inheritInnerComments.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/comments/inheritLeadingComments.js +1 -1
- package/src/front/node_modules/@babel/types/lib/comments/inheritLeadingComments.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/comments/inheritTrailingComments.js +1 -1
- package/src/front/node_modules/@babel/types/lib/comments/inheritTrailingComments.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/comments/inheritsComments.js +3 -3
- package/src/front/node_modules/@babel/types/lib/comments/inheritsComments.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/comments/removeComments.js +2 -2
- package/src/front/node_modules/@babel/types/lib/comments/removeComments.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/constants/generated/index.js +50 -50
- package/src/front/node_modules/@babel/types/lib/constants/generated/index.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/converters/ensureBlock.js +1 -1
- package/src/front/node_modules/@babel/types/lib/converters/ensureBlock.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js +14 -14
- package/src/front/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js +1 -1
- package/src/front/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/converters/toBlock.js +9 -9
- package/src/front/node_modules/@babel/types/lib/converters/toBlock.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/converters/toComputedKey.js +3 -3
- package/src/front/node_modules/@babel/types/lib/converters/toComputedKey.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/converters/toExpression.js +6 -6
- package/src/front/node_modules/@babel/types/lib/converters/toExpression.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/converters/toIdentifier.js +1 -1
- package/src/front/node_modules/@babel/types/lib/converters/toIdentifier.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/converters/toKeyAlias.js +5 -5
- package/src/front/node_modules/@babel/types/lib/converters/toKeyAlias.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/converters/toSequenceExpression.js +1 -1
- package/src/front/node_modules/@babel/types/lib/converters/toSequenceExpression.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/converters/toStatement.js +7 -7
- package/src/front/node_modules/@babel/types/lib/converters/toStatement.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/converters/valueToNode.js +17 -17
- package/src/front/node_modules/@babel/types/lib/converters/valueToNode.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/definitions/core.js +9 -9
- package/src/front/node_modules/@babel/types/lib/definitions/core.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/definitions/experimental.js +1 -1
- package/src/front/node_modules/@babel/types/lib/definitions/experimental.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/definitions/flow.js +1 -1
- package/src/front/node_modules/@babel/types/lib/definitions/flow.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/definitions/index.js +9 -9
- package/src/front/node_modules/@babel/types/lib/definitions/index.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/definitions/jsx.js +1 -1
- package/src/front/node_modules/@babel/types/lib/definitions/jsx.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/definitions/misc.js +2 -2
- package/src/front/node_modules/@babel/types/lib/definitions/misc.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/definitions/placeholders.js +1 -1
- package/src/front/node_modules/@babel/types/lib/definitions/placeholders.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/definitions/typescript.js +4 -4
- package/src/front/node_modules/@babel/types/lib/definitions/typescript.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/definitions/utils.js +2 -2
- package/src/front/node_modules/@babel/types/lib/definitions/utils.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/index-legacy.d.ts +10 -10
- package/src/front/node_modules/@babel/types/lib/index.d.ts +12 -12
- package/src/front/node_modules/@babel/types/lib/index.js +84 -84
- package/src/front/node_modules/@babel/types/lib/index.js.flow +10 -10
- package/src/front/node_modules/@babel/types/lib/index.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js +2 -2
- package/src/front/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js +6 -6
- package/src/front/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/modifications/inherits.js +4 -4
- package/src/front/node_modules/@babel/types/lib/modifications/inherits.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js +4 -4
- package/src/front/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/modifications/removeProperties.js +2 -2
- package/src/front/node_modules/@babel/types/lib/modifications/removeProperties.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js +2 -2
- package/src/front/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js +6 -6
- package/src/front/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js +6 -6
- package/src/front/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js +1 -1
- package/src/front/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/traverse/traverse.js +2 -2
- package/src/front/node_modules/@babel/types/lib/traverse/traverse.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/traverse/traverseFast.js +2 -2
- package/src/front/node_modules/@babel/types/lib/traverse/traverseFast.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/utils/inherit.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js +3 -3
- package/src/front/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/generated/index.js +2 -2
- package/src/front/node_modules/@babel/types/lib/validators/generated/index.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/is.js +5 -5
- package/src/front/node_modules/@babel/types/lib/validators/is.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/isBinding.js +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/isBinding.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/isBlockScoped.js +3 -3
- package/src/front/node_modules/@babel/types/lib/validators/isBlockScoped.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/isImmutable.js +3 -3
- package/src/front/node_modules/@babel/types/lib/validators/isImmutable.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/isLet.js +3 -3
- package/src/front/node_modules/@babel/types/lib/validators/isLet.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/isNode.js +2 -2
- package/src/front/node_modules/@babel/types/lib/validators/isNode.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/isNodesEquivalent.js +3 -3
- package/src/front/node_modules/@babel/types/lib/validators/isNodesEquivalent.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/isPlaceholderType.js +2 -2
- package/src/front/node_modules/@babel/types/lib/validators/isPlaceholderType.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/isReferenced.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/isScope.js +4 -4
- package/src/front/node_modules/@babel/types/lib/validators/isScope.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/isSpecifierDefault.js +2 -2
- package/src/front/node_modules/@babel/types/lib/validators/isSpecifierDefault.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/isType.js +3 -3
- package/src/front/node_modules/@babel/types/lib/validators/isType.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/isValidES3Identifier.js +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/isValidES3Identifier.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/isVar.js +4 -4
- package/src/front/node_modules/@babel/types/lib/validators/isVar.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/matchesPattern.js +6 -6
- package/src/front/node_modules/@babel/types/lib/validators/matchesPattern.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/react/isReactComponent.js +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/react/isReactComponent.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/validate.js +3 -3
- package/src/front/node_modules/@babel/types/lib/validators/validate.js.map +1 -1
- package/src/front/node_modules/@babel/types/package.json +4 -4
- package/src/front/node_modules/typescript/lib/lib.decorators.d.ts +17 -0
- package/src/front/node_modules/typescript/lib/lib.dom.d.ts +313 -90
- package/src/front/node_modules/typescript/lib/lib.es2015.collection.d.ts +9 -9
- package/src/front/node_modules/typescript/lib/lib.es2015.core.d.ts +2 -2
- package/src/front/node_modules/typescript/lib/lib.es2015.iterable.d.ts +4 -4
- package/src/front/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +2 -2
- package/src/front/node_modules/typescript/lib/lib.es2017.d.ts +1 -0
- package/src/front/node_modules/typescript/lib/lib.es2017.date.d.ts +31 -0
- package/src/front/node_modules/typescript/lib/lib.es2020.bigint.d.ts +4 -4
- package/src/front/node_modules/typescript/lib/lib.es2021.weakref.d.ts +19 -16
- package/src/front/node_modules/typescript/lib/lib.es2023.array.d.ts +618 -36
- package/src/front/node_modules/typescript/lib/lib.es2023.collection.d.ts +21 -0
- package/src/front/node_modules/typescript/lib/lib.es2023.d.ts +1 -0
- package/src/front/node_modules/typescript/lib/lib.es5.d.ts +27 -18
- package/src/front/node_modules/typescript/lib/lib.esnext.d.ts +2 -0
- package/src/front/node_modules/typescript/lib/lib.esnext.decorators.d.ts +28 -0
- package/src/front/node_modules/typescript/lib/lib.esnext.disposable.d.ts +185 -0
- package/src/front/node_modules/typescript/lib/lib.webworker.d.ts +172 -33
- package/src/front/node_modules/typescript/lib/tsc.js +8311 -6557
- package/src/front/node_modules/typescript/lib/tsserver.js +11796 -9281
- package/src/front/node_modules/typescript/lib/tsserverlibrary.d.ts +287 -249
- package/src/front/node_modules/typescript/lib/tsserverlibrary.js +11801 -9288
- package/src/front/node_modules/typescript/lib/typescript.d.ts +274 -248
- package/src/front/node_modules/typescript/lib/typescript.js +11678 -9231
- package/src/front/node_modules/typescript/lib/typingsInstaller.js +1852 -1645
- package/src/front/node_modules/typescript/package.json +7 -7
- package/src/front/package-lock.json +144 -144
- package/src/front/src/components/inputs/FileInput.js +1 -0
- package/src/front/src/pages/Records.js +1 -0
- package/src/front/build/static/js/main.4ce5340d.chunk.js.map +0 -1
- package/src/front/node_modules/.cache/babel-loader/1dbf9b1b83cdf813e9dc5f561b9b97ac.json +0 -1
- package/src/front/node_modules/.cache/babel-loader/d88f947a76ac5f78797e69c737b6267e.json +0 -1
- package/src/front/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/c3/3e/f2b5b90044b7bdbb4cff67b2c09e24bb506274240d920de24bb4b678f3f00b80f7e9f0900cd1de883484031488d8603e97ea6b4e39a9c6ab5160353d3be9 +0 -1
- package/src/front/node_modules/@babel/parser/lib/options.js +0 -44
- package/src/front/node_modules/@babel/parser/lib/options.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/parse-error/credentials.js +0 -28
- package/src/front/node_modules/@babel/parser/lib/parse-error/credentials.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/parse-error/module-errors.js +0 -20
- package/src/front/node_modules/@babel/parser/lib/parse-error/module-errors.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/parse-error/pipeline-operator-errors.js +0 -32
- package/src/front/node_modules/@babel/parser/lib/parse-error/pipeline-operator-errors.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/parse-error/standard-errors.js +0 -220
- package/src/front/node_modules/@babel/parser/lib/parse-error/standard-errors.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/parse-error/strict-mode-errors.js +0 -22
- package/src/front/node_modules/@babel/parser/lib/parse-error/strict-mode-errors.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/parse-error/to-node-description.js +0 -39
- package/src/front/node_modules/@babel/parser/lib/parse-error/to-node-description.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/parse-error.js +0 -106
- package/src/front/node_modules/@babel/parser/lib/parse-error.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/parser/base.js +0 -36
- package/src/front/node_modules/@babel/parser/lib/parser/base.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/parser/comments.js +0 -190
- package/src/front/node_modules/@babel/parser/lib/parser/comments.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/parser/expression.js +0 -1824
- package/src/front/node_modules/@babel/parser/lib/parser/expression.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/parser/index.js +0 -43
- package/src/front/node_modules/@babel/parser/lib/parser/index.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/parser/lval.js +0 -421
- package/src/front/node_modules/@babel/parser/lib/parser/lval.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/parser/node.js +0 -127
- package/src/front/node_modules/@babel/parser/lib/parser/node.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/parser/statement.js +0 -2033
- package/src/front/node_modules/@babel/parser/lib/parser/statement.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/parser/util.js +0 -238
- package/src/front/node_modules/@babel/parser/lib/parser/util.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/plugin-utils.js +0 -136
- package/src/front/node_modules/@babel/parser/lib/plugin-utils.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/plugins/estree.js +0 -340
- package/src/front/node_modules/@babel/parser/lib/plugins/estree.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/plugins/flow/index.js +0 -2474
- package/src/front/node_modules/@babel/parser/lib/plugins/flow/index.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/plugins/flow/scope.js +0 -44
- package/src/front/node_modules/@babel/parser/lib/plugins/flow/scope.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/plugins/jsx/index.js +0 -444
- package/src/front/node_modules/@babel/parser/lib/plugins/jsx/index.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/plugins/jsx/xhtml.js +0 -266
- package/src/front/node_modules/@babel/parser/lib/plugins/jsx/xhtml.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/plugins/placeholders.js +0 -198
- package/src/front/node_modules/@babel/parser/lib/plugins/placeholders.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/plugins/typescript/index.js +0 -2656
- package/src/front/node_modules/@babel/parser/lib/plugins/typescript/index.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/plugins/typescript/scope.js +0 -121
- package/src/front/node_modules/@babel/parser/lib/plugins/typescript/scope.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/plugins/v8intrinsic.js +0 -31
- package/src/front/node_modules/@babel/parser/lib/plugins/v8intrinsic.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/tokenizer/context.js +0 -27
- package/src/front/node_modules/@babel/parser/lib/tokenizer/context.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/tokenizer/index.js +0 -1119
- package/src/front/node_modules/@babel/parser/lib/tokenizer/index.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/tokenizer/state.js +0 -82
- package/src/front/node_modules/@babel/parser/lib/tokenizer/state.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/tokenizer/types.js +0 -586
- package/src/front/node_modules/@babel/parser/lib/tokenizer/types.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/util/class-scope.js +0 -92
- package/src/front/node_modules/@babel/parser/lib/util/class-scope.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/util/expression-scope.js +0 -142
- package/src/front/node_modules/@babel/parser/lib/util/expression-scope.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/util/identifier.js +0 -62
- package/src/front/node_modules/@babel/parser/lib/util/identifier.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/util/location.js +0 -39
- package/src/front/node_modules/@babel/parser/lib/util/location.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/util/production-parameter.js +0 -49
- package/src/front/node_modules/@babel/parser/lib/util/production-parameter.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/util/scope.js +0 -161
- package/src/front/node_modules/@babel/parser/lib/util/scope.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/util/scopeflags.js +0 -67
- package/src/front/node_modules/@babel/parser/lib/util/scopeflags.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/util/whitespace.js +0 -59
- package/src/front/node_modules/@babel/parser/lib/util/whitespace.js.map +0 -1
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports.ClassScope = void 0;
|
|
7
|
-
var _scopeflags = require("./scopeflags");
|
|
8
|
-
var _parseError = require("../parse-error");
|
|
9
|
-
class ClassScope {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.privateNames = new Set();
|
|
12
|
-
this.loneAccessors = new Map();
|
|
13
|
-
this.undefinedPrivateNames = new Map();
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.ClassScope = ClassScope;
|
|
17
|
-
class ClassScopeHandler {
|
|
18
|
-
constructor(parser) {
|
|
19
|
-
this.parser = void 0;
|
|
20
|
-
this.stack = [];
|
|
21
|
-
this.undefinedPrivateNames = new Map();
|
|
22
|
-
this.parser = parser;
|
|
23
|
-
}
|
|
24
|
-
current() {
|
|
25
|
-
return this.stack[this.stack.length - 1];
|
|
26
|
-
}
|
|
27
|
-
enter() {
|
|
28
|
-
this.stack.push(new ClassScope());
|
|
29
|
-
}
|
|
30
|
-
exit() {
|
|
31
|
-
const oldClassScope = this.stack.pop();
|
|
32
|
-
const current = this.current();
|
|
33
|
-
for (const [name, loc] of Array.from(oldClassScope.undefinedPrivateNames)) {
|
|
34
|
-
if (current) {
|
|
35
|
-
if (!current.undefinedPrivateNames.has(name)) {
|
|
36
|
-
current.undefinedPrivateNames.set(name, loc);
|
|
37
|
-
}
|
|
38
|
-
} else {
|
|
39
|
-
this.parser.raise(_parseError.Errors.InvalidPrivateFieldResolution, {
|
|
40
|
-
at: loc,
|
|
41
|
-
identifierName: name
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
declarePrivateName(name, elementType, loc) {
|
|
47
|
-
const {
|
|
48
|
-
privateNames,
|
|
49
|
-
loneAccessors,
|
|
50
|
-
undefinedPrivateNames
|
|
51
|
-
} = this.current();
|
|
52
|
-
let redefined = privateNames.has(name);
|
|
53
|
-
if (elementType & _scopeflags.ClassElementType.KIND_ACCESSOR) {
|
|
54
|
-
const accessor = redefined && loneAccessors.get(name);
|
|
55
|
-
if (accessor) {
|
|
56
|
-
const oldStatic = accessor & _scopeflags.ClassElementType.FLAG_STATIC;
|
|
57
|
-
const newStatic = elementType & _scopeflags.ClassElementType.FLAG_STATIC;
|
|
58
|
-
const oldKind = accessor & _scopeflags.ClassElementType.KIND_ACCESSOR;
|
|
59
|
-
const newKind = elementType & _scopeflags.ClassElementType.KIND_ACCESSOR;
|
|
60
|
-
redefined = oldKind === newKind || oldStatic !== newStatic;
|
|
61
|
-
if (!redefined) loneAccessors.delete(name);
|
|
62
|
-
} else if (!redefined) {
|
|
63
|
-
loneAccessors.set(name, elementType);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
if (redefined) {
|
|
67
|
-
this.parser.raise(_parseError.Errors.PrivateNameRedeclaration, {
|
|
68
|
-
at: loc,
|
|
69
|
-
identifierName: name
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
privateNames.add(name);
|
|
73
|
-
undefinedPrivateNames.delete(name);
|
|
74
|
-
}
|
|
75
|
-
usePrivateName(name, loc) {
|
|
76
|
-
let classScope;
|
|
77
|
-
for (classScope of this.stack) {
|
|
78
|
-
if (classScope.privateNames.has(name)) return;
|
|
79
|
-
}
|
|
80
|
-
if (classScope) {
|
|
81
|
-
classScope.undefinedPrivateNames.set(name, loc);
|
|
82
|
-
} else {
|
|
83
|
-
this.parser.raise(_parseError.Errors.InvalidPrivateFieldResolution, {
|
|
84
|
-
at: loc,
|
|
85
|
-
identifierName: name
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
exports.default = ClassScopeHandler;
|
|
91
|
-
|
|
92
|
-
//# sourceMappingURL=class-scope.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_scopeflags","require","_parseError","ClassScope","constructor","privateNames","Set","loneAccessors","Map","undefinedPrivateNames","exports","ClassScopeHandler","parser","stack","current","length","enter","push","exit","oldClassScope","pop","name","loc","Array","from","has","set","raise","Errors","InvalidPrivateFieldResolution","at","identifierName","declarePrivateName","elementType","redefined","ClassElementType","KIND_ACCESSOR","accessor","get","oldStatic","FLAG_STATIC","newStatic","oldKind","newKind","delete","PrivateNameRedeclaration","add","usePrivateName","classScope","default"],"sources":["../../src/util/class-scope.ts"],"sourcesContent":["import { ClassElementType } from \"./scopeflags\";\nimport type { Position } from \"./location\";\nimport { Errors } from \"../parse-error\";\nimport type Tokenizer from \"../tokenizer\";\n\nexport class ClassScope {\n // A list of private named declared in the current class\n privateNames: Set<string> = new Set();\n\n // A list of private getters of setters without their counterpart\n loneAccessors: Map<string, ClassElementType> = new Map();\n\n // A list of private names used before being defined, mapping to\n // their position.\n undefinedPrivateNames: Map<string, Position> = new Map();\n}\n\nexport default class ClassScopeHandler {\n parser: Tokenizer;\n stack: Array<ClassScope> = [];\n undefinedPrivateNames: Map<string, Position> = new Map();\n\n constructor(parser: Tokenizer) {\n this.parser = parser;\n }\n\n current(): ClassScope {\n return this.stack[this.stack.length - 1];\n }\n\n enter() {\n this.stack.push(new ClassScope());\n }\n\n exit() {\n const oldClassScope = this.stack.pop();\n\n // Migrate the usage of not yet defined private names to the outer\n // class scope, or raise an error if we reached the top-level scope.\n\n const current = this.current();\n\n // Array.from is needed because this is compiled to an array-like for loop\n for (const [name, loc] of Array.from(oldClassScope.undefinedPrivateNames)) {\n if (current) {\n if (!current.undefinedPrivateNames.has(name)) {\n current.undefinedPrivateNames.set(name, loc);\n }\n } else {\n this.parser.raise(Errors.InvalidPrivateFieldResolution, {\n at: loc,\n identifierName: name,\n });\n }\n }\n }\n\n declarePrivateName(\n name: string,\n elementType: ClassElementType,\n loc: Position,\n ) {\n const { privateNames, loneAccessors, undefinedPrivateNames } =\n this.current();\n let redefined = privateNames.has(name);\n\n if (elementType & ClassElementType.KIND_ACCESSOR) {\n const accessor = redefined && loneAccessors.get(name);\n if (accessor) {\n const oldStatic = accessor & ClassElementType.FLAG_STATIC;\n const newStatic = elementType & ClassElementType.FLAG_STATIC;\n\n const oldKind = accessor & ClassElementType.KIND_ACCESSOR;\n const newKind = elementType & ClassElementType.KIND_ACCESSOR;\n\n // The private name can be duplicated only if it is used by\n // two accessors with different kind (get and set), and if\n // they have the same placement (static or not).\n redefined = oldKind === newKind || oldStatic !== newStatic;\n\n if (!redefined) loneAccessors.delete(name);\n } else if (!redefined) {\n loneAccessors.set(name, elementType);\n }\n }\n\n if (redefined) {\n this.parser.raise(Errors.PrivateNameRedeclaration, {\n at: loc,\n identifierName: name,\n });\n }\n\n privateNames.add(name);\n undefinedPrivateNames.delete(name);\n }\n\n usePrivateName(name: string, loc: Position) {\n let classScope;\n for (classScope of this.stack) {\n if (classScope.privateNames.has(name)) return;\n }\n\n if (classScope) {\n classScope.undefinedPrivateNames.set(name, loc);\n } else {\n // top-level\n this.parser.raise(Errors.InvalidPrivateFieldResolution, {\n at: loc,\n identifierName: name,\n });\n }\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AAGO,MAAME,UAAU,CAAC;EAAAC,YAAA;IAAA,KAEtBC,YAAY,GAAgB,IAAIC,GAAG,CAAC,CAAC;IAAA,KAGrCC,aAAa,GAAkC,IAAIC,GAAG,CAAC,CAAC;IAAA,KAIxDC,qBAAqB,GAA0B,IAAID,GAAG,CAAC,CAAC;EAAA;AAC1D;AA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MACdA,UAAU,CAACvC,qBAAqB,CAACiB,GAAG,CAACL,IAAI,EAAEC,GAAG,CAAC;IACjD,CAAC,MAAM;MAEL,IAAI,CAACV,MAAM,CAACe,KAAK,CAACC,kBAAM,CAACC,6BAA6B,EAAE;QACtDC,EAAE,EAAER,GAAG;QACPS,cAAc,EAAEV;MAClB,CAAC,CAAC;IACJ;EACF;AACF;AAACX,OAAA,CAAAuC,OAAA,GAAAtC,iBAAA"}
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
exports.newArrowHeadScope = newArrowHeadScope;
|
|
8
|
-
exports.newAsyncArrowScope = newAsyncArrowScope;
|
|
9
|
-
exports.newExpressionScope = newExpressionScope;
|
|
10
|
-
exports.newParameterDeclarationScope = newParameterDeclarationScope;
|
|
11
|
-
var _parseError = require("../parse-error");
|
|
12
|
-
class ExpressionScope {
|
|
13
|
-
constructor(type = 0) {
|
|
14
|
-
this.type = type;
|
|
15
|
-
}
|
|
16
|
-
canBeArrowParameterDeclaration() {
|
|
17
|
-
return this.type === 2 || this.type === 1;
|
|
18
|
-
}
|
|
19
|
-
isCertainlyParameterDeclaration() {
|
|
20
|
-
return this.type === 3;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
class ArrowHeadParsingScope extends ExpressionScope {
|
|
24
|
-
constructor(type) {
|
|
25
|
-
super(type);
|
|
26
|
-
this.declarationErrors = new Map();
|
|
27
|
-
}
|
|
28
|
-
recordDeclarationError(ParsingErrorClass, {
|
|
29
|
-
at
|
|
30
|
-
}) {
|
|
31
|
-
const index = at.index;
|
|
32
|
-
this.declarationErrors.set(index, [ParsingErrorClass, at]);
|
|
33
|
-
}
|
|
34
|
-
clearDeclarationError(index) {
|
|
35
|
-
this.declarationErrors.delete(index);
|
|
36
|
-
}
|
|
37
|
-
iterateErrors(iterator) {
|
|
38
|
-
this.declarationErrors.forEach(iterator);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
class ExpressionScopeHandler {
|
|
42
|
-
constructor(parser) {
|
|
43
|
-
this.parser = void 0;
|
|
44
|
-
this.stack = [new ExpressionScope()];
|
|
45
|
-
this.parser = parser;
|
|
46
|
-
}
|
|
47
|
-
enter(scope) {
|
|
48
|
-
this.stack.push(scope);
|
|
49
|
-
}
|
|
50
|
-
exit() {
|
|
51
|
-
this.stack.pop();
|
|
52
|
-
}
|
|
53
|
-
recordParameterInitializerError(toParseError, {
|
|
54
|
-
at: node
|
|
55
|
-
}) {
|
|
56
|
-
const origin = {
|
|
57
|
-
at: node.loc.start
|
|
58
|
-
};
|
|
59
|
-
const {
|
|
60
|
-
stack
|
|
61
|
-
} = this;
|
|
62
|
-
let i = stack.length - 1;
|
|
63
|
-
let scope = stack[i];
|
|
64
|
-
while (!scope.isCertainlyParameterDeclaration()) {
|
|
65
|
-
if (scope.canBeArrowParameterDeclaration()) {
|
|
66
|
-
scope.recordDeclarationError(toParseError, origin);
|
|
67
|
-
} else {
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
scope = stack[--i];
|
|
71
|
-
}
|
|
72
|
-
this.parser.raise(toParseError, origin);
|
|
73
|
-
}
|
|
74
|
-
recordArrowParameterBindingError(error, {
|
|
75
|
-
at: node
|
|
76
|
-
}) {
|
|
77
|
-
const {
|
|
78
|
-
stack
|
|
79
|
-
} = this;
|
|
80
|
-
const scope = stack[stack.length - 1];
|
|
81
|
-
const origin = {
|
|
82
|
-
at: node.loc.start
|
|
83
|
-
};
|
|
84
|
-
if (scope.isCertainlyParameterDeclaration()) {
|
|
85
|
-
this.parser.raise(error, origin);
|
|
86
|
-
} else if (scope.canBeArrowParameterDeclaration()) {
|
|
87
|
-
scope.recordDeclarationError(error, origin);
|
|
88
|
-
} else {
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
recordAsyncArrowParametersError({
|
|
93
|
-
at
|
|
94
|
-
}) {
|
|
95
|
-
const {
|
|
96
|
-
stack
|
|
97
|
-
} = this;
|
|
98
|
-
let i = stack.length - 1;
|
|
99
|
-
let scope = stack[i];
|
|
100
|
-
while (scope.canBeArrowParameterDeclaration()) {
|
|
101
|
-
if (scope.type === 2) {
|
|
102
|
-
scope.recordDeclarationError(_parseError.Errors.AwaitBindingIdentifier, {
|
|
103
|
-
at
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
scope = stack[--i];
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
validateAsPattern() {
|
|
110
|
-
const {
|
|
111
|
-
stack
|
|
112
|
-
} = this;
|
|
113
|
-
const currentScope = stack[stack.length - 1];
|
|
114
|
-
if (!currentScope.canBeArrowParameterDeclaration()) return;
|
|
115
|
-
currentScope.iterateErrors(([toParseError, loc]) => {
|
|
116
|
-
this.parser.raise(toParseError, {
|
|
117
|
-
at: loc
|
|
118
|
-
});
|
|
119
|
-
let i = stack.length - 2;
|
|
120
|
-
let scope = stack[i];
|
|
121
|
-
while (scope.canBeArrowParameterDeclaration()) {
|
|
122
|
-
scope.clearDeclarationError(loc.index);
|
|
123
|
-
scope = stack[--i];
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
exports.default = ExpressionScopeHandler;
|
|
129
|
-
function newParameterDeclarationScope() {
|
|
130
|
-
return new ExpressionScope(3);
|
|
131
|
-
}
|
|
132
|
-
function newArrowHeadScope() {
|
|
133
|
-
return new ArrowHeadParsingScope(1);
|
|
134
|
-
}
|
|
135
|
-
function newAsyncArrowScope() {
|
|
136
|
-
return new ArrowHeadParsingScope(2);
|
|
137
|
-
}
|
|
138
|
-
function newExpressionScope() {
|
|
139
|
-
return new ExpressionScope();
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
//# sourceMappingURL=expression-scope.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_parseError","require","ExpressionScope","constructor","type","canBeArrowParameterDeclaration","isCertainlyParameterDeclaration","ArrowHeadParsingScope","declarationErrors","Map","recordDeclarationError","ParsingErrorClass","at","index","set","clearDeclarationError","delete","iterateErrors","iterator","forEach","ExpressionScopeHandler","parser","stack","enter","scope","push","exit","pop","recordParameterInitializerError","toParseError","node","origin","loc","start","i","length","raise","recordArrowParameterBindingError","error","recordAsyncArrowParametersError","Errors","AwaitBindingIdentifier","validateAsPattern","currentScope","exports","default","newParameterDeclarationScope","newArrowHeadScope","newAsyncArrowScope","newExpressionScope"],"sources":["../../src/util/expression-scope.ts"],"sourcesContent":["import { Errors, type ParseErrorConstructor } from \"../parse-error\";\nimport type { Position } from \"./location\";\nimport type { Node } from \"../types\";\nimport type Tokenizer from \"../tokenizer\";\n\n/**\n * @module util/expression-scope\n\nExpressionScope is used to track declaration errors in these ambiguous patterns:\n\n- CoverParenthesizedExpressionAndArrowParameterList\n e.g. we don't know if `({ x })` is an parenthesized expression or an\n arrow function parameters until we see an `=>` after `)`.\n\n- CoverCallExpressionAndAsyncArrowHead\n e.g. we don't know if `async({ x })` is a call expression or an async arrow\n function parameters until we see an `=>` after `)`\n\nThe following declaration errors (@see parser-errors/standard) will be recorded in\nsome expression scopes and thrown later when we know what the ambiguous pattern is\n\n- AwaitBindingIdentifier\n- AwaitExpressionFormalParameter\n- YieldInParameter\n- InvalidParenthesizedAssignment when parenthesized is an identifier\n\nThere are four different expression scope\n- Expression\n A general scope that represents program / function body / static block. No errors\n will be recorded nor thrown in this scope.\n\n- MaybeArrowParameterDeclaration\n A scope that represents ambiguous arrow head e.g. `(x)`. Errors will be recorded\n alongside parent scopes and thrown when `ExpressionScopeHandler#validateAsPattern`\n is called.\n\n- MaybeAsyncArrowParameterDeclaration\n A scope that represents ambiguous async arrow head e.g. `async(x)`. Errors will\n be recorded alongside parent scopes and thrown when\n `ExpressionScopeHandler#validateAsPattern` is called.\n\n- ParameterDeclaration\n A scope that represents unambiguous function parameters `function(x)`. Errors\n recorded in this scope will be thrown immediately. No errors will be recorded in\n this scope.\n\n// @see {@link https://docs.google.com/document/d/1FAvEp9EUK-G8kHfDIEo_385Hs2SUBCYbJ5H-NnLvq8M|V8 Expression Scope design docs}\n */\n\nconst enum ExpressionScopeType {\n kExpression = 0,\n kMaybeArrowParameterDeclaration = 1,\n kMaybeAsyncArrowParameterDeclaration = 2,\n kParameterDeclaration = 3,\n}\n\nclass ExpressionScope {\n declare type: ExpressionScopeType;\n\n constructor(type: ExpressionScopeType = ExpressionScopeType.kExpression) {\n this.type = type;\n }\n\n canBeArrowParameterDeclaration(): this is ArrowHeadParsingScope {\n return (\n this.type === ExpressionScopeType.kMaybeAsyncArrowParameterDeclaration ||\n this.type === ExpressionScopeType.kMaybeArrowParameterDeclaration\n );\n }\n\n isCertainlyParameterDeclaration() {\n return this.type === ExpressionScopeType.kParameterDeclaration;\n }\n}\n\ntype ArrowHeadParsingParameterInitializerError =\n | typeof Errors.AwaitExpressionFormalParameter\n | typeof Errors.YieldInParameter;\ntype ArrowHeadParsingDeclarationError =\n | ArrowHeadParsingParameterInitializerError\n | typeof Errors.InvalidParenthesizedAssignment\n | typeof Errors.AwaitBindingIdentifier;\n\nclass ArrowHeadParsingScope extends ExpressionScope {\n declarationErrors: Map<number, [ParseErrorConstructor<{}>, Position]> =\n new Map();\n constructor(\n type:\n | ExpressionScopeType.kMaybeArrowParameterDeclaration\n | ExpressionScopeType.kMaybeAsyncArrowParameterDeclaration,\n ) {\n super(type);\n }\n recordDeclarationError(\n ParsingErrorClass: ParseErrorConstructor<{}>,\n {\n at,\n }: {\n at: Position;\n },\n ) {\n const index = at.index;\n\n this.declarationErrors.set(index, [ParsingErrorClass, at]);\n }\n clearDeclarationError(index: number) {\n this.declarationErrors.delete(index);\n }\n iterateErrors(\n iterator: (a: [ArrowHeadParsingDeclarationError, Position]) => void,\n ) {\n this.declarationErrors.forEach(iterator);\n }\n}\n\nexport default class ExpressionScopeHandler {\n parser: Tokenizer;\n stack: Array<ExpressionScope> = [new ExpressionScope()];\n\n constructor(parser: Tokenizer) {\n this.parser = parser;\n }\n enter(scope: ExpressionScope) {\n this.stack.push(scope);\n }\n\n exit() {\n this.stack.pop();\n }\n\n /**\n * Record likely parameter initializer errors\n *\n * When current scope is a ParameterDeclaration, the error will be thrown immediately,\n * otherwise it will be recorded to any ancestry MaybeArrowParameterDeclaration and\n * MaybeAsyncArrowParameterDeclaration scope until an Expression scope is seen.\n */\n recordParameterInitializerError(\n toParseError: ArrowHeadParsingParameterInitializerError,\n {\n at: node,\n }: {\n at: Node;\n },\n ): void {\n const origin = { at: node.loc.start };\n const { stack } = this;\n let i = stack.length - 1;\n let scope: ExpressionScope = stack[i];\n while (!scope.isCertainlyParameterDeclaration()) {\n if (scope.canBeArrowParameterDeclaration()) {\n scope.recordDeclarationError(toParseError, origin);\n } else {\n /*:: invariant(scope.type == ExpressionScopeType.kExpression) */\n // Type-Expression is the boundary where initializer error can populate to\n return;\n }\n scope = stack[--i];\n }\n this.parser.raise(toParseError, origin);\n }\n\n /**\n * Record errors that must be thrown if the current pattern ends up being an arrow\n * function parameter. This is used to record parenthesized identifiers, and to record\n * \"a as T\" and \"<T> a\" type assertions when parsing typescript.\n *\n * A parenthesized identifier (or type assertion) in LHS can be ambiguous because the assignment\n * can be transformed to an assignable later, but not vice versa:\n * For example, in `([(a) = []] = []) => {}`, we think `(a) = []` is an LHS in `[(a) = []]`,\n * an LHS within `[(a) = []] = []`. However the LHS chain is then transformed by toAssignable,\n * and we should throw assignment `(a)`, which is only valid in LHS. Hence we record the\n * location of parenthesized `(a)` to current scope if it is one of MaybeArrowParameterDeclaration\n * and MaybeAsyncArrowParameterDeclaration\n *\n * Unlike `recordParameterInitializerError`, we don't record to ancestry scope because we\n * validate arrow head parsing scope before exit, and then the LHS will be unambiguous:\n * For example, in `( x = ( [(a) = []] = [] ) ) => {}`, we should not record `(a)` in `( x = ... ) =>`\n * arrow scope because when we finish parsing `( [(a) = []] = [] )`, it is an unambiguous assignment\n * expression and can not be cast to pattern\n */\n recordArrowParameterBindingError(\n error: ParseErrorConstructor<{}>,\n {\n at: node,\n }: {\n at: Node;\n },\n ): void {\n const { stack } = this;\n const scope: ExpressionScope = stack[stack.length - 1];\n const origin = { at: node.loc.start };\n if (scope.isCertainlyParameterDeclaration()) {\n this.parser.raise(error, origin);\n } else if (scope.canBeArrowParameterDeclaration()) {\n scope.recordDeclarationError(error, origin);\n } else {\n return;\n }\n }\n\n /**\n * Record likely async arrow parameter errors\n *\n * Errors will be recorded to any ancestry MaybeAsyncArrowParameterDeclaration\n * scope until an Expression scope is seen.\n */\n recordAsyncArrowParametersError({ at }: { at: Position }): void {\n const { stack } = this;\n let i = stack.length - 1;\n let scope: ExpressionScope = stack[i];\n while (scope.canBeArrowParameterDeclaration()) {\n if (\n scope.type === ExpressionScopeType.kMaybeAsyncArrowParameterDeclaration\n ) {\n scope.recordDeclarationError(Errors.AwaitBindingIdentifier, { at });\n }\n scope = stack[--i];\n }\n }\n\n validateAsPattern(): void {\n const { stack } = this;\n const currentScope = stack[stack.length - 1];\n if (!currentScope.canBeArrowParameterDeclaration()) return;\n currentScope.iterateErrors(([toParseError, loc]) => {\n this.parser.raise(toParseError, { at: loc });\n // iterate from parent scope\n let i = stack.length - 2;\n let scope = stack[i];\n while (scope.canBeArrowParameterDeclaration()) {\n scope.clearDeclarationError(loc.index);\n scope = stack[--i];\n }\n });\n }\n}\n\nexport function newParameterDeclarationScope() {\n return new ExpressionScope(ExpressionScopeType.kParameterDeclaration);\n}\n\nexport function newArrowHeadScope() {\n return new ArrowHeadParsingScope(\n ExpressionScopeType.kMaybeArrowParameterDeclaration,\n );\n}\n\nexport function newAsyncArrowScope() {\n return new ArrowHeadParsingScope(\n ExpressionScopeType.kMaybeAsyncArrowParameterDeclaration,\n );\n}\n\nexport function newExpressionScope() {\n return new ExpressionScope();\n}\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,WAAA,GA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AO,IAAI5C,eAAe,EAA0C,CAAC;AACvE;AAEO,SAAS6C,iBAAiBA,CAAA,EAAG;EAClC,OAAO,IAAIxC,qBAAqB,EAEhC,CAAC;AACH;AAEO,SAASyC,kBAAkBA,CAAA,EAAG;EACnC,OAAO,IAAIzC,qBAAqB,EAEhC,CAAC;AACH;AAEO,SAAS0C,kBAAkBA,CAAA,EAAG;EACnC,OAAO,IAAI/C,eAAe,CAAC,CAAC;AAC9B"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.canBeReservedWord = canBeReservedWord;
|
|
7
|
-
Object.defineProperty(exports, "isIdentifierChar", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function () {
|
|
10
|
-
return _helperValidatorIdentifier.isIdentifierChar;
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
Object.defineProperty(exports, "isIdentifierStart", {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function () {
|
|
16
|
-
return _helperValidatorIdentifier.isIdentifierStart;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
exports.isIteratorStart = isIteratorStart;
|
|
20
|
-
Object.defineProperty(exports, "isKeyword", {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
get: function () {
|
|
23
|
-
return _helperValidatorIdentifier.isKeyword;
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
Object.defineProperty(exports, "isReservedWord", {
|
|
27
|
-
enumerable: true,
|
|
28
|
-
get: function () {
|
|
29
|
-
return _helperValidatorIdentifier.isReservedWord;
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
get: function () {
|
|
35
|
-
return _helperValidatorIdentifier.isStrictBindOnlyReservedWord;
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
Object.defineProperty(exports, "isStrictBindReservedWord", {
|
|
39
|
-
enumerable: true,
|
|
40
|
-
get: function () {
|
|
41
|
-
return _helperValidatorIdentifier.isStrictBindReservedWord;
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
Object.defineProperty(exports, "isStrictReservedWord", {
|
|
45
|
-
enumerable: true,
|
|
46
|
-
get: function () {
|
|
47
|
-
return _helperValidatorIdentifier.isStrictReservedWord;
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
exports.keywordRelationalOperator = void 0;
|
|
51
|
-
var _helperValidatorIdentifier = require("@babel/helper-validator-identifier");
|
|
52
|
-
const keywordRelationalOperator = /^in(stanceof)?$/;
|
|
53
|
-
exports.keywordRelationalOperator = keywordRelationalOperator;
|
|
54
|
-
function isIteratorStart(current, next, next2) {
|
|
55
|
-
return current === 64 && next === 64 && (0, _helperValidatorIdentifier.isIdentifierStart)(next2);
|
|
56
|
-
}
|
|
57
|
-
const reservedWordLikeSet = new Set(["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", "implements", "interface", "let", "package", "private", "protected", "public", "static", "yield", "eval", "arguments", "enum", "await"]);
|
|
58
|
-
function canBeReservedWord(word) {
|
|
59
|
-
return reservedWordLikeSet.has(word);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
//# sourceMappingURL=identifier.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_helperValidatorIdentifier","require","keywordRelationalOperator","exports","isIteratorStart","current","next","next2","isIdentifierStart","reservedWordLikeSet","Set","canBeReservedWord","word","has"],"sources":["../../src/util/identifier.ts"],"sourcesContent":["/* eslint max-len: 0 */\n\nimport * as charCodes from \"charcodes\";\nimport { isIdentifierStart } from \"@babel/helper-validator-identifier\";\n\nexport {\n isIdentifierStart,\n isIdentifierChar,\n isReservedWord,\n isStrictBindOnlyReservedWord,\n isStrictBindReservedWord,\n isStrictReservedWord,\n isKeyword,\n} from \"@babel/helper-validator-identifier\";\n\nexport const keywordRelationalOperator = /^in(stanceof)?$/;\n\n// Test whether a current state character code and next character code is @\n\nexport function isIteratorStart(\n current: number,\n next: number,\n next2: number,\n): boolean {\n return (\n current === charCodes.atSign &&\n next === charCodes.atSign &&\n isIdentifierStart(next2)\n );\n}\n\n// This is the comprehensive set of JavaScript reserved words\n// If a word is in this set, it could be a reserved word,\n// depending on sourceType/strictMode/binding info. In other words\n// if a word is not in this set, it is not a reserved word under\n// any circumstance.\nconst reservedWordLikeSet = new Set([\n \"break\",\n \"case\",\n \"catch\",\n \"continue\",\n \"debugger\",\n \"default\",\n \"do\",\n \"else\",\n \"finally\",\n \"for\",\n \"function\",\n \"if\",\n \"return\",\n \"switch\",\n \"throw\",\n \"try\",\n \"var\",\n \"const\",\n \"while\",\n \"with\",\n \"new\",\n \"this\",\n \"super\",\n \"class\",\n \"extends\",\n \"export\",\n \"import\",\n \"null\",\n \"true\",\n \"false\",\n \"in\",\n \"instanceof\",\n \"typeof\",\n \"void\",\n \"delete\",\n // strict\n \"implements\",\n \"interface\",\n \"let\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"static\",\n \"yield\",\n // strictBind\n \"eval\",\n \"arguments\",\n // reservedWorkLike\n \"enum\",\n \"await\",\n]);\n\nexport function canBeReservedWord(word: string): boolean {\n return reservedWordLikeSet.has(word);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,0BAAA,GAAAC,OAAA;AAYO,MAAMC,yBAAyB,GAAG,iBAAiB;AAACC,OAAA,CAAAD,yBAAA,GAAAA,yBAAA;AAIpD,SAASE,eAAeA,CAC7BC,OAAe,EACfC,IAAY,EACZC,KAAa,EACJ;EACT,OACEF,OAAO,OAAqB,IAC5BC,IAAI,OAAqB,IACzB,IAAAE,4CAAiB,EAACD,KAAK,CAAC;AAE5B;AAOA,MAAME,mBAAmB,GAAG,IAAIC,GAAG,CAAC,CAClC,OAAO,EACP,MAAM,EACN,OAAO,EACP,UAAU,EACV,UAAU,EACV,SAAS,EACT,IAAI,EACJ,MAAM,EACN,SAAS,EACT,KAAK,EACL,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,KAAK,EACL,KAAK,EACL,OAAO,EACP,OAAO,EACP,MAAM,EACN,KAAK,EACL,MAAM,EACN,OAAO,EACP,OAAO,EACP,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,MAAM,EACN,OAAO,EACP,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,QAAQ,EAER,YAAY,EACZ,WAAW,EACX,KAAK,EACL,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,OAAO,EAEP,MAAM,EACN,WAAW,EAEX,MAAM,EACN,OAAO,CACR,CAAC;AAEK,SAASC,iBAAiBA,CAACC,IAAY,EAAW;EACvD,OAAOH,mBAAmB,CAACI,GAAG,CAACD,IAAI,CAAC;AACtC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.SourceLocation = exports.Position = void 0;
|
|
7
|
-
exports.createPositionWithColumnOffset = createPositionWithColumnOffset;
|
|
8
|
-
class Position {
|
|
9
|
-
constructor(line, col, index) {
|
|
10
|
-
this.line = void 0;
|
|
11
|
-
this.column = void 0;
|
|
12
|
-
this.index = void 0;
|
|
13
|
-
this.line = line;
|
|
14
|
-
this.column = col;
|
|
15
|
-
this.index = index;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
exports.Position = Position;
|
|
19
|
-
class SourceLocation {
|
|
20
|
-
constructor(start, end) {
|
|
21
|
-
this.start = void 0;
|
|
22
|
-
this.end = void 0;
|
|
23
|
-
this.filename = void 0;
|
|
24
|
-
this.identifierName = void 0;
|
|
25
|
-
this.start = start;
|
|
26
|
-
this.end = end;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
exports.SourceLocation = SourceLocation;
|
|
30
|
-
function createPositionWithColumnOffset(position, columnOffset) {
|
|
31
|
-
const {
|
|
32
|
-
line,
|
|
33
|
-
column,
|
|
34
|
-
index
|
|
35
|
-
} = position;
|
|
36
|
-
return new Position(line, column + columnOffset, index + columnOffset);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
//# sourceMappingURL=location.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["Position","constructor","line","col","index","column","exports","SourceLocation","start","end","filename","identifierName","createPositionWithColumnOffset","position","columnOffset"],"sources":["../../src/util/location.ts"],"sourcesContent":["export type Pos = {\n start: number;\n};\n\n// These are used when `options.locations` is on, for the\n// `startLoc` and `endLoc` properties.\n\nexport class Position {\n line: number;\n column: number;\n index: number;\n\n constructor(line: number, col: number, index: number) {\n this.line = line;\n this.column = col;\n this.index = index;\n }\n}\n\nexport class SourceLocation {\n start: Position;\n end: Position;\n filename: string;\n identifierName: string | undefined | null;\n\n constructor(start: Position, end?: Position) {\n this.start = start;\n // (may start as null, but initialized later)\n this.end = end;\n }\n}\n\n/**\n * creates a new position with a non-zero column offset from the given position.\n * This function should be only be used when we create AST node out of the token\n * boundaries, such as TemplateElement ends before tt.templateNonTail. This\n * function does not skip whitespaces.\n */\nexport function createPositionWithColumnOffset(\n position: Position,\n columnOffset: number,\n) {\n const { line, column, index } = position;\n return new Position(line, column + columnOffset, index + columnOffset);\n}\n"],"mappings":";;;;;;;AAOO,MAAMA,QAAQ,CAAC;EAKpBC,WAAWA,CAACC,IAAY,EAAEC,GAAW,EAAEC,KAAa,EAAE;IAAA,KAJtDF,IAAI;IAAA,KACJG,MAAM;IAAA,KACND,KAAK;IAGH,IAAI,CAACF,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACG,MAAM,GAAGF,GAAG;IACjB,IAAI,CAACC,KAAK,GAAGA,KAAK;EACpB;AACF;AAACE,OAAA,CAAAN,QAAA,GAAAA,QAAA;AAEM,MAAMO,cAAc,CAAC;EAM1BN,WAAWA,CAACO,KAAe,EAAEC,GAAc,EAAE;IAAA,KAL7CD,KAAK;IAAA,KACLC,GAAG;IAAA,KACHC,QAAQ;IAAA,KACRC,cAAc;IAGZ,IAAI,CAACH,KAAK,GAAGA,KAAK;IAElB,IAAI,CAACC,GAAG,GAAGA,GAAG;EAChB;AACF;AAACH,OAAA,CAAAC,cAAA,GAAAA,cAAA;AAQM,SAASK,8BAA8BA,CAC5CC,QAAkB,EAClBC,YAAoB,EACpB;EACA,MAAM;IAAEZ,IAAI;IAAEG,MAAM;IAAED;EAAM,CAAC,GAAGS,QAAQ;EACxC,OAAO,IAAIb,QAAQ,CAACE,IAAI,EAAEG,MAAM,GAAGS,YAAY,EAAEV,KAAK,GAAGU,YAAY,CAAC;AACxE"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports.PARAM_YIELD = exports.PARAM_RETURN = exports.PARAM_IN = exports.PARAM_AWAIT = exports.PARAM = void 0;
|
|
7
|
-
exports.functionFlags = functionFlags;
|
|
8
|
-
const PARAM = 0b0000,
|
|
9
|
-
PARAM_YIELD = 0b0001,
|
|
10
|
-
PARAM_AWAIT = 0b0010,
|
|
11
|
-
PARAM_RETURN = 0b0100,
|
|
12
|
-
PARAM_IN = 0b1000;
|
|
13
|
-
exports.PARAM_IN = PARAM_IN;
|
|
14
|
-
exports.PARAM_RETURN = PARAM_RETURN;
|
|
15
|
-
exports.PARAM_AWAIT = PARAM_AWAIT;
|
|
16
|
-
exports.PARAM_YIELD = PARAM_YIELD;
|
|
17
|
-
exports.PARAM = PARAM;
|
|
18
|
-
class ProductionParameterHandler {
|
|
19
|
-
constructor() {
|
|
20
|
-
this.stacks = [];
|
|
21
|
-
}
|
|
22
|
-
enter(flags) {
|
|
23
|
-
this.stacks.push(flags);
|
|
24
|
-
}
|
|
25
|
-
exit() {
|
|
26
|
-
this.stacks.pop();
|
|
27
|
-
}
|
|
28
|
-
currentFlags() {
|
|
29
|
-
return this.stacks[this.stacks.length - 1];
|
|
30
|
-
}
|
|
31
|
-
get hasAwait() {
|
|
32
|
-
return (this.currentFlags() & PARAM_AWAIT) > 0;
|
|
33
|
-
}
|
|
34
|
-
get hasYield() {
|
|
35
|
-
return (this.currentFlags() & PARAM_YIELD) > 0;
|
|
36
|
-
}
|
|
37
|
-
get hasReturn() {
|
|
38
|
-
return (this.currentFlags() & PARAM_RETURN) > 0;
|
|
39
|
-
}
|
|
40
|
-
get hasIn() {
|
|
41
|
-
return (this.currentFlags() & PARAM_IN) > 0;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
exports.default = ProductionParameterHandler;
|
|
45
|
-
function functionFlags(isAsync, isGenerator) {
|
|
46
|
-
return (isAsync ? PARAM_AWAIT : 0) | (isGenerator ? PARAM_YIELD : 0);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
//# sourceMappingURL=production-parameter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["PARAM","PARAM_YIELD","PARAM_AWAIT","PARAM_RETURN","PARAM_IN","exports","ProductionParameterHandler","constructor","stacks","enter","flags","push","exit","pop","currentFlags","length","hasAwait","hasYield","hasReturn","hasIn","default","functionFlags","isAsync","isGenerator"],"sources":["../../src/util/production-parameter.ts"],"sourcesContent":["export const // Initial Parameter flags\n PARAM = 0b0000,\n // track [Yield] production parameter\n PARAM_YIELD = 0b0001,\n // track [Await] production parameter\n PARAM_AWAIT = 0b0010,\n // track [Return] production parameter\n PARAM_RETURN = 0b0100,\n PARAM_IN = 0b1000; // track [In] production parameter\n\n// ProductionParameterHandler is a stack fashioned production parameter tracker\n// https://tc39.es/ecma262/#sec-grammar-notation\n// The tracked parameters are defined above.\n//\n// Whenever [+Await]/[+Yield] appears in the right-hand sides of a production,\n// we must enter a new tracking stack. For example when parsing\n//\n// AsyncFunctionDeclaration [Yield, Await]:\n// async [no LineTerminator here] function BindingIdentifier[?Yield, ?Await]\n// ( FormalParameters[~Yield, +Await] ) { AsyncFunctionBody }\n//\n// we must follow such process:\n//\n// 1. parse async keyword\n// 2. parse function keyword\n// 3. parse bindingIdentifier <= inherit current parameters: [?Await]\n// 4. enter new stack with (PARAM_AWAIT)\n// 5. parse formal parameters <= must have [Await] parameter [+Await]\n// 6. parse function body\n// 7. exit current stack\n\nexport type ParamKind = number;\n\n// todo(flow->ts) - check if more granular type can be used,\n// type below is not good because things like PARAM_AWAIT|PARAM_YIELD are not included\n// export type ParamKind =\n// | typeof PARAM\n// | typeof PARAM_AWAIT\n// | typeof PARAM_IN\n// | typeof PARAM_RETURN\n// | typeof PARAM_YIELD;\n\nexport default class ProductionParameterHandler {\n stacks: Array<number> = [];\n enter(flags: number) {\n this.stacks.push(flags);\n }\n\n exit() {\n this.stacks.pop();\n }\n\n currentFlags(): number {\n return this.stacks[this.stacks.length - 1];\n }\n\n get hasAwait(): boolean {\n return (this.currentFlags() & PARAM_AWAIT) > 0;\n }\n\n get hasYield(): boolean {\n return (this.currentFlags() & PARAM_YIELD) > 0;\n }\n\n get hasReturn(): boolean {\n return (this.currentFlags() & PARAM_RETURN) > 0;\n }\n\n get hasIn(): boolean {\n return (this.currentFlags() & PARAM_IN) > 0;\n }\n}\n\nexport function functionFlags(\n isAsync: boolean,\n isGenerator: boolean,\n): ParamKind {\n return (isAsync ? PARAM_AWAIT : 0) | (isGenerator ? PARAM_YIELD : 0);\n}\n"],"mappings":";;;;;;;AAAO,MACLA,KAAK,GAAG,MAAM;EAEdC,WAAW,GAAG,MAAM;EAEpBC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W,GAAG,CAAC,KAAKqB,WAAW,GAAGtB,WAAW,GAAG,CAAC,CAAC;AACtE"}
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports.Scope = void 0;
|
|
7
|
-
var _scopeflags = require("./scopeflags");
|
|
8
|
-
var _parseError = require("../parse-error");
|
|
9
|
-
class Scope {
|
|
10
|
-
constructor(flags) {
|
|
11
|
-
this.var = new Set();
|
|
12
|
-
this.lexical = new Set();
|
|
13
|
-
this.functions = new Set();
|
|
14
|
-
this.flags = flags;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.Scope = Scope;
|
|
18
|
-
class ScopeHandler {
|
|
19
|
-
constructor(parser, inModule) {
|
|
20
|
-
this.parser = void 0;
|
|
21
|
-
this.scopeStack = [];
|
|
22
|
-
this.inModule = void 0;
|
|
23
|
-
this.undefinedExports = new Map();
|
|
24
|
-
this.parser = parser;
|
|
25
|
-
this.inModule = inModule;
|
|
26
|
-
}
|
|
27
|
-
get inTopLevel() {
|
|
28
|
-
return (this.currentScope().flags & _scopeflags.ScopeFlag.PROGRAM) > 0;
|
|
29
|
-
}
|
|
30
|
-
get inFunction() {
|
|
31
|
-
return (this.currentVarScopeFlags() & _scopeflags.ScopeFlag.FUNCTION) > 0;
|
|
32
|
-
}
|
|
33
|
-
get allowSuper() {
|
|
34
|
-
return (this.currentThisScopeFlags() & _scopeflags.ScopeFlag.SUPER) > 0;
|
|
35
|
-
}
|
|
36
|
-
get allowDirectSuper() {
|
|
37
|
-
return (this.currentThisScopeFlags() & _scopeflags.ScopeFlag.DIRECT_SUPER) > 0;
|
|
38
|
-
}
|
|
39
|
-
get inClass() {
|
|
40
|
-
return (this.currentThisScopeFlags() & _scopeflags.ScopeFlag.CLASS) > 0;
|
|
41
|
-
}
|
|
42
|
-
get inClassAndNotInNonArrowFunction() {
|
|
43
|
-
const flags = this.currentThisScopeFlags();
|
|
44
|
-
return (flags & _scopeflags.ScopeFlag.CLASS) > 0 && (flags & _scopeflags.ScopeFlag.FUNCTION) === 0;
|
|
45
|
-
}
|
|
46
|
-
get inStaticBlock() {
|
|
47
|
-
for (let i = this.scopeStack.length - 1;; i--) {
|
|
48
|
-
const {
|
|
49
|
-
flags
|
|
50
|
-
} = this.scopeStack[i];
|
|
51
|
-
if (flags & _scopeflags.ScopeFlag.STATIC_BLOCK) {
|
|
52
|
-
return true;
|
|
53
|
-
}
|
|
54
|
-
if (flags & (_scopeflags.ScopeFlag.VAR | _scopeflags.ScopeFlag.CLASS)) {
|
|
55
|
-
return false;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
get inNonArrowFunction() {
|
|
60
|
-
return (this.currentThisScopeFlags() & _scopeflags.ScopeFlag.FUNCTION) > 0;
|
|
61
|
-
}
|
|
62
|
-
get treatFunctionsAsVar() {
|
|
63
|
-
return this.treatFunctionsAsVarInScope(this.currentScope());
|
|
64
|
-
}
|
|
65
|
-
createScope(flags) {
|
|
66
|
-
return new Scope(flags);
|
|
67
|
-
}
|
|
68
|
-
enter(flags) {
|
|
69
|
-
this.scopeStack.push(this.createScope(flags));
|
|
70
|
-
}
|
|
71
|
-
exit() {
|
|
72
|
-
const scope = this.scopeStack.pop();
|
|
73
|
-
return scope.flags;
|
|
74
|
-
}
|
|
75
|
-
treatFunctionsAsVarInScope(scope) {
|
|
76
|
-
return !!(scope.flags & (_scopeflags.ScopeFlag.FUNCTION | _scopeflags.ScopeFlag.STATIC_BLOCK) || !this.parser.inModule && scope.flags & _scopeflags.ScopeFlag.PROGRAM);
|
|
77
|
-
}
|
|
78
|
-
declareName(name, bindingType, loc) {
|
|
79
|
-
let scope = this.currentScope();
|
|
80
|
-
if (bindingType & _scopeflags.BindingFlag.SCOPE_LEXICAL || bindingType & _scopeflags.BindingFlag.SCOPE_FUNCTION) {
|
|
81
|
-
this.checkRedeclarationInScope(scope, name, bindingType, loc);
|
|
82
|
-
if (bindingType & _scopeflags.BindingFlag.SCOPE_FUNCTION) {
|
|
83
|
-
scope.functions.add(name);
|
|
84
|
-
} else {
|
|
85
|
-
scope.lexical.add(name);
|
|
86
|
-
}
|
|
87
|
-
if (bindingType & _scopeflags.BindingFlag.SCOPE_LEXICAL) {
|
|
88
|
-
this.maybeExportDefined(scope, name);
|
|
89
|
-
}
|
|
90
|
-
} else if (bindingType & _scopeflags.BindingFlag.SCOPE_VAR) {
|
|
91
|
-
for (let i = this.scopeStack.length - 1; i >= 0; --i) {
|
|
92
|
-
scope = this.scopeStack[i];
|
|
93
|
-
this.checkRedeclarationInScope(scope, name, bindingType, loc);
|
|
94
|
-
scope.var.add(name);
|
|
95
|
-
this.maybeExportDefined(scope, name);
|
|
96
|
-
if (scope.flags & _scopeflags.ScopeFlag.VAR) break;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
if (this.parser.inModule && scope.flags & _scopeflags.ScopeFlag.PROGRAM) {
|
|
100
|
-
this.undefinedExports.delete(name);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
maybeExportDefined(scope, name) {
|
|
104
|
-
if (this.parser.inModule && scope.flags & _scopeflags.ScopeFlag.PROGRAM) {
|
|
105
|
-
this.undefinedExports.delete(name);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
checkRedeclarationInScope(scope, name, bindingType, loc) {
|
|
109
|
-
if (this.isRedeclaredInScope(scope, name, bindingType)) {
|
|
110
|
-
this.parser.raise(_parseError.Errors.VarRedeclaration, {
|
|
111
|
-
at: loc,
|
|
112
|
-
identifierName: name
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
isRedeclaredInScope(scope, name, bindingType) {
|
|
117
|
-
if (!(bindingType & _scopeflags.BindingFlag.KIND_VALUE)) return false;
|
|
118
|
-
if (bindingType & _scopeflags.BindingFlag.SCOPE_LEXICAL) {
|
|
119
|
-
return scope.lexical.has(name) || scope.functions.has(name) || scope.var.has(name);
|
|
120
|
-
}
|
|
121
|
-
if (bindingType & _scopeflags.BindingFlag.SCOPE_FUNCTION) {
|
|
122
|
-
return scope.lexical.has(name) || !this.treatFunctionsAsVarInScope(scope) && scope.var.has(name);
|
|
123
|
-
}
|
|
124
|
-
return scope.lexical.has(name) && !(scope.flags & _scopeflags.ScopeFlag.SIMPLE_CATCH && scope.lexical.values().next().value === name) || !this.treatFunctionsAsVarInScope(scope) && scope.functions.has(name);
|
|
125
|
-
}
|
|
126
|
-
checkLocalExport(id) {
|
|
127
|
-
const {
|
|
128
|
-
name
|
|
129
|
-
} = id;
|
|
130
|
-
const topLevelScope = this.scopeStack[0];
|
|
131
|
-
if (!topLevelScope.lexical.has(name) && !topLevelScope.var.has(name) && !topLevelScope.functions.has(name)) {
|
|
132
|
-
this.undefinedExports.set(name, id.loc.start);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
currentScope() {
|
|
136
|
-
return this.scopeStack[this.scopeStack.length - 1];
|
|
137
|
-
}
|
|
138
|
-
currentVarScopeFlags() {
|
|
139
|
-
for (let i = this.scopeStack.length - 1;; i--) {
|
|
140
|
-
const {
|
|
141
|
-
flags
|
|
142
|
-
} = this.scopeStack[i];
|
|
143
|
-
if (flags & _scopeflags.ScopeFlag.VAR) {
|
|
144
|
-
return flags;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
currentThisScopeFlags() {
|
|
149
|
-
for (let i = this.scopeStack.length - 1;; i--) {
|
|
150
|
-
const {
|
|
151
|
-
flags
|
|
152
|
-
} = this.scopeStack[i];
|
|
153
|
-
if (flags & (_scopeflags.ScopeFlag.VAR | _scopeflags.ScopeFlag.CLASS) && !(flags & _scopeflags.ScopeFlag.ARROW)) {
|
|
154
|
-
return flags;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
exports.default = ScopeHandler;
|
|
160
|
-
|
|
161
|
-
//# sourceMappingURL=scope.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_scopeflags","require","_parseError","Scope","constructor","flags","var","Set","lexical","functions","exports","ScopeHandler","parser","inModule","scopeStack","undefinedExports","Map","inTopLevel","currentScope","ScopeFlag","PROGRAM","inFunction","currentVarScopeFlags","FUNCTION","allowSuper","currentThisScopeFlags","SUPER","allowDirectSuper","DIRECT_SUPER","inClass","CLASS","inClassAndNotInNonArrowFunction","inStaticBlock","i","length","STATIC_BLOCK","VAR","inNonArrowFunction","treatFunctionsAsVar","treatFunctionsAsVarInScope","createScope","enter","push","exit","scope","pop","declareName","name","bindingType","loc","BindingFlag","SCOPE_LEXICAL","SCOPE_FUNCTION","checkRedeclarationInScope","add","maybeExportDefined","SCOPE_VAR","delete","isRedeclaredInScope","raise","Errors","VarRedeclaration","at","identifierName","KIND_VALUE","has","SIMPLE_CATCH","values","next","value","checkLocalExport","id","topLevelScope","set","start","ARROW","default"],"sources":["../../src/util/scope.ts"],"sourcesContent":["import { ScopeFlag, BindingFlag, type BindingTypes } from \"./scopeflags\";\nimport type { Position } from \"./location\";\nimport type * as N from \"../types\";\nimport { Errors } from \"../parse-error\";\nimport type Tokenizer from \"../tokenizer\";\n\n// Start an AST node, attaching a start offset.\nexport class Scope {\n declare flags: ScopeFlag;\n // A set of var-declared names in the current lexical scope\n var: Set<string> = new Set();\n // A set of lexically-declared names in the current lexical scope\n lexical: Set<string> = new Set();\n // A set of lexically-declared FunctionDeclaration names in the current lexical scope\n functions: Set<string> = new Set();\n\n constructor(flags: ScopeFlag) {\n this.flags = flags;\n }\n}\n\n// The functions in this module keep track of declared variables in the\n// current scope in order to detect duplicate variable names.\nexport default class ScopeHandler<IScope extends Scope = Scope> {\n parser: Tokenizer;\n scopeStack: Array<IScope> = [];\n inModule: boolean;\n undefinedExports: Map<string, Position> = new Map();\n\n constructor(parser: Tokenizer, inModule: boolean) {\n this.parser = parser;\n this.inModule = inModule;\n }\n\n get inTopLevel() {\n return (this.currentScope().flags & ScopeFlag.PROGRAM) > 0;\n }\n get inFunction() {\n return (this.currentVarScopeFlags() & ScopeFlag.FUNCTION) > 0;\n }\n get allowSuper() {\n return (this.currentThisScopeFlags() & ScopeFlag.SUPER) > 0;\n }\n get allowDirectSuper() {\n return (this.currentThisScopeFlags() & ScopeFlag.DIRECT_SUPER) > 0;\n }\n get inClass() {\n return (this.currentThisScopeFlags() & ScopeFlag.CLASS) > 0;\n }\n get inClassAndNotInNonArrowFunction() {\n const flags = this.currentThisScopeFlags();\n return (flags & ScopeFlag.CLASS) > 0 && (flags & ScopeFlag.FUNCTION) === 0;\n }\n get inStaticBlock() {\n for (let i = this.scopeStack.length - 1; ; i--) {\n const { flags } = this.scopeStack[i];\n if (flags & ScopeFlag.STATIC_BLOCK) {\n return true;\n }\n if (flags & (ScopeFlag.VAR | ScopeFlag.CLASS)) {\n // function body, module body, class property initializers\n return false;\n }\n }\n }\n get inNonArrowFunction() {\n return (this.currentThisScopeFlags() & ScopeFlag.FUNCTION) > 0;\n }\n get treatFunctionsAsVar() {\n return this.treatFunctionsAsVarInScope(this.currentScope());\n }\n\n createScope(flags: ScopeFlag): Scope {\n return new Scope(flags);\n }\n\n enter(flags: ScopeFlag) {\n /*:: +createScope: (flags:ScopeFlag) => IScope; */\n // @ts-expect-error This method will be overwritten by subclasses\n this.scopeStack.push(this.createScope(flags));\n }\n\n exit(): ScopeFlag {\n const scope = this.scopeStack.pop();\n return scope.flags;\n }\n\n // The spec says:\n // > At the top level of a function, or script, function declarations are\n // > treated like var declarations rather than like lexical declarations.\n treatFunctionsAsVarInScope(scope: IScope): boolean {\n return !!(\n scope.flags & (ScopeFlag.FUNCTION | ScopeFlag.STATIC_BLOCK) ||\n (!this.parser.inModule && scope.flags & ScopeFlag.PROGRAM)\n );\n }\n\n declareName(name: string, bindingType: BindingTypes, loc: Position) {\n let scope = this.currentScope();\n if (\n bindingType & BindingFlag.SCOPE_LEXICAL ||\n bindingType & BindingFlag.SCOPE_FUNCTION\n ) {\n this.checkRedeclarationInScope(scope, name, bindingType, loc);\n\n if (bindingType & BindingFlag.SCOPE_FUNCTION) {\n scope.functions.add(name);\n } else {\n scope.lexical.add(name);\n }\n\n if (bindingType & BindingFlag.SCOPE_LEXICAL) {\n this.maybeExportDefined(scope, name);\n }\n } else if (bindingType & BindingFlag.SCOPE_VAR) {\n for (let i = this.scopeStack.length - 1; i >= 0; --i) {\n scope = this.scopeStack[i];\n this.checkRedeclarationInScope(scope, name, bindingType, loc);\n scope.var.add(name);\n this.maybeExportDefined(scope, name);\n\n if (scope.flags & ScopeFlag.VAR) break;\n }\n }\n if (this.parser.inModule && scope.flags & ScopeFlag.PROGRAM) {\n this.undefinedExports.delete(name);\n }\n }\n\n maybeExportDefined(scope: IScope, name: string) {\n if (this.parser.inModule && scope.flags & ScopeFlag.PROGRAM) {\n this.undefinedExports.delete(name);\n }\n }\n\n checkRedeclarationInScope(\n scope: IScope,\n name: string,\n bindingType: BindingTypes,\n loc: Position,\n ) {\n if (this.isRedeclaredInScope(scope, name, bindingType)) {\n this.parser.raise(Errors.VarRedeclaration, {\n at: loc,\n identifierName: name,\n });\n }\n }\n\n isRedeclaredInScope(\n scope: IScope,\n name: string,\n bindingType: BindingTypes,\n ): boolean {\n if (!(bindingType & BindingFlag.KIND_VALUE)) return false;\n\n if (bindingType & BindingFlag.SCOPE_LEXICAL) {\n return (\n scope.lexical.has(name) ||\n scope.functions.has(name) ||\n scope.var.has(name)\n );\n }\n\n if (bindingType & BindingFlag.SCOPE_FUNCTION) {\n return (\n scope.lexical.has(name) ||\n (!this.treatFunctionsAsVarInScope(scope) && scope.var.has(name))\n );\n }\n\n return (\n (scope.lexical.has(name) &&\n // Annex B.3.4\n // https://tc39.es/ecma262/#sec-variablestatements-in-catch-blocks\n !(\n scope.flags & ScopeFlag.SIMPLE_CATCH &&\n scope.lexical.values().next().value === name\n )) ||\n (!this.treatFunctionsAsVarInScope(scope) && scope.functions.has(name))\n );\n }\n\n checkLocalExport(id: N.Identifier) {\n const { name } = id;\n const topLevelScope = this.scopeStack[0];\n if (\n !topLevelScope.lexical.has(name) &&\n !topLevelScope.var.has(name) &&\n // In strict mode, scope.functions will always be empty.\n // Modules are strict by default, but the `scriptMode` option\n // can overwrite this behavior.\n !topLevelScope.functions.has(name)\n ) {\n this.undefinedExports.set(name, id.loc.start);\n }\n }\n\n currentScope(): IScope {\n return this.scopeStack[this.scopeStack.length - 1];\n }\n\n currentVarScopeFlags(): ScopeFlag {\n for (let i = this.scopeStack.length - 1; ; i--) {\n const { flags } = this.scopeStack[i];\n if (flags & ScopeFlag.VAR) {\n return flags;\n }\n }\n }\n\n // Could be useful for `arguments`, `this`, `new.target`, `super()`, `super.property`, and `super[property]`.\n currentThisScopeFlags(): ScopeFlag {\n for (let i = this.scopeStack.length - 1; ; i--) {\n const { flags } = this.scopeStack[i];\n if (\n flags & (ScopeFlag.VAR | ScopeFlag.CLASS) &&\n !(flags & ScopeFlag.ARROW)\n ) {\n return flags;\n }\n }\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAGA,IAAAC,WAAA,GAAAD,OAAA;AAIO,MAAME,KAAK,CAAC;EASjBC,WAAWA,CAACC,KAAgB,EAAE;IAAA,KAN9BC,GAAG,GAAgB,IAAIC,GAAG,CAAC,CAAC;IAAA,KAE5BC,OAAO,GAAgB,IAAID,GAAG,CAAC,CAAC;IAAA,KAEhCE,SAAS,GAAgB,IAAIF,GAAG,CAAC,CAAC;IAGhC,IAAI,CAACF,KAAK,GAAGA,KAAK;EACpB;AACF;AAACK,OAAA,CAAAP,KAAA,GAAAA,KAAA;AAIc,MAAMQ,YAAY,CAA+B;EAM9DP,WAAWA,CAACQ,MAAiB,EAAEC,QAAiB,EAAE;IAAA,KALlDD,MAAM;IAAA,KACNE,UAAU,GAAkB,EAAE;IAAA,KAC9BD,QAAQ;IAAA,KACRE,gBAAgB,GAA0B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