diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2014-03-01 16:04:13 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2014-03-01 16:04:13 -0800 |
commit | d232a0f9512d0e1b575235fdf4119a63353ecedd (patch) | |
tree | 8a0b4307dac8ec187a82fad92aafa65344bc6bfd /parse_execution.h | |
parent | be33d3f2a44ad16358b614c9f47fdb8094b4e127 (diff) |
Implement status -n (line number) with new parser
Diffstat (limited to 'parse_execution.h')
-rw-r--r-- | parse_execution.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/parse_execution.h b/parse_execution.h index 8ab5c5d6..91c32c99 100644 --- a/parse_execution.h +++ b/parse_execution.h @@ -39,6 +39,13 @@ private: //parse_error_list_t errors; int eval_level; + + /* The currently executing node index, used to indicate the line number */ + node_offset_t executing_node_idx; + + /* Cached line number information */ + size_t cached_lineno_offset; + int cached_lineno_count; /* No copying allowed */ parse_execution_context_t(const parse_execution_context_t&); @@ -105,6 +112,9 @@ public: /* Returns the current eval level */ int current_eval_level() const { return eval_level; } + + /* Returns the current line number. Not const since it touches cached_lineno_offset */ + int get_current_line_number(); /* Start executing at the given node offset. Returns 0 if there was no error, 1 if there was an error */ parse_execution_result_t eval_node_at_offset(node_offset_t offset, const block_t *associated_block, const io_chain_t &io); |