Forráskód Böngészése

Fix duplicated steps in frontend's answer.

Sander Mathijs van Veen 13 éve
szülő
commit
4052ad84bf
1 módosított fájl, 3 hozzáadás és 1 törlés
  1. 3 1
      src/parser.py

+ 3 - 1
src/parser.py

@@ -337,7 +337,9 @@ class Parser(BisonParser):
             print self.root_node
 
         if include_step:
-            return suggestion, self.root_node
+            # Make sure that the node is cloned, otherwise the next rewrite
+            # attempt will modify the root node (since it's mutable).
+            return suggestion, self.root_node.clone()
 
         return self.root_node