From 00eaa55cc9bf2b46757a1d9d4aae671aeafdcb45 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Thu, 1 Aug 2024 10:43:33 +1000 Subject: [PATCH] xo-parser: pref: + exprstatestack arg to exprstate::on_symbol() --- include/xo/parser/parser.hpp | 2 +- src/parser/parser.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/xo/parser/parser.hpp b/include/xo/parser/parser.hpp index 43f80d39..ba903311 100644 --- a/include/xo/parser/parser.hpp +++ b/include/xo/parser/parser.hpp @@ -242,7 +242,7 @@ namespace xo { private: expraction on_def(exprstatestack * p_stack); - expraction on_symbol(const token_type & tk); + expraction on_symbol(const token_type & tk, exprstatestack * p_stack); expraction on_colon(); expraction on_singleassign(); expraction on_f64(const token_type & tk); diff --git a/src/parser/parser.cpp b/src/parser/parser.cpp index 56f06f20..0bf2c8a6 100644 --- a/src/parser/parser.cpp +++ b/src/parser/parser.cpp @@ -313,7 +313,9 @@ namespace xo { } expraction - exprstate::on_symbol(const token_type & tk) { + exprstate::on_symbol(const token_type & tk, + exprstatestack * /*p_stack*/) + { constexpr bool c_debug_flag = true; scope log(XO_DEBUG(c_debug_flag)); @@ -488,7 +490,7 @@ namespace xo { return expraction(); case tokentype::tk_symbol: - return this->on_symbol(tk); + return this->on_symbol(tk, p_stack); case tokentype::tk_leftparen: