summaryrefslogtreecommitdiff
path: root/src/core/common/CharReader.hpp
diff options
context:
space:
mode:
authorBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-02-08 21:42:58 +0100
committerBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-02-08 21:42:58 +0100
commitfbaad57be8ddf3f90eb13551cc7eb18674b3efa2 (patch)
tree0c7390346731ebfd739f273b7f7d624608fa3be5 /src/core/common/CharReader.hpp
parent616e9bfeee29556952ebdccf57cb1fd304744acb (diff)
parentbb8c69fbdeba3fa95fc780552252525b222ceb5a (diff)
Merge branch 'master' of somweyr.de:ousia
Diffstat (limited to 'src/core/common/CharReader.hpp')
-rw-r--r--src/core/common/CharReader.hpp9
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();