summaryrefslogtreecommitdiffhomepage
path: root/minicc.h
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-03-15 18:19:49 +0100
committerRoland Reichwein <mail@reichwein.it>2020-03-15 18:19:49 +0100
commit9f69b006dde3c3fbe19ed3e0275d3b7348f2aa87 (patch)
tree6ac42793568339463f913cf39474794c8613d0b6 /minicc.h
parent3a7006fcf5f8ecffd852fbba6d8ee03ce8a35dce (diff)
New lexer
Diffstat (limited to 'minicc.h')
-rw-r--r--minicc.h8
1 files changed, 6 insertions, 2 deletions
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<std::string> 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);