Procházet zdrojové kódy

Fix duplicated steps in frontend's answer.

Sander Mathijs van Veen před 13 roky
rodič
revize
4052ad84bf
1 změnil soubory, kde provedl 3 přidání a 1 odebrání
  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