diff options
author | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2025-03-26 02:06:04 +0330 |
---|---|---|
committer | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2025-03-26 02:06:04 +0330 |
commit | 3950c23e40207cd8a374fcd4aa5739c0a63115f5 (patch) | |
tree | 9bc4703a7eeb2d2ae9ca6324e61c56598cefa134 /src/runner/runner.c | |
parent | 7bd975ec69c8dc9d5a6343a2e5f06bd7dd78d78e (diff) |
add address operator
Diffstat (limited to 'src/runner/runner.c')
-rw-r--r-- | src/runner/runner.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/runner/runner.c b/src/runner/runner.c index f120816..52c9673 100644 --- a/src/runner/runner.c +++ b/src/runner/runner.c @@ -1009,6 +1009,11 @@ AstTree *runExpression(AstTree *expr, RunnerVariablePages *pages, case AST_TREE_TOKEN_VALUE_FLOAT: case AST_TREE_TOKEN_OPERATOR_POINTER: return copyAstTree(expr); + case AST_TREE_TOKEN_OPERATOR_ADDRESS: { + AstTreeSingleChild *metadata = expr->metadata; + return newAstTree(AST_TREE_TOKEN_VARIABLE, metadata->metadata, + copyAstTree(expr->type), expr->str_begin, expr->str_end); + } case AST_TREE_TOKEN_VARIABLE: { AstTreeVariable *variable = expr->metadata; AstTree *value = runnerVariableGetValue(pages, variable); |