added parsing of if-else statements and cleaned up the parser

This commit is contained in:
cozis
2021-10-31 05:42:26 +00:00
parent b56e28f36b
commit 58f4c423cb
6 changed files with 162 additions and 39 deletions
+8
View File
@@ -6,6 +6,7 @@
typedef enum {
NODE_EXPR,
NODE_IFELSE,
} NodeKind;
typedef enum {
@@ -70,4 +71,11 @@ typedef struct {
int count;
} OperExprNode;
typedef struct {
Node base;
Node *condition;
Node *true_branch;
Node *false_branch;
} IfElseNode;
#endif