diff options
Diffstat (limited to 'src/ast.h')
-rw-r--r-- | src/ast.h | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -22,7 +22,8 @@ typedef enum { - TYPE_I32 + TYPE_I32, + TYPE_BOOL } type_t; typedef struct ast_node_t ast_node_t; @@ -67,12 +68,14 @@ typedef struct ast_binary_operation_t typedef enum { - AST_LITERAL_INTEGER + AST_LITERAL_INTEGER, + AST_LITERAL_BOOL } ast_literal_kind_t; typedef union { uint32_t integer; + bool boolean; } ast_literal_value_t; typedef struct ast_literal_t @@ -148,6 +151,9 @@ ast_node_t * ast_node_new_literal_integer(uint32_t number); ast_node_t * +ast_node_new_literal_bool(bool boolean); + +ast_node_t * ast_node_new_variable(ast_identifier_t *identifier); ast_node_t * |