public string VisitVarStmt(Stmt.VarStmt stmt) { if (stmt.Initializer == null) { return(Parenthesize2("var", stmt.Name)); } return(Parenthesize2("var", stmt.Name, "=", stmt.Initializer)); }
public object VisitVarStmt(Stmt.VarStmt stmt) { Declare(stmt.Name); if (stmt.Initializer != null) { Resolve(stmt.Initializer); } Define(stmt.Name); return(null); }