diff options
author | Carlos Maniero <carlos@maniero.me> | 2023-05-02 23:45:48 -0300 |
---|---|---|
committer | Johnny Richard <johnny@johnnyrichard.com> | 2023-05-03 22:32:37 +0200 |
commit | 57cee82f9136f0a0246d3b1d3191226bd4234d43 (patch) | |
tree | e0c3c4d39fa85bb4e2ee935d9fcb02db8e298895 /src/ast.h | |
parent | e3d8e031c6f20c68f2227028ee8b3e73cd9b8161 (diff) |
style: Improve ast node initialization
This also removes the identifier node since it was replaced by
variable.
Signed-off-by: Carlos Maniero <carlos@maniero.me>
Diffstat (limited to 'src/ast.h')
-rw-r--r-- | src/ast.h | 4 |
1 files changed, 0 insertions, 4 deletions
@@ -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); |