From 4a7341e26c9c2bca261520886b10f5c8246f59ef Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 15 Apr 2024 16:33:02 +0630 Subject: Propagate changes to lerr_t into preprocesser --- asm/preprocesser.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/asm/preprocesser.cpp b/asm/preprocesser.cpp index c0cf9e2..e6d40b6 100644 --- a/asm/preprocesser.cpp +++ b/asm/preprocesser.cpp @@ -81,7 +81,7 @@ preprocess_use_blocks(const vector &tokens) std::vector ftokens; lerr_t lerr = tokenise_buffer(source.value(), ftokens); - if (lerr != lerr_t::OK) + if (lerr.type != lerr_type_t::OK) { VCLEAR(new_tokens); return ERR(pp_err_t(pp_err_type_t::FILE_PARSE_ERROR, name, lerr)); @@ -196,19 +196,17 @@ std::ostream &operator<<(std::ostream &os, pp_err_t &err) return os << "FILE_NONEXISTENT"; case FILE_PARSE_ERROR: return os << "FILE_PARSE_ERROR -> \n\t[" << err.reference->content - << "]: " << lerr_as_cstr(err.lerr); + << "]: " << err.lerr; case UNKNOWN_NAME: return os << "UNKNOWN_NAME"; } return os; } -pp_err_t::pp_err_t() - : reference{nullptr}, type{pp_err_type_t::OK}, lerr{lerr_t::OK} +pp_err_t::pp_err_t() : reference{nullptr}, type{pp_err_type_t::OK}, lerr{} {} -pp_err_t::pp_err_t(pp_err_type_t e) - : reference{nullptr}, type{e}, lerr{lerr_t::OK} +pp_err_t::pp_err_t(pp_err_type_t e) : reference{nullptr}, type{e}, lerr{} {} pp_err_t::pp_err_t(pp_err_type_t err, const token_t *ref) -- cgit v1.2.3-13-gbd6f