diff --git a/src/include/tokenize.h b/src/include/tokenize.h index 6310ab3..b0cfd36 100644 --- a/src/include/tokenize.h +++ b/src/include/tokenize.h @@ -12,9 +12,15 @@ enum class Type { Int }; using TokenData = variant; +struct CodePosition { + int line; + int column; +}; + struct Token { TokenType type; TokenData data { }; + CodePosition pos; }; class TokenError : public runtime_error { @@ -26,7 +32,7 @@ public: /* Parses a string into a vector of tokens */ -vector tokenize(string str); +vector tokenize(vector str); /* Format and print a Token