diff options
author | Timotej Lazar <timotej.lazar@araneo.org> | 2015-02-26 18:43:39 +0100 |
---|---|---|
committer | Aleš Smodiš <aless@guru.si> | 2015-08-11 14:26:02 +0200 |
commit | f5c4f86ad5ba2d811261de5303091603a58dbc93 (patch) | |
tree | 5fe18506fd46b997674f0f9bab62ac9b0304e4ba /monkey | |
parent | 8ad7bbd2e7627a99baec6e998d0cf289eef765d0 (diff) |
Use one format for all messages passed to JS side
Diffstat (limited to 'monkey')
-rwxr-xr-x | monkey/monkey.py | 20 |
1 files changed, 0 insertions, 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 |