Example #1
0
        public object VisitAssignExpr(Expr.Assign expr)
        {
            object value = Evaluate(expr.value);

            environment.Assign(expr.Name, value);
            return(value);
        }
Example #2
0
 public string VisitAssignExpr(Expr.Assign expr)
 {
     return($"{expr.Name._lexme} = {PrintExpr(expr.value)}");
 }