source: imaps-frontend/node_modules/@babel/core/lib/parse.js

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 1.4 KB
Line 
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.parse = void 0;
7exports.parseAsync = parseAsync;
8exports.parseSync = parseSync;
9function _gensync() {
10 const data = require("gensync");
11 _gensync = function () {
12 return data;
13 };
14 return data;
15}
16var _index = require("./config/index.js");
17var _index2 = require("./parser/index.js");
18var _normalizeOpts = require("./transformation/normalize-opts.js");
19var _rewriteStackTrace = require("./errors/rewrite-stack-trace.js");
20const parseRunner = _gensync()(function* parse(code, opts) {
21 const config = yield* (0, _index.default)(opts);
22 if (config === null) {
23 return null;
24 }
25 return yield* (0, _index2.default)(config.passes, (0, _normalizeOpts.default)(config), code);
26});
27const parse = exports.parse = function parse(code, opts, callback) {
28 if (typeof opts === "function") {
29 callback = opts;
30 opts = undefined;
31 }
32 if (callback === undefined) {
33 {
34 return (0, _rewriteStackTrace.beginHiddenCallStack)(parseRunner.sync)(code, opts);
35 }
36 }
37 (0, _rewriteStackTrace.beginHiddenCallStack)(parseRunner.errback)(code, opts, callback);
38};
39function parseSync(...args) {
40 return (0, _rewriteStackTrace.beginHiddenCallStack)(parseRunner.sync)(...args);
41}
42function parseAsync(...args) {
43 return (0, _rewriteStackTrace.beginHiddenCallStack)(parseRunner.async)(...args);
44}
450 && 0;
46
47//# sourceMappingURL=parse.js.map
Note: See TracBrowser for help on using the repository browser.