aboutsummaryrefslogtreecommitdiffhomepage
path: root/parse_execution.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-03-16 22:06:32 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-03-20 21:32:02 -0700
commit1305c02579a3b4976ddbd964cf174b71a36b8e41 (patch)
tree5cb9a605826d33c46e8747b36e79746116145986 /parse_execution.h
parent2c19ca0dbf8c4875f92f50359f3d15b0c7e5eeaf (diff)
Rewrite parser_t::current_line() to respect new parser
Diffstat (limited to 'parse_execution.h')
-rw-r--r--parse_execution.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/parse_execution.h b/parse_execution.h
index be04c1b6..cb2ff65f 100644
--- a/parse_execution.h
+++ b/parse_execution.h
@@ -119,6 +119,12 @@ public:
/* Returns the current line number, indexed from 1. Not const since it touches cached_lineno_offset */
int get_current_line_number();
+ /* Returns the source offset, or -1 */
+ int get_current_source_offset() const;
+
+ /* Returns the source string */
+ const wcstring &get_source() const { return src; }
+
/* 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);