From 6bfb3763d998e3aad30eb8eafb71fc296b874657 Mon Sep 17 00:00:00 2001 From: vanten-s Date: Wed, 27 Sep 2023 14:06:50 +0200 Subject: [PATCH] scope-local variables --- src/ast.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ast.rs b/src/ast.rs index 5cc83c1..7c0fdcf 100644 --- a/src/ast.rs +++ b/src/ast.rs @@ -323,7 +323,7 @@ impl Node for Expression { } let stack_position = state.variables.len() - - state.variables.iter().position(|x| x == name).unwrap() + - state.variables.iter().rposition(|x| x == name).unwrap() - 1; dbg!(&state.variables);