From 9f69b006dde3c3fbe19ed3e0275d3b7348f2aa87 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sun, 15 Mar 2020 18:19:49 +0100 Subject: New lexer --- minicc.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'minicc.h') diff --git a/minicc.h b/minicc.h index 9bc8945..861a30a 100644 --- a/minicc.h +++ b/minicc.h @@ -10,8 +10,12 @@ using index_t = size_t; std::vector split(std::string s); struct Location { - size_t line; - size_t column; + size_t line{1}; + size_t column{1}; + size_t pos{0}; + + void advance(bool newline = false); + std::string toString(); }; bool operator==(const Location &a, const Location &b); -- cgit v1.2.3