summaryrefslogtreecommitdiff
path: root/monkey/edits.py
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@araneo.org>2015-02-09 16:35:00 +0100
committerAleš Smodiš <aless@guru.si>2015-08-11 14:26:02 +0200
commit1effa504a63f579a16425f5c66026f0204733194 (patch)
treefc827a2bd0270e4e640eb22fea1a22e722ef20a5 /monkey/edits.py
parentb85a6499d21beec2cb87830e63e6afef9569df1a (diff)
Clean up monkey.fix.step
Diffstat (limited to 'monkey/edits.py')
-rw-r--r--monkey/edits.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/monkey/edits.py b/monkey/edits.py
index 480af5f..bf6560d 100644
--- a/monkey/edits.py
+++ b/monkey/edits.py
@@ -194,6 +194,11 @@ def get_edits_from_traces(traces):
start = normalize(path[i-1], var_names)
end = normalize(path[i], var_names)
+ # Disallow edits that insert a whole rule (a → … :- …).
+ # TODO improve edit_graph to handle this.
+ if 'FROM' in [t.type for t in end[:-1]]:
+ continue
+
# This should always succeed but check anyway.
if start != end:
edit = (start, end)