main.js 3.0 KB

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