summaryrefslogtreecommitdiff
path: root/src/ast.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast.c')
-rw-r--r--src/ast.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/ast.c b/src/ast.c
index 5938e1d..8a46034 100644
--- a/src/ast.c
+++ b/src/ast.c
@@ -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();