From e06e7ae19851acf5e397f579d6c8459e87086d30 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Fri, 5 Dec 2014 16:08:34 +0100 Subject: added string reading functions of the Reader class --- src/core/BufferedCharReader.hpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src/core/BufferedCharReader.hpp') diff --git a/src/core/BufferedCharReader.hpp b/src/core/BufferedCharReader.hpp index bd19d4a..e7f3186 100644 --- a/src/core/BufferedCharReader.hpp +++ b/src/core/BufferedCharReader.hpp @@ -172,7 +172,6 @@ public: */ BufferedCharReader(int line = 1, int column = 1); - /** * Constructor of the buffered char reader class with a string as input. * @@ -180,7 +179,14 @@ public: * @param line is the start line. * @param column is the start column. */ - BufferedCharReader(const std::string &str, int line = 1, int column = 1); + BufferedCharReader(const std::string &str, int line, int column); + + /** + * Constructor of the buffered char reader class with a string as input. + * + * @param str is a string containing the input data. + */ + BufferedCharReader(const std::string &str); /** * Constructor of the buffered char reader class with a string as input. @@ -221,6 +227,14 @@ public: */ void consumePeek(); + /** + * Moves the read cursor to the next non-whitespace character. Returns + * false, if the end of the stream was reached. + * + * @return false if the end of the stream was reached, false othrwise. + */ + bool consumeWhitespace(); + /** * Resets the peek pointer to the "read" pointer. */ -- cgit v1.2.3