From 5c2f8dc526ff12abbf5e33965680fbf91645b274 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Sun, 15 Mar 2015 23:08:31 +0100 Subject: Minor tweaks in monkey.monkey --- monkey/monkey.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'monkey') 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)) -- cgit v1.2.1