Skip to content

Commit

Permalink
Merge pull request #2093 from xzyfer/feat/better-debug
Browse files Browse the repository at this point in the history
Improve debugger coverage
  • Loading branch information
xzyfer committed May 22, 2016
2 parents 2b2f484 + 1c51840 commit 05fa158
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/debugger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<Trace*>(node)) {
Trace* trace = dynamic_cast<Trace*>(node);
std::cerr << ind << "Trace " << trace;
Expand Down Expand Up @@ -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<At_Root_Query*>(node)) {
At_Root_Query* block = dynamic_cast<At_Root_Query*>(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<Supports_Declaration*>(node)) {
Supports_Declaration* block = dynamic_cast<Supports_Declaration*>(node);
std::cerr << ind << "Supports_Declaration " << block;
Expand Down

0 comments on commit 05fa158

Please # to comment.