Skip to content

Commit 2ae29cc

Browse files
committed
tweaked DumpAST output
1 parent db3d400 commit 2ae29cc

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

ast.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,19 @@ static void doASTDump(AST *ast, int indent)
905905
return;
906906
}
907907
switch (ast->kind) {
908+
case AST_LISTHOLDER:
909+
printf("%*c<listholder>\n", indent, ' ');
910+
while (ast && ast->kind == AST_LISTHOLDER) {
911+
doASTDump(ast->left, indent+2);
912+
ast = ast->right;
913+
}
914+
if (ast) {
915+
printf("%*c<MALFORMED>\n", indent, ' ');
916+
doASTDump(ast, indent+2);
917+
printf("%*c</MALFORMED>\n", indent, ' ');
918+
}
919+
printf("%*c</listholder>\n", indent, ' ');
920+
return;
908921
case AST_STMTLIST:
909922
printf("%*c<stmtlist>\n", indent, ' ');
910923
while (ast && ast->kind == AST_STMTLIST) {

0 commit comments

Comments
 (0)