public object visit_obj_set(ObjSetExpr obj_set_expr)
    {
        object obj = evaluate(obj_set_expr.obj);

        if (obj is PlutoObject)
        {
            object value = evaluate(obj_set_expr.value);
            ((PlutoObject)obj).set(obj_set_expr.identifier, value);
            return(value);
        }
        throw new RuntimeException("Must be object to set member");
    }
Example #2
0
 public object visit_obj_set(ObjSetExpr obj_set_expr)
 {
     resolve(obj_set_expr.obj);
     resolve(obj_set_expr.value);
     return(null);
 }