diff options
author | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-02-08 21:42:58 +0100 |
---|---|---|
committer | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-02-08 21:42:58 +0100 |
commit | fbaad57be8ddf3f90eb13551cc7eb18674b3efa2 (patch) | |
tree | 0c7390346731ebfd739f273b7f7d624608fa3be5 /src/core/common/CharReader.hpp | |
parent | 616e9bfeee29556952ebdccf57cb1fd304744acb (diff) | |
parent | bb8c69fbdeba3fa95fc780552252525b222ceb5a (diff) |
Merge branch 'master' of somweyr.de:ousia
Diffstat (limited to 'src/core/common/CharReader.hpp')
-rw-r--r-- | src/core/common/CharReader.hpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/common/CharReader.hpp b/src/core/common/CharReader.hpp index cbfeaf2..64c80af 100644 --- a/src/core/common/CharReader.hpp +++ b/src/core/common/CharReader.hpp @@ -490,6 +490,15 @@ public: bool read(char &c); /** + * Peeks a character, checks whether this character equals the given + * character -- and if yes -- consumes the peek, otherwise resets it. + * + * @param c is the character that is expected. + * @return true if this character is actually next. + */ + bool expect(char c); + + /** * Resets the peek pointer to the "read" pointer. */ void resetPeek(); |