1
|
"use strict";
|
2
|
|
3
|
exports.__esModule = true;
|
4
|
|
5
|
exports.default = function (ast, comments, tokens) {
|
6
|
if (ast) {
|
7
|
if (ast.type === "Program") {
|
8
|
return t.file(ast, comments || [], tokens || []);
|
9
|
} else if (ast.type === "File") {
|
10
|
return ast;
|
11
|
}
|
12
|
}
|
13
|
|
14
|
throw new Error("Not a valid ast?");
|
15
|
};
|
16
|
|
17
|
var _babelTypes = require("babel-types");
|
18
|
|
19
|
var t = _interopRequireWildcard(_babelTypes);
|
20
|
|
21
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
22
|
|
23
|
module.exports = exports["default"];
|