Skip to content

Commit 1c51840

Browse files
committed
Improve debugger coverage
Add debugger support for the At_Root_Query node. Also output a Bubble nodes node.
1 parent a227821 commit 1c51840

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/debugger.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ inline void debug_ast(AST_Node* node, std::string ind, Env* env)
6565
std::cerr << " (" << pstate_source_position(node) << ")";
6666
std::cerr << " " << bubble->tabs();
6767
std::cerr << std::endl;
68+
debug_ast(bubble->node(), ind + " ", env);
6869
} else if (dynamic_cast<Trace*>(node)) {
6970
Trace* trace = dynamic_cast<Trace*>(node);
7071
std::cerr << ind << "Trace " << trace;
@@ -293,6 +294,13 @@ inline void debug_ast(AST_Node* node, std::string ind, Env* env)
293294
std::cerr << " (" << pstate_source_position(node) << ")"
294295
<< std::endl;
295296
debug_ast(block->condition(), ind + " condition) ");
297+
} else if (dynamic_cast<At_Root_Query*>(node)) {
298+
At_Root_Query* block = dynamic_cast<At_Root_Query*>(node);
299+
std::cerr << ind << "At_Root_Query " << block;
300+
std::cerr << " (" << pstate_source_position(node) << ")"
301+
<< std::endl;
302+
debug_ast(block->feature(), ind + " feature) ");
303+
debug_ast(block->value(), ind + " value) ");
296304
} else if (dynamic_cast<Supports_Declaration*>(node)) {
297305
Supports_Declaration* block = dynamic_cast<Supports_Declaration*>(node);
298306
std::cerr << ind << "Supports_Declaration " << block;

0 commit comments

Comments
 (0)