From 1c51840eb4ccde86c14d84672ba88822eacbdf8f Mon Sep 17 00:00:00 2001 From: xzyfer Date: Sun, 22 May 2016 21:15:49 +1000 Subject: [PATCH] Improve debugger coverage Add debugger support for the At_Root_Query node. Also output a Bubble nodes node. --- src/debugger.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/debugger.hpp b/src/debugger.hpp index 4216476625..88e29a5f06 100644 --- a/src/debugger.hpp +++ b/src/debugger.hpp @@ -65,6 +65,7 @@ inline void debug_ast(AST_Node* node, std::string ind, Env* env) std::cerr << " (" << pstate_source_position(node) << ")"; std::cerr << " " << bubble->tabs(); std::cerr << std::endl; + debug_ast(bubble->node(), ind + " ", env); } else if (dynamic_cast(node)) { Trace* trace = dynamic_cast(node); std::cerr << ind << "Trace " << trace; @@ -293,6 +294,13 @@ inline void debug_ast(AST_Node* node, std::string ind, Env* env) std::cerr << " (" << pstate_source_position(node) << ")" << std::endl; debug_ast(block->condition(), ind + " condition) "); + } else if (dynamic_cast(node)) { + At_Root_Query* block = dynamic_cast(node); + std::cerr << ind << "At_Root_Query " << block; + std::cerr << " (" << pstate_source_position(node) << ")" + << std::endl; + debug_ast(block->feature(), ind + " feature) "); + debug_ast(block->value(), ind + " value) "); } else if (dynamic_cast(node)) { Supports_Declaration* block = dynamic_cast(node); std::cerr << ind << "Supports_Declaration " << block;