main.js 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. "use strict";
  2. var __importDefault = (this && this.__importDefault) || function (mod) {
  3. return (mod && mod.__esModule) ? mod : { "default": mod };
  4. };
  5. Object.defineProperty(exports, "__esModule", { value: true });
  6. var fork_1 = __importDefault(require("./fork"));
  7. var core_1 = __importDefault(require("./def/core"));
  8. var es6_1 = __importDefault(require("./def/es6"));
  9. var es7_1 = __importDefault(require("./def/es7"));
  10. var es2020_1 = __importDefault(require("./def/es2020"));
  11. var jsx_1 = __importDefault(require("./def/jsx"));
  12. var flow_1 = __importDefault(require("./def/flow"));
  13. var esprima_1 = __importDefault(require("./def/esprima"));
  14. var babel_1 = __importDefault(require("./def/babel"));
  15. var typescript_1 = __importDefault(require("./def/typescript"));
  16. var es_proposals_1 = __importDefault(require("./def/es-proposals"));
  17. var namedTypes_1 = require("./gen/namedTypes");
  18. exports.namedTypes = namedTypes_1.namedTypes;
  19. var _a = fork_1.default([
  20. // This core module of AST types captures ES5 as it is parsed today by
  21. // git://github.com/ariya/esprima.git#master.
  22. core_1.default,
  23. // Feel free to add to or remove from this list of extension modules to
  24. // configure the precise type hierarchy that you need.
  25. es6_1.default,
  26. es7_1.default,
  27. es2020_1.default,
  28. jsx_1.default,
  29. flow_1.default,
  30. esprima_1.default,
  31. babel_1.default,
  32. typescript_1.default,
  33. es_proposals_1.default,
  34. ]), astNodesAreEquivalent = _a.astNodesAreEquivalent, builders = _a.builders, builtInTypes = _a.builtInTypes, defineMethod = _a.defineMethod, eachField = _a.eachField, finalize = _a.finalize, getBuilderName = _a.getBuilderName, getFieldNames = _a.getFieldNames, getFieldValue = _a.getFieldValue, getSupertypeNames = _a.getSupertypeNames, n = _a.namedTypes, NodePath = _a.NodePath, Path = _a.Path, PathVisitor = _a.PathVisitor, someField = _a.someField, Type = _a.Type, use = _a.use, visit = _a.visit;
  35. exports.astNodesAreEquivalent = astNodesAreEquivalent;
  36. exports.builders = builders;
  37. exports.builtInTypes = builtInTypes;
  38. exports.defineMethod = defineMethod;
  39. exports.eachField = eachField;
  40. exports.finalize = finalize;
  41. exports.getBuilderName = getBuilderName;
  42. exports.getFieldNames = getFieldNames;
  43. exports.getFieldValue = getFieldValue;
  44. exports.getSupertypeNames = getSupertypeNames;
  45. exports.NodePath = NodePath;
  46. exports.Path = Path;
  47. exports.PathVisitor = PathVisitor;
  48. exports.someField = someField;
  49. exports.Type = Type;
  50. exports.use = use;
  51. exports.visit = visit;
  52. // Populate the exported fields of the namedTypes namespace, while still
  53. // retaining its member types.
  54. Object.assign(namedTypes_1.namedTypes, n);