Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 public object Visit(Expr.Assign _assign)
 {
     Resolve(_assign.value);
     ResolveLocal(_assign, _assign.name);
     return(null);
 }
Esempio n. 3
0
 public string Visit(Expr.Assign _assign)
 {
     throw new NotImplementedException();
 }