From 140cd959daabf5c18b9cccc210a58ab50351e884 Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Mon, 11 Apr 2022 18:39:27 -0300 Subject: Add funcall node type and fix type resolution bugs --- src/nodes.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/nodes.h') diff --git a/src/nodes.h b/src/nodes.h index 52022cc..11b30dd 100644 --- a/src/nodes.h +++ b/src/nodes.h @@ -13,6 +13,7 @@ typedef enum NodeType { NODE_FUN, NODE_BLOCK, NODE_IF, + NODE_FUNCALL, } NodeType; typedef struct Node { @@ -43,6 +44,12 @@ typedef struct Node { struct Node **args; } builtin; + // Function call. + struct { + struct Node *name; + struct Node **args; + } funcall; + // Variable definition. struct { struct Node *symbol; -- cgit v1.2.1