Delete operator for record fields.

"delete x$y" now resets record field "x" back to its original state if
it is either &optional or has a &default. "delete" may not be used
with non-optional/default fields.
This commit is contained in:
Robin Sommer 2011-04-22 18:40:14 -07:00
parent 964060c32f
commit 46b1fd9850
9 changed files with 70 additions and 18 deletions

View file

@ -688,8 +688,11 @@ public:
int Field() const { return field; }
int CanDel() const;
Expr* Simplify(SimplifyType simp_type);
void Assign(Frame* f, Val* v, Opcode op = OP_ASSIGN);
void Delete(Frame* f);
Expr* MakeLvalue();