diff --git a/spf.py b/spf.py index c8bd74d..82cfd15 100755 --- a/spf.py +++ b/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")