minor logging adds

This commit is contained in:
Roland Conybeare 2025-07-28 15:16:11 -04:00
commit dc056cbc37
8 changed files with 27 additions and 5 deletions

View file

@ -221,8 +221,7 @@ namespace xo {
exprstate::on_leftparen_token(const token_type & tk,
parserstatemachine * p_psm)
{
constexpr bool c_debug_flag = true;
scope log(XO_DEBUG(c_debug_flag));
scope log(XO_DEBUG(p_psm->debug_flag()));
constexpr const char * c_self_name = "exprstate::on_leftparen_token";
const char * exp = get_expect_str();

View file

@ -7,6 +7,8 @@
#include "expect_formal_arglist_xs.hpp"
#include "expect_expr_xs.hpp"
#include "expect_type_xs.hpp"
#include "pretty_expression.hpp"
#include "pretty_variable.hpp"
#include "xo/expression/Lambda.hpp"
namespace xo {
@ -198,7 +200,7 @@ namespace xo {
if (def_var->valuetype() == nullptr) {
log && log("assign discovered lambda type T to enclosing define",
xtag("lhs", def_var),
xtag("lhs", def_var.get()),
xtag("T", print::unq(this->lambda_td_->canonical_name())));
def_var->assign_valuetype(lambda_td_);

View file

@ -56,9 +56,14 @@ namespace xo {
expr_span += used_span;
if (tk.is_valid()) {
log && log("input_state.current_line", tokenizer_.input_state().current_line());
/* forward just-read token to parser */
auto parser_result = this->parser_.include_token(tk);
log && log("after parser.include_token");
log && log("input_state.current_line", tokenizer_.input_state().current_line());
if (parser_result.is_expression()) {
log && log(xtag("outcome", "victory!"),
xtag("expr", parser_result.result_expr()));