xo-reader: debug: + log output

This commit is contained in:
Roland Conybeare 2024-08-27 16:21:54 -04:00
commit 00625ee063
2 changed files with 13 additions and 0 deletions

View file

@ -32,11 +32,19 @@ namespace xo {
void
parserstatemachine::push_envframe(envframe x) {
constexpr bool c_debug_flag = true;
scope log(XO_DEBUG(c_debug_flag));
log && log(xtag("frame", x));
p_env_stack_->push_envframe(std::move(x));
}
void
parserstatemachine::pop_envframe() {
constexpr bool c_debug_flag = true;
scope log(XO_DEBUG(c_debug_flag));
p_env_stack_->pop_envframe();
}
} /*namespace scm*/

View file

@ -35,6 +35,11 @@ namespace xo {
sequence_xs::on_expr(ref::brw<Expression> expr,
parserstatemachine * p_psm)
{
constexpr bool c_debug_flag = true;
scope log(XO_DEBUG(c_debug_flag));
log && log(xtag("expr", expr.promote()));
/* TODO: if expr is a DefineExpr,
* then need to rewrite...
*