From 880606908b205585ac2727c171c8ddc53b71effb Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Thu, 1 Aug 2024 13:05:58 +1000 Subject: [PATCH] xo-parser: simplify: exprstate::on_colon 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 1b349b88..99117193 100644 --- a/include/xo/parser/parser.hpp +++ b/include/xo/parser/parser.hpp @@ -236,7 +236,7 @@ namespace xo { expraction on_symbol(const token_type & tk, exprstatestack * p_stack, rp * p_emit_expr); - expraction on_colon(exprstatestack * p_stack); + void on_colon(exprstatestack * p_stack); expraction on_singleassign(exprstatestack * p_stack); void on_f64(const token_type & tk, exprstatestack * p_stack, diff --git a/src/parser/parser.cpp b/src/parser/parser.cpp index e49645f4..98baccfc 100644 --- a/src/parser/parser.cpp +++ b/src/parser/parser.cpp @@ -356,7 +356,7 @@ namespace xo { } } - expraction + void exprstate::on_colon(exprstatestack * p_stack) { constexpr bool c_debug_flag = true; scope log(XO_DEBUG(c_debug_flag)); @@ -375,11 +375,8 @@ namespace xo { this->exs_type_ = exprstatetype::def_2; p_stack->push_exprstate(exprstatetype::expect_type); - - return expraction::keep(); } else { assert(false); - return expraction(); } }