Commit 1b668eba authored by Dominik Charousset's avatar Dominik Charousset

Fix column value for EOF

parent e6c56749
...@@ -51,13 +51,12 @@ struct state { ...@@ -51,13 +51,12 @@ struct state {
/// otherwise the next character. /// otherwise the next character.
char next() noexcept { char next() noexcept {
++i; ++i;
++column;
if (i != e) { if (i != e) {
auto c = *i; auto c = *i;
if (c == '\n') { if (c == '\n') {
++line; ++line;
column = 1; column = 1;
} else {
++column;
} }
return c; return c;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment