소스 검색

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

Yentl Van Tendeloo 8 년 전
부모
커밋
162cfe5f8c
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  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"))