diff options
Diffstat (limited to 'src/nodes.h')
-rw-r--r-- | src/nodes.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nodes.h b/src/nodes.h index c1520b3..4fb48a1 100644 --- a/src/nodes.h +++ b/src/nodes.h | |||
@@ -12,6 +12,7 @@ typedef enum NodeType { | |||
12 | NODE_SET, | 12 | NODE_SET, |
13 | NODE_FUN, | 13 | NODE_FUN, |
14 | NODE_BLOCK, | 14 | NODE_BLOCK, |
15 | NODE_IF, | ||
15 | } NodeType; | 16 | } NodeType; |
16 | 17 | ||
17 | typedef struct Node { | 18 | typedef struct Node { |
@@ -63,6 +64,13 @@ typedef struct Node { | |||
63 | struct { | 64 | struct { |
64 | struct Node **expr; | 65 | struct Node **expr; |
65 | } block; | 66 | } block; |
67 | |||
68 | // If statement. | ||
69 | struct { | ||
70 | struct Node *cond; | ||
71 | struct Node *expr_true; | ||
72 | struct Node *expr_false; | ||
73 | } ifexpr; | ||
66 | }; | 74 | }; |
67 | } Node; | 75 | } Node; |
68 | 76 | ||