diff options
author | Roland Reichwein <mail@reichwein.it> | 2020-10-31 18:10:58 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2020-10-31 18:10:58 +0100 |
commit | 8256280b348b4b53fff35c9101ced0a8dfb2c58e (patch) | |
tree | e745b79e98c853cf1891372e8b2a926a5d81fff5 /minicc.h | |
parent | ce77838c4f32b9dc237f0c4b17d1f1e1741254d4 (diff) |
CPP::translate() (WIP), documentation, bugfixing
Diffstat (limited to 'minicc.h')
-rw-r--r-- | minicc.h | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1,3 +1,5 @@ +// Common definitions + #pragma once #include <cstdlib> @@ -19,8 +21,8 @@ struct Location { size_t column{1}; size_t pos{0}; - void advance(bool newline = false); - std::string toString(); + void advance(bool newline = false); ///< advance 1 char + std::string toString() const; }; bool operator==(const Location &a, const Location &b); @@ -29,6 +31,8 @@ struct Token { std::string type; std::string value; Location location; + + std::string toString() const; }; // For printing via Google Test |