angular-estree-parser
Version:
A parser that converts Angular source code into an ESTree-compatible form
17 lines (16 loc) • 377 B
JavaScript
//#region src/ast-transform/transforms/transform-conditional-expression.ts
const visitConditional = (node, transformer) => {
const [test, consequent, alternate] = transformer.transformChildren([
node.condition,
node.trueExp,
node.falseExp
]);
return {
type: "ConditionalExpression",
test,
consequent,
alternate
};
};
//#endregion
export { visitConditional };