Fix precedence bugs, test on homework
This commit is contained in:
@@ -145,10 +145,11 @@ class const(Instruction):
|
||||
def toString(self): return super().toString()+"CONST "+str(self.k)
|
||||
|
||||
class store(Instruction):
|
||||
def __init__(self, k, assigned_label=None):
|
||||
def __init__(self, k, d, assigned_label=None):
|
||||
super().__init__(assigned_label=assigned_label)
|
||||
self.k=k
|
||||
self.d=d
|
||||
self.k = k
|
||||
self.d = d
|
||||
|
||||
|
||||
def execute(self,tram):
|
||||
tram.stack[tram.spp(self.d,tram.pp,tram.fp)+self.k]=tram.stack[tram.top]
|
||||
|
||||
Reference in New Issue
Block a user