From e255b793d66441097955163e3abb8f5d68ed54ba Mon Sep 17 00:00:00 2001 From: Carlos Maniero Date: Tue, 2 May 2023 23:45:54 -0300 Subject: parser: Variable assignment allocates their own node This commit makes variable assignment parser to allocate memory for the node. It also moves the node initialization to the ast.c to follow our standard for node initialization. Signed-off-by: Carlos Maniero --- src/ast.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/ast.h') diff --git a/src/ast.h b/src/ast.h index e8fe0f6..fb2bb74 100644 --- a/src/ast.h +++ b/src/ast.h @@ -140,5 +140,7 @@ void ast_literal_integer_create(ast_node_t *node, uint32_t number); void ast_node_init_variable(ast_node_t *node, ast_identifier_t *identifier); +void +ast_node_init_variable_assignment(ast_node_t *node, ast_identifier_t *identifier, ast_node_t *expression); #endif /* AST_H */ -- cgit v1.2.3