示例#1
0
        public PrgState execute(PrgState p)
        {
            ISymbolTable <string, int> t = p.getSymbolTable();
            int resExpr = this.expr.evaluate(t);

            if (t.contains(var))
            {
                t.setValue(var, resExpr);
            }
            else
            {
                t.add(var, resExpr);
            }

            return(p);
        }