summaryrefslogtreecommitdiff
path: root/src/parser/parser.h
diff options
context:
space:
mode:
authorChristopher L. Conway <christopherleeconway@gmail.com>2010-10-23 14:49:06 +0000
committerChristopher L. Conway <christopherleeconway@gmail.com>2010-10-23 14:49:06 +0000
commit0a3ecb598dac9e5e7416f88403dbf73d558c8739 (patch)
tree445375d28a4c0bd522115a1fdc40dc1190d6b7c6 /src/parser/parser.h
parentb2ff9864ed706911022d7468cde7ba55d07ab1fd (diff)
Adding Parser::setInput and using it in InteractiveShell (Fixes: #225)
Removing ParserBuilder::withStateFrom
Diffstat (limited to 'src/parser/parser.h')
-rw-r--r--src/parser/parser.h8
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.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback