diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-04-15 16:31:45 +0630 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-04-15 16:31:45 +0630 |
commit | b83bdd0d45223b789ec99bdc16d42fb646fdb8e2 (patch) | |
tree | af7995443345ff6ef727d2b26f281473a6c654c8 /asm/preprocesser.hpp | |
parent | c748ed8386bc8fd9f3795a02330e07095222ff68 (diff) | |
download | ovm-b83bdd0d45223b789ec99bdc16d42fb646fdb8e2.tar.gz ovm-b83bdd0d45223b789ec99bdc16d42fb646fdb8e2.tar.bz2 ovm-b83bdd0d45223b789ec99bdc16d42fb646fdb8e2.zip |
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.
Diffstat (limited to 'asm/preprocesser.hpp')
-rw-r--r-- | asm/preprocesser.hpp | 3 |
1 files changed, 1 insertions, 2 deletions
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<std::vector<token_t *>, pp_err_t> -preprocesser(std::vector<token_t *> &); +pp_err_t preprocesser(const std::vector<token_t *> &, std::vector<token_t *> &); std::pair<std::vector<token_t *>, pp_err_t> preprocess_const_blocks(const std::vector<token_t *> &); |