public virtual void Visit(Assign node) { }
void AssignStmt(out Statement assign) { Expression exp; Variable var; assign = null; Expect(1); var = new Variable(t.val); if (!SymbolTable.IsInScope(t.val) && !Options.BookVersion) { errors.SemErr(t.line, t.col, string.Format("Assignment to undeclared variable '{0}'",t.val)); } Expect(17); Token tok = t; Expr(out exp); if (!ExpectInt(exp, tok, true)) { return; } assign = new Assign(var, (TypedExpression<int>)exp); }