From c85ce38fbb02342d8ef00030d203ab6bcc690f73 Mon Sep 17 00:00:00 2001 From: A404M Date: Sat, 26 Apr 2025 15:14:45 +0330 Subject: add @isComptime to determine if code is running in comptime or not --- src/compiler/ast-tree.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/compiler/ast-tree.h') diff --git a/src/compiler/ast-tree.h b/src/compiler/ast-tree.h index aaf614e..39df36d 100644 --- a/src/compiler/ast-tree.h +++ b/src/compiler/ast-tree.h @@ -5,9 +5,11 @@ typedef enum AstTreeToken { AST_TREE_TOKEN_FUNCTION, + AST_TREE_TOKEN_BUILTIN_CAST, AST_TREE_TOKEN_BUILTIN_TYPE_OF, AST_TREE_TOKEN_BUILTIN_IMPORT, + AST_TREE_TOKEN_BUILTIN_IS_COMPTIME, AST_TREE_TOKEN_KEYWORD_PUTC, AST_TREE_TOKEN_KEYWORD_RETURN, @@ -382,6 +384,7 @@ bool setTypesBuiltinTypeOf(AstTree *tree, AstTreeSetTypesHelper helper, AstTreeFunctionCall *functionCall); bool setTypesBuiltinImport(AstTree *tree, AstTreeSetTypesHelper helper, AstTreeFunctionCall *functionCall); +bool setTypesBuiltinIsComptime(AstTree *tree, AstTreeSetTypesHelper helper); bool setTypesTypeArray(AstTree *tree, AstTreeSetTypesHelper helper); bool setTypesArrayAccess(AstTree *tree, AstTreeSetTypesHelper helper); -- cgit v1.2.3