diff options
author | Roland Reichwein <mail@reichwein.it> | 2020-01-21 22:49:30 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2020-01-21 22:49:30 +0100 |
commit | f4b2027868c9733bbbbcb4c5ec6d5462a8447e5d (patch) | |
tree | 40ce459f1a501d6c88936c78f6dbcbb8aadd04ca /minicc.h | |
parent | 08997620fd617b580c1adbcb03c90cf621aa7069 (diff) |
Separate to cpp files
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); |