summaryrefslogtreecommitdiff
path: root/node_modules/@babel/plugin-transform-reserved-words/lib
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2023-10-14 15:31:11 +0800
committerlittleblack111 <littleblack11111@gmail.com>2023-10-14 15:31:11 +0800
commitaa773172311dcada759dfbaac485f4bc6e00bc21 (patch)
treeca6d9a5eff3ab8f689f9acb4f0df791d9486813d /node_modules/@babel/plugin-transform-reserved-words/lib
parentc5a5384e846f242e901e859fe600d695d8990a9a (diff)
added babel
Diffstat (limited to 'node_modules/@babel/plugin-transform-reserved-words/lib')
-rw-r--r--node_modules/@babel/plugin-transform-reserved-words/lib/index.js24
-rw-r--r--node_modules/@babel/plugin-transform-reserved-words/lib/index.js.map1
2 files changed, 25 insertions, 0 deletions
diff --git a/node_modules/@babel/plugin-transform-reserved-words/lib/index.js b/node_modules/@babel/plugin-transform-reserved-words/lib/index.js
new file mode 100644
index 00000000..020df652
--- /dev/null
+++ b/node_modules/@babel/plugin-transform-reserved-words/lib/index.js
@@ -0,0 +1,24 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var _helperPluginUtils = require("@babel/helper-plugin-utils");
+var _core = require("@babel/core");
+var _default = (0, _helperPluginUtils.declare)(api => {
+ api.assertVersion(7);
+ return {
+ name: "transform-reserved-words",
+ visitor: {
+ "BindingIdentifier|ReferencedIdentifier"(path) {
+ if (!_core.types.isValidES3Identifier(path.node.name)) {
+ path.scope.rename(path.node.name);
+ }
+ }
+ }
+ };
+});
+exports.default = _default;
+
+//# sourceMappingURL=index.js.map
diff --git a/node_modules/@babel/plugin-transform-reserved-words/lib/index.js.map b/node_modules/@babel/plugin-transform-reserved-words/lib/index.js.map
new file mode 100644
index 00000000..5b525bcc
--- /dev/null
+++ b/node_modules/@babel/plugin-transform-reserved-words/lib/index.js.map
@@ -0,0 +1 @@
+{"version":3,"names":["_helperPluginUtils","require","_core","_default","declare","api","assertVersion","name","visitor","BindingIdentifier|ReferencedIdentifier","path","t","isValidES3Identifier","node","scope","rename","exports","default"],"sources":["../src/index.ts"],"sourcesContent":["import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\nimport type { NodePath } from \"@babel/traverse\";\n\nexport default declare(api => {\n api.assertVersion(7);\n\n return {\n name: \"transform-reserved-words\",\n\n visitor: {\n \"BindingIdentifier|ReferencedIdentifier\"(path: NodePath<t.Identifier>) {\n if (!t.isValidES3Identifier(path.node.name)) {\n path.scope.rename(path.node.name);\n }\n },\n },\n };\n});\n"],"mappings":";;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAAyC,IAAAE,QAAA,GAG1B,IAAAC,0BAAO,EAACC,GAAG,IAAI;EAC5BA,GAAG,CAACC,aAAa,CAAC,CAAC,CAAC;EAEpB,OAAO;IACLC,IAAI,EAAE,0BAA0B;IAEhCC,OAAO,EAAE;MACP,wCAAwCC,CAACC,IAA4B,EAAE;QACrE,IAAI,CAACC,WAAC,CAACC,oBAAoB,CAACF,IAAI,CAACG,IAAI,CAACN,IAAI,CAAC,EAAE;UAC3CG,IAAI,CAACI,KAAK,CAACC,MAAM,CAACL,IAAI,CAACG,IAAI,CAACN,IAAI,CAAC;QACnC;MACF;IACF;EACF,CAAC;AACH,CAAC,CAAC;AAAAS,OAAA,CAAAC,OAAA,GAAAd,QAAA"} \ No newline at end of file