From 5281ccb3f50ed4dd74192aab612570abb279964c Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Thu, 1 Aug 2024 13:04:58 +1000 Subject: [PATCH] xo-parser: simplify: exprstate::on_f64() drop retval --- include/xo/parser/parser.hpp | 6 +++--- src/parser/parser.cpp | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/include/xo/parser/parser.hpp b/include/xo/parser/parser.hpp index e087424f..1b349b88 100644 --- a/include/xo/parser/parser.hpp +++ b/include/xo/parser/parser.hpp @@ -238,9 +238,9 @@ namespace xo { rp * p_emit_expr); expraction on_colon(exprstatestack * p_stack); expraction on_singleassign(exprstatestack * p_stack); - expraction on_f64(const token_type & tk, - exprstatestack * p_stack, - rp * p_emit_expr); + void on_f64(const token_type & tk, + exprstatestack * p_stack, + rp * p_emit_expr); private: /** diff --git a/src/parser/parser.cpp b/src/parser/parser.cpp index aac8aa50..e49645f4 100644 --- a/src/parser/parser.cpp +++ b/src/parser/parser.cpp @@ -409,7 +409,7 @@ namespace xo { } } - expraction + void exprstate::on_f64(const token_type & tk, exprstatestack * p_stack, rp * p_emit_expr) @@ -429,14 +429,13 @@ namespace xo { if (this->exs_type_ == exprstatetype::expect_rhs_expression) { p_stack->pop_exprstate(); - return p_stack->top_exprstate() + p_stack->top_exprstate() .on_exprir(exprir(exprirtype::expression, Constant::make(tk.f64_value())), p_stack, p_emit_expr); } else { assert(false); - return expraction(); } }