include col/line information

This commit is contained in:
Theis Pieter Hollebeek 2024-12-12 10:40:38 +01:00
parent 4363874cd2
commit 2d4879b69f

View File

@ -253,7 +253,16 @@ public:
}
private:
inline void step() { this->i += 1; }
inline void step()
{
if (this->cur() == '\n') {
this->col = 1;
this->line += 1;
} else {
this->col += 1;
}
this->i += 1;
}
inline auto intern_str(std::string val) -> size_t
{