From 5c0542111e67d60490c7e218b985d6c6b9eaf9f2 Mon Sep 17 00:00:00 2001 From: A404M Date: Fri, 4 Apr 2025 02:04:51 +0330 Subject: arg names are in function types now --- src/compiler/ast-tree.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/compiler/ast-tree.h') diff --git a/src/compiler/ast-tree.h b/src/compiler/ast-tree.h index e12daec..1513284 100644 --- a/src/compiler/ast-tree.h +++ b/src/compiler/ast-tree.h @@ -120,8 +120,16 @@ typedef struct AstTreeFunction { AstTree *returnType; } AstTreeFunction; +typedef struct AstTreeTypeFunctionArgument { + char *str_begin; + char *str_end; + char *name_begin; + char *name_end; + AstTree *type; +} AstTreeTypeFunctionArgument; + typedef struct AstTreeTypeFunction { - AstTree **arguments; + AstTreeTypeFunctionArgument *arguments; size_t arguments_size; AstTree *returnType; } AstTreeTypeFunction; @@ -234,7 +242,6 @@ AstTree *astTreeParseCurlyBracket(ParserNode *parserNode, AstTreeHelper *helper); AstTree *astTreeParseParenthesis(ParserNode *parserNode, AstTreeHelper *helper); -AstTreeFunction *getFunction(AstTree *value); bool isFunction(AstTree *value); bool isConst(AstTree *tree, AstTreeHelper *helper); AstTree *makeTypeOf(AstTree *value); -- cgit v1.2.3