From f4b2027868c9733bbbbcb4c5ec6d5462a8447e5d Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Tue, 21 Jan 2020 22:49:30 +0100 Subject: Separate to cpp files --- minicc.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 minicc.h (limited to 'minicc.h') 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 +#include +#include +#include + +using index_t = size_t; + +std::vector 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); -- cgit v1.2.3