diff options
Diffstat (limited to 'monkey')
-rwxr-xr-x | monkey/monkey.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/monkey/monkey.py b/monkey/monkey.py index 7155c23..c037193 100755 --- a/monkey/monkey.py +++ b/monkey/monkey.py @@ -181,9 +181,17 @@ def fix_ranges(edits): marks = [] for step_type, line, (before, after) in edits: if step_type == 'change_line': - marks.append(('change', (before[0].pos, before[-1].pos+len(before[-1].val)))) + marks.append({ 'start': before[0].pos, + 'end': before[-1].pos+len(before[-1].val), + 'msg': 'Change this line.' }) elif step_type == 'remove_line': - marks.append(('remove', (before[0].pos, before[-1].pos+len(before[-1].val)))) - elif step_type == 'add_subgoal' or step_type == 'add_rule': - marks.append((step_type, line)) + marks.append({ 'start': before[0].pos, + 'end': before[-1].pos+len(before[-1].val), + 'msg': 'Remove this line.' }) + elif step_type == 'add_subgoal': + marks.append({ 'msg': 'Add a new subgoal', + 'line': line }); + elif step_type == 'add_rule': + marks.append({ 'msg': 'Add a new rule', + 'line': line }); return marks |