From c1a1bd2320b4c1508c4ab20d23b7c193a94d8026 Mon Sep 17 00:00:00 2001 From: Carlos Maniero Date: Tue, 25 Apr 2023 03:52:59 -0300 Subject: parser: Add support for variables and identifiers in function body This commit adds support for variables and identifiers in the function body of the parser, stored as a vector. However, at this point, identifier resolution is not fully implemented, and we currently accept identifiers without checking if they can be resolved. This is a known limitation that will be addressed in a future commit once hash-tables are added to the parser. Signed-off-by: Carlos Maniero Reviewed-by: Johnny Richard --- src/parser.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/parser.h') diff --git a/src/parser.h b/src/parser.h index 00d1aae..4b6b5a9 100644 --- a/src/parser.h +++ b/src/parser.h @@ -29,6 +29,7 @@ typedef struct parser_error_t { typedef struct parser_t { lexer_t *lexer; int errors_len; + // FIXME: replace with vector parser_error_t errors[1]; } parser_t; -- cgit v1.2.3