public Void Visit_IfStmt(IfStmt stmt) { Resolve(stmt.condition); Resolve(stmt.thenBranch); if (stmt.elseBranch != null) { Resolve(stmt.elseBranch); } return(null); }
public object VisitIfStmt(IfStmt stmt) { Resolve(stmt.Condition); Resolve(stmt.ThenBranch); if (stmt.ElseBranch != null) { Resolve(stmt.ElseBranch); } return(null); }
public string Visit_IfStmt(IfStmt stmt) { if (stmt.elseBranch != null) { return(Parenthesize("If", stmt.thenBranch, stmt.elseBranch)); } else { return(Parenthesize("If", stmt.thenBranch)); } }
public Void Visit_IfStmt(IfStmt stmt) { if (IsTruthy(Evaluate(stmt.condition))) { Execute(stmt.thenBranch); } else if (stmt.elseBranch != null) { Execute(stmt.elseBranch); } return(null); }
public object VisitIfStmt(IfStmt stmt) { if (IsTruthy(Evaluate(stmt.Condition))) { Execute(stmt.ThenBranch); } else if (stmt.ElseBranch != null) { Execute(stmt.ElseBranch); } return(null); }