diff options
author | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2025-02-08 10:58:07 +0330 |
---|---|---|
committer | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2025-02-08 10:58:07 +0330 |
commit | cb26dd0fc9c1e33be1c32eb85b04434526004e6a (patch) | |
tree | 8a467633398b2384216c5ac652a2ff86a2b5d3f3 /src/runner/runner.c | |
parent | f362a9a64004ba61e326e223d0d28997762afe71 (diff) |
add bool
Diffstat (limited to 'src/runner/runner.c')
-rw-r--r-- | src/runner/runner.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/runner/runner.c b/src/runner/runner.c index 50d87df..606fe89 100644 --- a/src/runner/runner.c +++ b/src/runner/runner.c @@ -78,8 +78,10 @@ AstTree *runAstTreeFunction(AstTreeFunction *function, AstTree **arguments, case AST_TREE_TOKEN_TYPE_FUNCTION: case AST_TREE_TOKEN_TYPE_VOID: case AST_TREE_TOKEN_TYPE_U64: + case AST_TREE_TOKEN_TYPE_BOOL: case AST_TREE_TOKEN_VARIABLE: case AST_TREE_TOKEN_VALUE_U64: + case AST_TREE_TOKEN_VALUE_BOOL: case AST_TREE_TOKEN_NONE: } printLog("%d", expr.token); @@ -94,6 +96,9 @@ AstTree *calcAstTreeValue(AstTree *tree) { case AST_TREE_TOKEN_VALUE_U64: { return deepCopyAstTree(tree); } + case AST_TREE_TOKEN_VALUE_BOOL: { + return deepCopyAstTree(tree); + } case AST_TREE_TOKEN_VARIABLE: { AstTreeVariable *variable = tree->metadata; return calcAstTreeValue(variable->value); @@ -132,6 +137,7 @@ AstTree *calcAstTreeValue(AstTree *tree) { case AST_TREE_TOKEN_TYPE_FUNCTION: case AST_TREE_TOKEN_TYPE_VOID: case AST_TREE_TOKEN_TYPE_U64: + case AST_TREE_TOKEN_TYPE_BOOL: case AST_TREE_TOKEN_VARIABLE_DEFINE: case AST_TREE_TOKEN_OPERATOR_ASSIGN: case AST_TREE_TOKEN_NONE: @@ -142,6 +148,7 @@ AstTree *calcAstTreeValue(AstTree *tree) { AstTree *deepCopyAstTree(AstTree *tree) { switch (tree->token) { case AST_TREE_TOKEN_VALUE_U64: + case AST_TREE_TOKEN_VALUE_BOOL: return newAstTree(tree->token, tree->metadata, copyAstTree(tree->type)); case AST_TREE_TOKEN_VARIABLE: case AST_TREE_TOKEN_FUNCTION: @@ -151,6 +158,7 @@ AstTree *deepCopyAstTree(AstTree *tree) { case AST_TREE_TOKEN_TYPE_FUNCTION: case AST_TREE_TOKEN_TYPE_VOID: case AST_TREE_TOKEN_TYPE_U64: + case AST_TREE_TOKEN_TYPE_BOOL: case AST_TREE_TOKEN_FUNCTION_CALL: case AST_TREE_TOKEN_VARIABLE_DEFINE: case AST_TREE_TOKEN_OPERATOR_ASSIGN: |