diff options
Diffstat (limited to 'src/parser/parser.h')
-rw-r--r-- | src/parser/parser.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/parser/parser.h b/src/parser/parser.h index 280bd3c97..ed7db63cf 100644 --- a/src/parser/parser.h +++ b/src/parser/parser.h @@ -160,6 +160,14 @@ public: return d_input; } + /** Deletes and replaces the current parser input. */ + void setInput(Input* input) { + delete d_input; + d_input = input; + d_input->setParser(*this); + d_done = false; + } + /** * Check if we are done -- either the end of input has been reached, or some * error has been encountered. |