From f5c4f86ad5ba2d811261de5303091603a58dbc93 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Thu, 26 Feb 2015 18:43:39 +0100 Subject: Use one format for all messages passed to JS side --- monkey/monkey.py | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/monkey/monkey.py b/monkey/monkey.py index 3de0a41..f5b69a9 100755 --- a/monkey/monkey.py +++ b/monkey/monkey.py @@ -176,23 +176,3 @@ def fix(name, code, edits, aux_code='', timeout=30, debug=False): total_time = time.monotonic() - start_time return '', [], total_time, n_tested - -# Return a list of character ranges modified by the sequence [edits]. -def fix_ranges(edits): - marks = [] - for step_type, line, (before, after) in edits: - if step_type == 'change_line': - 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({ '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 -- cgit v1.2.1