Browse Source

Fixed primitives visitor which didn't log primitives for subtrees with
break/continue

Yentl Van Tendeloo 8 years ago
parent
commit
a48c14ef67
1 changed files with 2 additions and 0 deletions
  1. 2 0
      interface/HUTN/hutn_compiler/primitives_visitor.py

+ 2 - 0
interface/HUTN/hutn_compiler/primitives_visitor.py

@@ -300,10 +300,12 @@ class PrimitivesVisitor(Visitor):
     def visit_continue(self, tree):
         w = self.value(Action("continue"))
         self.dict(w, "while", self.while_stack[-1])
+        self.set_primitive(tree, w)
 
     def visit_break(self, tree):
         w = self.value(Action("break"))
         self.dict(w, "while", self.while_stack[-1])
+        self.set_primitive(tree, w)
 
     def visit_while(self, tree):
         w = self.value(Action("while"))