diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-02-07 15:42:00 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-02-07 17:33:55 +0900 |
| commit | cdddf2422553f1f21c8d2c57cd382b8362dc80fb (patch) | |
| tree | 3053026498552aecda2e4889c8455298ad70c8cb /src/ast.c | |
| parent | e1042a6373773830297dfd5718938c12f21ae624 (diff) | |
| download | ducc-cdddf2422553f1f21c8d2c57cd382b8362dc80fb.tar.gz ducc-cdddf2422553f1f21c8d2c57cd382b8362dc80fb.tar.zst ducc-cdddf2422553f1f21c8d2c57cd382b8362dc80fb.zip | |
feat: support function calls via function pointers
The two-pass parsing of function pointer declaration is referenced from chibicc:
https://github.com/rui314/chibicc
Diffstat (limited to 'src/ast.c')
| -rw-r--r-- | src/ast.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -454,11 +454,11 @@ AstNode* ast_new_str_expr(int idx, Type* ty) { return e; } -AstNode* ast_new_func_call(const char* name, Type* ty) { +AstNode* ast_new_func_call(AstNode* func, AstNode* args) { AstNode* e = ast_new(AstNodeKind_func_call); e->as.func_call = calloc(1, sizeof(FuncCallNode)); - e->as.func_call->name = name; - e->ty = ty; + e->as.func_call->func = func; + e->as.func_call->args = args; return e; } |
