summaryrefslogtreecommitdiff
path: root/src/parser/parser.h
diff options
context:
space:
mode:
authorZuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian>2026-01-24 00:09:29 +0000
committerZuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian>2026-01-24 00:09:29 +0000
commit27d041865d17a4055e7e6b3e297656d6f35a0f3b (patch)
tree8fe0cbd2fecf24a6da3150dc4a2666a1c6dec0c3 /src/parser/parser.h
parent1991cb62d26b954e54cf13c2d765fb3a0bbaa3ca (diff)
Welcome to 'def' + changed 'const'
Diffstat (limited to 'src/parser/parser.h')
-rw-r--r--src/parser/parser.h9
1 files changed, 5 insertions, 4 deletions
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);