#pragma once #include #include #include #include using index_t = size_t; std::vector split(std::string s); struct Location { 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); struct Token { std::string type; std::string value; Location location; }; // For printing via Google Test bool operator==(const Token &a, const Token &b); std::ostream& operator<<(std::ostream& os, const Token& token);