summaryrefslogtreecommitdiff
path: root/monkey
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@araneo.org>2015-03-15 23:08:31 +0100
committerAleš Smodiš <aless@guru.si>2015-08-11 14:26:03 +0200
commit5c2f8dc526ff12abbf5e33965680fbf91645b274 (patch)
tree86ffc5f7f64b32c3e7532f7a7b17d865fc5b1e76 /monkey
parent5d00e713bd3a6414c33770f05b1a56af1f681d9d (diff)
Minor tweaks in monkey.monkey
Diffstat (limited to 'monkey')
-rwxr-xr-xmonkey/monkey.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/monkey/monkey.py b/monkey/monkey.py
index b6032f7..3f58ee8 100755
--- a/monkey/monkey.py
+++ b/monkey/monkey.py
@@ -26,7 +26,6 @@ def fix(name, code, edits, aux_code='', timeout=30, debug=False):
# last step.
start = path[-1][4] if path else 0
- variables = []
for i, token in enumerate(program):
# Get variable names in the current rule.
if i == 0 or program[i-1].type == 'PERIOD':
@@ -42,7 +41,7 @@ def fix(name, code, edits, aux_code='', timeout=30, debug=False):
if i == 0 or program[i-1].stop:
first = i
- # Skip already modified parts of the program.
+ # Don't edit already modified parts of the program.
if i < start:
continue
@@ -276,7 +275,7 @@ def fix_hints(code, path):
start = program[idx].pos
end = start
elif step_type == 'remove_part':
- msg = 'Check this goal.'
+ msg = 'Remove this goal.'
start = program[idx].pos
end = idx + len(a) - 1
if program[end].type in ('COMMA', 'PERIOD', 'SEMI'):
@@ -293,7 +292,7 @@ def fix_hints(code, path):
start = program[idx+first].pos
end = program[idx+last].pos + len(program[idx+last].val)
elif step_type == 'remove_rule':
- msg = 'Check this rule.'
+ msg = 'Remove this rule.'
start = program[idx].pos
end = program[idx + len(a) - 1].pos
messages.append(((start, end), msg))