From 093c3bece426686b175db9ddaecd6abc8908fd87 Mon Sep 17 00:00:00 2001 From: A404M <ahmadmahmoudiprogrammer@gmail.com> Date: Fri, 23 May 2025 09:59:14 +0330 Subject: add @size_of --- src/compiler/ast-tree.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/compiler/ast-tree.h') diff --git a/src/compiler/ast-tree.h b/src/compiler/ast-tree.h index 7bf9811..d05db7b 100644 --- a/src/compiler/ast-tree.h +++ b/src/compiler/ast-tree.h @@ -9,6 +9,7 @@ typedef enum AstTreeToken { AST_TREE_TOKEN_BUILTIN_CAST, AST_TREE_TOKEN_BUILTIN_BEGIN = AST_TREE_TOKEN_BUILTIN_CAST, AST_TREE_TOKEN_BUILTIN_TYPE_OF, + AST_TREE_TOKEN_BUILTIN_SIZE_OF, AST_TREE_TOKEN_BUILTIN_IMPORT, AST_TREE_TOKEN_BUILTIN_IS_COMPTIME, AST_TREE_TOKEN_BUILTIN_STACK_ALLOC, @@ -26,7 +27,9 @@ typedef enum AstTreeToken { AST_TREE_TOKEN_BUILTIN_GREATER_OR_EQUAL, AST_TREE_TOKEN_BUILTIN_SMALLER_OR_EQUAL, AST_TREE_TOKEN_BUILTIN_PUTC, - AST_TREE_TOKEN_BUILTIN_END = AST_TREE_TOKEN_BUILTIN_PUTC, + AST_TREE_TOKEN_BUILTIN_C_LIBRARY, + AST_TREE_TOKEN_BUILTIN_C_FUNCTION, + AST_TREE_TOKEN_BUILTIN_END = AST_TREE_TOKEN_BUILTIN_C_FUNCTION, AST_TREE_TOKEN_KEYWORD_RETURN, AST_TREE_TOKEN_KEYWORD_BREAK, @@ -456,6 +459,8 @@ bool setTypesBuiltinCast(AstTree *tree, AstTreeSetTypesHelper helper, AstTreeFunctionCall *functionCall); bool setTypesBuiltinTypeOf(AstTree *tree, AstTreeSetTypesHelper helper, AstTreeFunctionCall *functionCall); +bool setTypesBuiltinSizeOf(AstTree *tree, AstTreeSetTypesHelper helper, + AstTreeFunctionCall *functionCall); bool setTypesBuiltinImport(AstTree *tree, AstTreeSetTypesHelper helper, AstTreeFunctionCall *functionCall); bool setTypesBuiltinIsComptime(AstTree *tree, AstTreeSetTypesHelper helper); -- cgit v1.2.3