From 8f75241bcbe6c0497f2e09c4c6f081839250e22b Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 16 Apr 2024 15:42:59 +0630 Subject: Halting work on preprocesser units and rewrite as a whole I've decided to split the project into 2 repositories: the assembler and the runtime. The runtime will contain both the executable and lib/ while the assembler will have the runtime as a git submodule and use it to build. I think this is a clean solution, a lot cleaner than having them all in one project where the Makefile has to massively expand. --- asm/preprocesser.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'asm/preprocesser.hpp') 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 elements; + } container; + + pp_unit_t(const token_t *const); + pp_unit_t(std::string_view, std::vector); +}; + +std::vector tokens_to_units(const std::vector &); +pp_err_t preprocess_use(std::vector &); pp_err_t preprocesser(const std::vector &, std::vector &); #endif -- cgit v1.2.3-13-gbd6f