From 909101cd8de8b1879e1852c9c24511fae7a68202 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Thu, 1 Aug 2024 13:07:33 +1000 Subject: [PATCH] xo-parser: simplify: exprstate::on_singleassign drop retval --- include/xo/parser/parser.hpp | 2 +- src/parser/parser.cpp | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/include/xo/parser/parser.hpp b/include/xo/parser/parser.hpp index 99117193..4d45f6e7 100644 --- a/include/xo/parser/parser.hpp +++ b/include/xo/parser/parser.hpp @@ -237,7 +237,7 @@ namespace xo { exprstatestack * p_stack, rp * p_emit_expr); void on_colon(exprstatestack * p_stack); - expraction on_singleassign(exprstatestack * p_stack); + void on_singleassign(exprstatestack * p_stack); void on_f64(const token_type & tk, exprstatestack * p_stack, rp * p_emit_expr); diff --git a/src/parser/parser.cpp b/src/parser/parser.cpp index 98baccfc..a1ee3ae2 100644 --- a/src/parser/parser.cpp +++ b/src/parser/parser.cpp @@ -380,7 +380,7 @@ namespace xo { } } - expraction + void exprstate::on_singleassign(exprstatestack * p_stack) { constexpr bool c_debug_flag = true; scope log(XO_DEBUG(c_debug_flag)); @@ -398,11 +398,8 @@ namespace xo { this->exs_type_ = exprstatetype::def_4; p_stack->push_exprstate(exprstatetype::expect_rhs_expression); - - return expraction::keep(); } else { assert(false); - return expraction(); } }