From e12086b3a9f2610425ca6fa73749453c762eb56e Mon Sep 17 00:00:00 2001 From: A404M Date: Sun, 11 May 2025 21:13:17 +0330 Subject: added comptime keyword to variables --- src/compiler/ast-tree.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/compiler/ast-tree.h') diff --git a/src/compiler/ast-tree.h b/src/compiler/ast-tree.h index c1f0464..9eda3f0 100644 --- a/src/compiler/ast-tree.h +++ b/src/compiler/ast-tree.h @@ -183,6 +183,7 @@ typedef struct AstTreeTypeFunctionArgument { char const *name_begin; char const *name_end; AstTree *type; + bool isComptime; } AstTreeTypeFunctionArgument; typedef struct AstTreeTypeFunction { @@ -312,15 +313,13 @@ AstTreeVariables copyAstTreeVariables(AstTreeVariables variables, AstTreeRoots makeAstTree(const char *filePath #ifdef PRINT_STATISTICS , - Time *lexingTime, - Time *parsingTime + Time *lexingTime, Time *parsingTime #endif ); AstTreeRoot *getAstTreeRoot(char *filePath, AstTreeRoots *roots #ifdef PRINT_STATISTICS , - Time *lexingTime, - Time *parsingTime + Time *lexingTime, Time *parsingTime #endif ); AstTreeRoot *makeAstRoot(const ParserNode *parsedRoot, char *filePath); @@ -342,8 +341,7 @@ AstTree *astTreeParseValue(const ParserNode *parserNode, AstTreeToken token, AstTree *astTreeParseString(const ParserNode *parserNode, AstTreeHelper *helper); AstTree *astTreeParseKeyword(const ParserNode *parserNode, AstTreeToken token); -AstTree *astTreeParsePutc(const ParserNode *parserNode, - AstTreeHelper *helper); +AstTree *astTreeParsePutc(const ParserNode *parserNode, AstTreeHelper *helper); AstTree *astTreeParseReturn(const ParserNode *parserNode, AstTreeHelper *helper); AstTree *astTreeParseBinaryOperator(const ParserNode *parserNode, @@ -375,7 +373,7 @@ AstTree *astTreeParseBracket(const ParserNode *parserNode, AstTreeHelper *helper, AstTreeToken token); bool isFunction(AstTree *value); -bool isConst(AstTree *tree,bool byValue); +bool isConst(AstTree *tree, bool byValue); AstTree *makeTypeOf(AstTree *value); bool typeIsEqual(AstTree *type0, AstTree *type1); bool typeIsEqualBack(const AstTree *type0, const AstTree *type1); -- cgit v1.2.3