From 57cee82f9136f0a0246d3b1d3191226bd4234d43 Mon Sep 17 00:00:00 2001 From: Carlos Maniero Date: Tue, 2 May 2023 23:45:48 -0300 Subject: style: Improve ast node initialization This also removes the identifier node since it was replaced by variable. Signed-off-by: Carlos Maniero --- src/ast.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/ast.h') diff --git a/src/ast.h b/src/ast.h index 5095852..e8fe0f6 100644 --- a/src/ast.h +++ b/src/ast.h @@ -97,7 +97,6 @@ typedef enum { AST_BINARY_OPERATION, AST_FUNCTION_DECLARATION, - AST_IDENTIFIER, AST_LITERAL, AST_RETURN_STMT, AST_UNKOWN_NODE, @@ -114,7 +113,6 @@ typedef union ast_return_stmt_t return_stmt; ast_variable_declaration_t variable_declaration; ast_variable_assignment_t variable_assignment; - ast_identifier_t identifier; ast_variable_t variable; } ast_node_data_t; @@ -134,8 +132,6 @@ ast_node_init_binary_operation(ast_node_t *node, ast_binary_operation_kind_t kin void ast_node_init_function_declaration(ast_node_t *node, string_view_t function_name, type_t return_type, vector_t *body); void -ast_node_init_identifier(ast_node_t *node, string_view_t name); -void ast_node_init_return_stmt(ast_node_t *node, ast_node_t *argument); void ast_node_init_variable_declaration(ast_node_t *node, string_view_t variable_name, type_t type, ast_node_t *value); -- cgit v1.2.3