summaryrefslogtreecommitdiff
path: root/src/runner
diff options
context:
space:
mode:
authorA404M <ahmadmahmoudiprogrammer@gmail.com>2025-03-27 07:35:58 +0330
committerA404M <ahmadmahmoudiprogrammer@gmail.com>2025-03-27 07:35:58 +0330
commit8ed01c4ca2d2356f008b40d8498173009f71d295 (patch)
tree931cd58461da6a137d7e6615657d7c7eb5bf1ed3 /src/runner
parent4c7d3c1d1e71823efc47a78ef8a608ee1656b035 (diff)
fix bug in multiple dereference
Diffstat (limited to 'src/runner')
-rw-r--r--src/runner/runner.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/runner/runner.c b/src/runner/runner.c
index efb91ee..4966893 100644
--- a/src/runner/runner.c
+++ b/src/runner/runner.c
@@ -868,7 +868,8 @@ AstTree *runExpression(AstTree *expr, bool *shouldRet) {
case AST_TREE_TOKEN_OPERATOR_DEREFERENCE: {
AstTreeSingleChild *metadata = expr->metadata;
AstTree *operand = runExpression(metadata, shouldRet);
- if (metadata->token != AST_TREE_TOKEN_VARIABLE) {
+ if (operand->token != AST_TREE_TOKEN_VARIABLE) {
+ printLog("%s", AST_TREE_TOKEN_STRINGS[operand->token]);
UNREACHABLE;
}
AstTreeVariable *variable = operand->metadata;