diff options
Diffstat (limited to 'src/ast.c')
-rw-r--r-- | src/ast.c | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -118,6 +118,24 @@ ast_node_new_literal_integer(uint32_t number) } ast_node_t * +ast_node_new_literal_bool(bool boolean) +{ + ast_node_t *node = ast_node_new(); + + *node = (ast_node_t){ + .kind = AST_LITERAL, + .data = { + .literal = { + .kind = AST_LITERAL_BOOL, + .value = { .boolean = boolean } + }, + }, + }; + + return node; +} + +ast_node_t * ast_node_new_binary_operation(ast_binary_operation_kind_t kind, ast_node_t *left, ast_node_t *right) { ast_node_t *node = ast_node_new(); |