From db6239342ffc6385a0c7659c8a01d2800a57da2c Mon Sep 17 00:00:00 2001 From: A404M Date: Tue, 3 Jun 2025 03:15:59 +0330 Subject: first version of code insertion --- src/compiler/ast-tree.h | 6 +++++- 1 file changed, 5 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 73f4462..89387f9 100644 --- a/src/compiler/ast-tree.h +++ b/src/compiler/ast-tree.h @@ -35,7 +35,8 @@ typedef enum AstTreeToken { AST_TREE_TOKEN_BUILTIN_BITWISE_OR, AST_TREE_TOKEN_BUILTIN_SHIFT_LEFT, AST_TREE_TOKEN_BUILTIN_SHIFT_RIGHT, - AST_TREE_TOKEN_BUILTIN_END = AST_TREE_TOKEN_BUILTIN_SHIFT_RIGHT, + AST_TREE_TOKEN_BUILTIN_INSERT, + AST_TREE_TOKEN_BUILTIN_END = AST_TREE_TOKEN_BUILTIN_INSERT, AST_TREE_TOKEN_KEYWORD_RETURN, AST_TREE_TOKEN_KEYWORD_BREAK, @@ -284,6 +285,7 @@ typedef struct AstTreeSetTypesHelper { AstTreeRoot *root; AstTreeWhile **loops; size_t loops_size; + AstTreeScope *scope; } AstTreeSetTypesHelper; typedef struct AstTreeStruct { @@ -524,6 +526,8 @@ bool setTypesBuiltinCLibrary(AstTree *tree, AstTreeSetTypesHelper helper, AstTreeFunctionCall *functionCall); bool setTypesBuiltinCFunction(AstTree *tree, AstTreeSetTypesHelper helper, AstTreeFunctionCall *functionCall); +bool setTypesBuiltinInsert(AstTree *tree, AstTreeSetTypesHelper helper, + AstTreeFunctionCall *functionCall); bool setTypesTypeArray(AstTree *tree, AstTreeSetTypesHelper helper); bool setTypesAstFunction(AstTreeFunction *function, AstTreeSetTypesHelper helper); -- cgit v1.2.3