diff options
Diffstat (limited to 'Parser.cpp')
-rw-r--r-- | Parser.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Parser.cpp b/Parser.cpp new file mode 100644 index 0000000..9b07089 --- /dev/null +++ b/Parser.cpp @@ -0,0 +1,13 @@ +#include "Parser.h" +#include "Exception.h" + +void Parser::set_file(FileReader & file) { + this->file = &file; +} + +FileReader & Parser::get_file() { + if (this->file == nullptr) + throw Exception("Parser: no file to read"); + return *this->file; +} + |