added parsing of if-else statements and cleaned up the parser
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user