From b83bdd0d45223b789ec99bdc16d42fb646fdb8e2 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 15 Apr 2024 16:31:45 +0630 Subject: preprocesser function now only returns a pp_err_t We leave the parameter tokens alone, considering it constant, while the parameter vec_out is used to hold the new stream of tokens. This allows the caller to have a before and after view on the token stream and reduces the worry of double frees. --- asm/preprocesser.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'asm/preprocesser.hpp') diff --git a/asm/preprocesser.hpp b/asm/preprocesser.hpp index f4cb3bb..ed5a421 100644 --- a/asm/preprocesser.hpp +++ b/asm/preprocesser.hpp @@ -42,8 +42,7 @@ struct pp_err_t std::ostream &operator<<(std::ostream &, pp_err_t &); -std::pair, pp_err_t> -preprocesser(std::vector &); +pp_err_t preprocesser(const std::vector &, std::vector &); std::pair, pp_err_t> preprocess_const_blocks(const std::vector &); -- cgit v1.2.3-13-gbd6f