UNPKG

js-ast-parser

Version:
12 lines (11 loc) 423 B
import { NodeCode } from "../../constants"; import { AstNode } from "../AstNode"; import { Expression } from "./Expression"; export class TernaryExpression extends Expression { type = 'TernaryExpression'; code = NodeCode.TernaryExpression; constructor(public test?: AstNode, public consequent?: AstNode, public alternate?: AstNode) { super(); this.loc.start = test.loc.start; } }