From 35425aa5837543e4cc3fc82266dc2ae429cb2779 Mon Sep 17 00:00:00 2001 From: Carlos Maniero Date: Mon, 8 May 2023 23:53:42 -0300 Subject: parser: Ensure the expression types When assign a variable or returning a value it now ensures that the expression matches the expected type. To make this possible a %result_type% field was added to ast_node_t and this field is used whenever to make the comparison. Signed-off-by: Carlos Maniero Signed-off-by: Johnny Richard --- src/scope.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/scope.c') diff --git a/src/scope.c b/src/scope.c index 6338e60..5b0eb56 100644 --- a/src/scope.c +++ b/src/scope.c @@ -115,6 +115,7 @@ scope_get(scope_t *scope, string_view_t name) return NULL; } + void scope_push(scope_t *scope, ast_identifier_t *identifier, ast_node_t *node) { -- cgit v1.2.3