diff --git a/runtime/json.hpp b/runtime/json.hpp index 7a0eb52..baffd4c 100644 --- a/runtime/json.hpp +++ b/runtime/json.hpp @@ -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 {