js-ast-parser
Version:
把javascript代码字符串解析为AST对象
18 lines • 688 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.TernaryExpression = void 0;
const constants_1 = require("../../constants");
const Expression_1 = require("./Expression");
class TernaryExpression extends Expression_1.Expression {
constructor(test, consequent, alternate) {
super();
this.test = test;
this.consequent = consequent;
this.alternate = alternate;
this.type = 'TernaryExpression';
this.code = constants_1.NodeCode.TernaryExpression;
this.loc.start = test.loc.start;
}
}
exports.TernaryExpression = TernaryExpression;
//# sourceMappingURL=TernaryExpression.js.map