aboutsummaryrefslogtreecommitdiff
path: root/src/compiler/ast-tree.h
diff options
context:
space:
mode:
authorA404M <ahmadmahmoudiprogrammer@gmail.com>2025-05-12 01:32:16 +0330
committerA404M <ahmadmahmoudiprogrammer@gmail.com>2025-05-12 01:32:16 +0330
commitcfd7848462aa50e039d73df041eab93f9a48b49f (patch)
treee0ab49724ae6c931ec80df1ef03ab3c2e7d90f98 /src/compiler/ast-tree.h
parent7def336c06c38a9fd9104bb157cb2238bc89585d (diff)
add type of shape shifter
Diffstat (limited to 'src/compiler/ast-tree.h')
-rw-r--r--src/compiler/ast-tree.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/compiler/ast-tree.h b/src/compiler/ast-tree.h
index 5548c60..16f137e 100644
--- a/src/compiler/ast-tree.h
+++ b/src/compiler/ast-tree.h
@@ -53,6 +53,7 @@ typedef enum AstTreeToken {
AST_TREE_TOKEN_TYPE_F128,
AST_TREE_TOKEN_TYPE_CODE,
AST_TREE_TOKEN_TYPE_NAMESPACE,
+ AST_TREE_TOKEN_TYPE_SHAPE_SHIFTER,
AST_TREE_TOKEN_TYPE_BOOL,
AST_TREE_TOKEN_VALUE_VOID,
AST_TREE_TOKEN_STATIC_VARS_END = AST_TREE_TOKEN_VALUE_VOID,
@@ -125,6 +126,7 @@ extern AstTree AST_TREE_F64_TYPE;
extern AstTree AST_TREE_F128_TYPE;
extern AstTree AST_TREE_CODE_TYPE;
extern AstTree AST_TREE_NAMESPACE_TYPE;
+extern AstTree AST_TREE_SHAPE_SHIFTER_TYPE;
extern AstTree AST_TREE_VOID_VALUE;
typedef struct AstTreeVariable {
@@ -299,8 +301,8 @@ AstTree *newAstTree(AstTreeToken token, void *metadata, AstTree *type,
char const *str_begin, char const *str_end);
AstTree *copyAstTree(AstTree *tree);
AstTree *copyAstTreeBack(AstTree *tree, AstTreeVariables oldVariables[],
- AstTreeVariables newVariables[],
- size_t variables_size);
+ AstTreeVariables newVariables[], size_t variables_size,
+ bool safetyCheck);
AstTreeVariable *copyAstTreeBackFindVariable(AstTreeVariable *variable,
AstTreeVariables oldVariables[],
AstTreeVariables newVariables[],
@@ -308,7 +310,7 @@ AstTreeVariable *copyAstTreeBackFindVariable(AstTreeVariable *variable,
AstTreeVariables copyAstTreeVariables(AstTreeVariables variables,
AstTreeVariables oldVariables[],
AstTreeVariables newVariables[],
- size_t variables_size);
+ size_t variables_size, bool safetyCheck);
AstTreeRoots makeAstTree(const char *filePath
#ifdef PRINT_STATISTICS
@@ -373,6 +375,7 @@ AstTree *astTreeParseBracket(const ParserNode *parserNode,
AstTreeHelper *helper, AstTreeToken token);
bool isFunction(AstTree *value);
+bool isShapeShifter(AstTreeFunction *function);
bool isConst(AstTree *tree);
AstTree *makeTypeOf(AstTree *value);
bool typeIsEqual(AstTree *type0, AstTree *type1);