diff options
author | Bad Diode <bd@badd10de.dev> | 2022-04-11 18:39:27 -0300 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2022-04-11 18:39:27 -0300 |
commit | 140cd959daabf5c18b9cccc210a58ab50351e884 (patch) | |
tree | ff8480fc271d520463f8be4a344f63fb037fffed /src/nodes.h | |
parent | ab3e064c6f90ec94daad99b5a4c56e0abbcc79bb (diff) | |
download | bdl-140cd959daabf5c18b9cccc210a58ab50351e884.tar.gz bdl-140cd959daabf5c18b9cccc210a58ab50351e884.zip |
Add funcall node type and fix type resolution bugs
Diffstat (limited to 'src/nodes.h')
-rw-r--r-- | src/nodes.h | 7 |
1 files changed, 7 insertions, 0 deletions
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 { | |||
13 | NODE_FUN, | 13 | NODE_FUN, |
14 | NODE_BLOCK, | 14 | NODE_BLOCK, |
15 | NODE_IF, | 15 | NODE_IF, |
16 | NODE_FUNCALL, | ||
16 | } NodeType; | 17 | } NodeType; |
17 | 18 | ||
18 | typedef struct Node { | 19 | typedef struct Node { |
@@ -43,6 +44,12 @@ typedef struct Node { | |||
43 | struct Node **args; | 44 | struct Node **args; |
44 | } builtin; | 45 | } builtin; |
45 | 46 | ||
47 | // Function call. | ||
48 | struct { | ||
49 | struct Node *name; | ||
50 | struct Node **args; | ||
51 | } funcall; | ||
52 | |||
46 | // Variable definition. | 53 | // Variable definition. |
47 | struct { | 54 | struct { |
48 | struct Node *symbol; | 55 | struct Node *symbol; |