Closed daviis closed 9 years ago
Hmm, looking at this I see where the issue arises.
So visitSubscript looks at what is being sub scripted so when it is looking at a list it returns the item that is being looked at, in this case deleted. The elements in a list don't have a name so del(y[0]) is attempting to delete the name "" from the scope.
I'm not entirely sure how to handle this yet, I'll see what options there are. It may have to be a special case where it doesn't do anything or it may have to be a case where it modifies the list in the scope to delete the variable, which I'm not sure how will work quite yet.
Changed it to won't fix, I'll have it just pass if it is subscripting a delete so that the program can still run but we won't have to implement this.
In test case Test/Correct/Ops.py line 36 visit_Delete fails.
There will also be something from visit_Subscript going on as part of the problem.