From 52d1bd87900f28bf88bdbda708617f028b3b8255 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Fri, 16 Aug 2024 22:15:58 -0400 Subject: [PATCH] xo-reader: + exprstate.on_comma_token() [wip, not used] --- include/xo/reader/exprstate.hpp | 4 ++++ src/reader/exprstate.cpp | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/include/xo/reader/exprstate.hpp b/include/xo/reader/exprstate.hpp index 87eaf29d..74d8f0dc 100644 --- a/include/xo/reader/exprstate.hpp +++ b/include/xo/reader/exprstate.hpp @@ -107,6 +107,10 @@ namespace xo { virtual void on_symbol_token(const token_type & tk, exprstatestack * p_stack, rp * p_emit_expr); + /** handle incoming ',' token **/ + virtual void on_comma_token(const token_type & tk, + exprstatestack * p_stack, + rp * p_emit_expr); /** handle incoming ':' token **/ virtual void on_colon_token(const token_type & tk, exprstatestack * p_stack); diff --git a/src/reader/exprstate.cpp b/src/reader/exprstate.cpp index 43504622..17c68eff 100644 --- a/src/reader/exprstate.cpp +++ b/src/reader/exprstate.cpp @@ -118,6 +118,19 @@ namespace xo { this->illegal_input_error(self_name, tk); } + void + exprstate::on_comma_token(const token_type & tk, + exprstatestack * /*p_stack*/, + rp * /*p_emit_expr*/) + { + constexpr bool c_debug_flag = true; + scope log(XO_DEBUG(c_debug_flag)); + + constexpr const char * self_name = "exprstate::on_comma"; + + this->illegal_input_error(self_name, tk); + } + void exprstate::on_semicolon_token(const token_type & tk, exprstatestack * /*p_stack*/,