Skip to content

Commit

Permalink
fix(while): Fixed while unknown node and working properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
natangscalvence committed Jan 17, 2025
1 parent d53016c commit 72f379a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/frontend/parser/printer/print_ast.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const char* returnASTNodeName(NodeType node_type) {
case NODE_PARAMETER: return "Function Parameter";
case NODE_FOR: return "For Statement";
case NODE_IF: return "If Statement";
case NODE_WHILE: return "While Statement";
case NODE_DECORATOR: return "Decorator";
case NODE_MEMBER: return "Member Access";
case NODE_MEMBER_PROPERTY: return "Member Property";
Expand Down Expand Up @@ -110,6 +111,11 @@ void print_ast_node(const AstNode *node, int depth, VisitedNodes *visited) {
break;
}

case NODE_WHILE: {
print_while(node, depth, visited);
break;
}

case NODE_STRING: {
print_string(node, depth);
} break;
Expand Down

0 comments on commit 72f379a

Please sign in to comment.