preprocesser publicly exposes only preprocesser function

The preprocess_* functions are now privately contained within the
implementation file to help the preprocesser outer function.

Furthermore I've simplified the API of the preprocess_* functions by
making them only return pp_err_t and store their results in a vector
parameter taken by reference.
This commit is contained in:
2024-04-15 18:37:45 +06:30
parent d594c0c531
commit ba3525d533
2 changed files with 51 additions and 63 deletions

View File

@@ -44,14 +44,4 @@ std::ostream &operator<<(std::ostream &, pp_err_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 *> &);
std::pair<std::vector<token_t *>, pp_err_t>
preprocess_use_blocks(const std::vector<token_t *> &);
// TODO: Implement this
std::pair<std::vector<token_t *>, pp_err_t>
preprocess_macro_blocks(const std::vector<token_t *> &);
#endif