public string VisitIfStmt(Stmt.IfStmt stmt) { if (stmt.ElseBranch == null) { return(Parenthesize2("if", stmt.Condition, stmt.ThenBranch)); } return(Parenthesize2("if-else", stmt.Condition, stmt.ThenBranch, stmt.ElseBranch)); }
public object VisitIfStmt(Stmt.IfStmt stmt) { Resolve(stmt.Condition); Resolve(stmt.ThenBranch); if (stmt.ElseBranch != null) { Resolve(stmt.ElseBranch); } return(null); }