aboutsummaryrefslogtreecommitdiff
path: root/asm
diff options
context:
space:
mode:
Diffstat (limited to 'asm')
-rw-r--r--asm/preprocesser.cpp8
-rw-r--r--asm/preprocesser.hpp15
2 files changed, 23 insertions, 0 deletions
diff --git a/asm/preprocesser.cpp b/asm/preprocesser.cpp
index f5e31e4..7f52e40 100644
--- a/asm/preprocesser.cpp
+++ b/asm/preprocesser.cpp
@@ -208,3 +208,11 @@ pp_err_t::pp_err_t(pp_err_type_t err, const token_t *ref)
pp_err_t::pp_err_t(pp_err_type_t err, const token_t *ref, lerr_t lerr)
: reference{ref}, type{err}, lerr{lerr}
{}
+
+// pp_unit_t::pp_unit_t(const token_t *const token) : resolved{false},
+// token{token}
+// {}
+
+// pp_unit_t::pp_unit_t(std::string_view name, std::vector<pp_unit_t> elements)
+// : resolved{false}, token{nullptr}, container{name, elements}
+// {}
diff --git a/asm/preprocesser.hpp b/asm/preprocesser.hpp
index aac3041..4938d4e 100644
--- a/asm/preprocesser.hpp
+++ b/asm/preprocesser.hpp
@@ -42,6 +42,21 @@ struct pp_err_t
std::ostream &operator<<(std::ostream &, pp_err_t &);
+struct pp_unit_t
+{
+ const token_t *const token;
+ struct
+ {
+ std::string_view name;
+ std::vector<pp_unit_t> elements;
+ } container;
+
+ pp_unit_t(const token_t *const);
+ pp_unit_t(std::string_view, std::vector<pp_unit_t>);
+};
+
+std::vector<pp_unit_t> tokens_to_units(const std::vector<token_t *> &);
+pp_err_t preprocess_use(std::vector<pp_unit_t> &);
pp_err_t preprocesser(const std::vector<token_t *> &, std::vector<token_t *> &);
#endif