diff options
author | Damien George <damien.p.george@gmail.com> | 2014-01-18 23:24:36 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-01-18 23:24:36 +0000 |
commit | 08335004cfe95048ee06134a3e49b9fb75639139 (patch) | |
tree | 7518a854012938fd70c57b3571a630a142b84f28 /py/emitcpy.c | |
parent | aefe79880f8c5f66132673ccc9be27d2ca29005b (diff) | |
download | micropython-08335004cfe95048ee06134a3e49b9fb75639139.tar.gz micropython-08335004cfe95048ee06134a3e49b9fb75639139.zip |
Add source file name and line number to error messages.
Byte code has a map from byte-code offset to source-code line number,
used to give better error messages.
Diffstat (limited to 'py/emitcpy.c')
-rw-r--r-- | py/emitcpy.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/py/emitcpy.c b/py/emitcpy.c index ee96e589a3..42eef91d11 100644 --- a/py/emitcpy.c +++ b/py/emitcpy.c @@ -68,6 +68,9 @@ static void emit_cpy_set_stack_size(emit_t *emit, int size) { emit->stack_size = size; } +static void emit_cpy_set_source_line(emit_t *emit, int source_line) { +} + static void emit_cpy_load_id(emit_t *emit, qstr qstr) { emit_common_load_id(emit, &emit_cpython_method_table, emit->scope, qstr); } @@ -798,6 +801,7 @@ const emit_method_table_t emit_cpython_method_table = { emit_cpy_last_emit_was_return_value, emit_cpy_get_stack_size, emit_cpy_set_stack_size, + emit_cpy_set_source_line, emit_cpy_load_id, emit_cpy_store_id, |