Explorar o código

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

Yentl Van Tendeloo %!s(int64=8) %!d(string=hai) anos
pai
achega
a48c14ef67
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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"))