X-Git-Url: https://gitweb.ps.run/iftint/blobdiff_plain/343de1d73b29b83db7ea5ecf9b6d18fe50733f22..d855fc21ed7a065f8b0d6f2607fef09b4c6865e1:/main3.c diff --git a/main3.c b/main3.c index 7929e67..c3da7f6 100644 --- a/main3.c +++ b/main3.c @@ -237,7 +237,7 @@ void NodeDraw(Node *n) { switch (n->kind) { case NK_Namespace: { PRINTF("namespace"); printf(" %s {", n->data); indent++; for (int i = 0; i < n->childCount; i++) { INDENT NodeDraw(NodeGetChild(n, i)); } indent--; INDENT printf("}"); break; } case NK_Struct: { PRINTF("struct"); printf(" %s {", n->data); indent++; for (int i = 0; i < n->childCount; i++) { INDENT NodeDraw(NodeGetChild(n, i)); } indent--; INDENT printf("}"); break; } - case NK_Func: { PRINTF("fn"); printf(" %s ", n->data); NodeDraw(NodeGetChild(n, 0)); NodeDraw(NodeGetChild(n, 1)); break; } + case NK_Func: { PRINTF("fn"); printf(" %s ", n->data); NodeDraw(NodeGetChild(n, 0)); printf(" "); NodeDraw(NodeGetChild(n, 1)); break; } case NK_VarList: case NK_ExprList: { PRINTF("("); for (int i = 0; i < n->childCount; i++) { if (i != 0) printf(", "); NodeDraw(NodeGetChild(n, i)); } PRINTF(")"); break; } case NK_Var: { PRINTF("[%s]", n->data); break; }