From 27d041865d17a4055e7e6b3e297656d6f35a0f3b Mon Sep 17 00:00:00 2001 From: Zuhaitz Méndez Fernández de Aránguiz Date: Sat, 24 Jan 2026 00:09:29 +0000 Subject: Welcome to 'def' + changed 'const' --- src/parser/parser.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/parser/parser.h') diff --git a/src/parser/parser.h b/src/parser/parser.h index 6ac55bf..8857641 100644 --- a/src/parser/parser.h +++ b/src/parser/parser.h @@ -41,6 +41,7 @@ typedef struct Symbol int is_autofree; Token decl_token; int is_const_value; + int is_def; int const_int_val; int is_moved; struct Symbol *next; @@ -56,14 +57,14 @@ typedef struct Scope typedef struct FuncSig { char *name; - Token decl_token; // For LSP + Token decl_token; int total_args; char **defaults; Type **arg_types; Type *ret_type; int is_varargs; - int is_async; // Async function flag - int must_use; // Attribute: warn if return value discarded + int is_async; + int must_use; struct FuncSig *next; } FuncSig; @@ -438,7 +439,7 @@ ASTNode *parse_defer(ParserContext *ctx, Lexer *l); ASTNode *parse_asm(ParserContext *ctx, Lexer *l); ASTNode *parse_plugin(ParserContext *ctx, Lexer *l); ASTNode *parse_var_decl(ParserContext *ctx, Lexer *l); -ASTNode *parse_const(ParserContext *ctx, Lexer *l); +ASTNode *parse_def(ParserContext *ctx, Lexer *l); ASTNode *parse_type_alias(ParserContext *ctx, Lexer *l); ASTNode *parse_function(ParserContext *ctx, Lexer *l, int is_async); -- cgit v1.2.3