diff options
Diffstat (limited to 'minicc.h')
-rw-r--r-- | minicc.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/minicc.h b/minicc.h new file mode 100644 index 0000000..0500b8c --- /dev/null +++ b/minicc.h @@ -0,0 +1,26 @@ +#pragma once + +#include <cstdlib> +#include <vector> +#include <string> +#include <iostream> + +using index_t = size_t; + +std::vector<std::string> split(std::string s); + +struct Location { + size_t line; + size_t column; +}; + +bool operator==(const Location &a, const Location &b); + +struct Token { + std::string type; + std::string value; + Location location; +}; + +bool operator==(const Token &a, const Token &b); +std::ostream& operator<<(std::ostream& os, const Token& token); |