public object Visit(Expr.Assign _assign) { object value = Evaluate(_assign.value); if (m_Locals.ContainsKey(_assign)) { int distance = m_Locals[_assign]; m_Enviroment.AssignAt(distance, _assign.name, value); } else { m_Globals.Assign(_assign.name, value); } return(value); }
public object Visit(Expr.Assign _assign) { Resolve(_assign.value); ResolveLocal(_assign, _assign.name); return(null); }
public string Visit(Expr.Assign _assign) { throw new NotImplementedException(); }