public object Visit(Stmt.Var stmt) { Declare(stmt.name); if (stmt.initializer != null) { Resolve(stmt.initializer); } Define(stmt.name); return(null); }
public object Visit(Stmt.Var _var) { object value = null; if (_var.initializer != null) { value = Evaluate(_var.initializer); } m_Enviroment.Define(_var.name.lexeme, value); return(null); }