MCPcopy
hub / github.com/codesandbox/codesandbox-client / _getAst

Function _getAst

packages/app/static/js/babel.6.26.js:1252–1273  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1250 }, opts);
1251
1252 var _getAst = function getAst() {
1253 var ast = void 0;
1254
1255 try {
1256 ast = babylon.parse(code, opts);
1257
1258 ast = _babelTraverse2.default.removeProperties(ast, { preserveComments: opts.preserveComments });
1259
1260 _babelTraverse2.default.cheap(ast, function (node) {
1261 node[FROM_TEMPLATE] = true;
1262 });
1263 } catch (err) {
1264 err.stack = err.stack + "from\n" + stack;
1265 throw err;
1266 }
1267
1268 _getAst = function getAst() {
1269 return ast;
1270 };
1271
1272 return ast;
1273 };
1274
1275 return function () {
1276 for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {

Callers 1

babel.6.26.jsFile · 0.85

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected