implemented call expression parsing

This commit is contained in:
Lorenzo Torres 2025-12-01 13:00:07 +01:00
parent d1b89939ae
commit 37356facc2
6 changed files with 95 additions and 9 deletions

8
lc.c
View file

@ -108,6 +108,14 @@ void print_ast(ast_node *node, int depth) {
current = current->expr.unit_node.next;
}
break;
case NODE_CALL:
printf("Call: %.*s\n", (int)node->expr.call.name_len, node->expr.call.name);
current = node->expr.call.parameters;
while (current && current->type == NODE_UNIT) {
print_ast(current->expr.unit_node.expr, depth + 1);
current = current->expr.unit_node.next;
}
break;
case NODE_IF:
printf("IfStmt (Fields missing in struct)\n");
break;