diff options
Diffstat (limited to 'minicc.cpp')
-rw-r--r-- | minicc.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -50,7 +50,13 @@ void Location::advance(bool newline) } } -std::string Location::toString() +std::string Location::toString() const { return std::to_string(line) + ":"s + std::to_string(column); } + +std::string Token::toString() const +{ + return location.toString() + ": "s + value + " ("s + type + ")"s; +} + |