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.
This commit is contained in:
@@ -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 *> &);
|
||||
|
||||
Reference in New Issue
Block a user