import { Expression } from "./expression" ; import { Node } from "./node" ; export interface IfExpression extends Node { condition : Expression ; thenBranch : Expression [ ] ; elseBranch : Expression [ ] ; elseIfs : ElseIfBranch [ ] ; } export function isIfExpression ( node ) { return node . type === "If" ; } export interface ElseIfBranch extends Node { condition : Expression ; branch : Expression [ ] ; } export function isElseIfBranch ( node ) { return node . type === "ElseIf" ; }