diff options
Diffstat (limited to 'src/runner')
-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: |