Add deleting subscr support.

This commit is contained in:
Darryl Pogue
2011-01-05 22:14:24 -08:00
parent 703fbdb127
commit 91ba5e9e53

View File

@@ -275,6 +275,16 @@ PycRef<ASTNode> BuildFromCode(PycRef<PycCode> code, PycModule* mod)
curblock->append(new ASTDelete(name));
}
break;
case Pyc::DELETE_SUBSCR:
{
PycRef<ASTNode> key = stack.top();
stack.pop();
PycRef<ASTNode> name = stack.top();
stack.pop();
curblock->append(new ASTDelete(new ASTSubscr(name, key)));
}
break;
case Pyc::DUP_TOP:
stack.push(stack.top());
break;