aboutsummaryrefslogtreecommitdiffstats
path: root/src/nodes.h
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2022-04-11 18:39:27 -0300
committerBad Diode <bd@badd10de.dev>2022-04-11 18:39:27 -0300
commit140cd959daabf5c18b9cccc210a58ab50351e884 (patch)
treeff8480fc271d520463f8be4a344f63fb037fffed /src/nodes.h
parentab3e064c6f90ec94daad99b5a4c56e0abbcc79bb (diff)
downloadbdl-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.h7
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
18typedef struct Node { 19typedef 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;