Implémenting while loop
This commit is contained in:
parent
76e2707156
commit
948b335cb5
6
spf.py
6
spf.py
@ -15,10 +15,8 @@ class SPFInterpreter(lark.visitors.Interpreter):
|
||||
self.variables = Variables(trace)
|
||||
|
||||
def while_loop(self, el):
|
||||
print("TODO: while")
|
||||
cond = el.children[0]
|
||||
instr = el.children[1:]
|
||||
print(cond.pretty())
|
||||
while self.visit_children(el.children[0])[0]:
|
||||
[self.visit_children(i) for i in el.children[1:]]
|
||||
|
||||
def for_loop(self, el):
|
||||
print("TODO: for")
|
||||
|
Loading…
x
Reference in New Issue
Block a user