summaryrefslogtreecommitdiff
path: root/internal/repl/repl.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/repl/repl.go')
-rw-r--r--internal/repl/repl.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/internal/repl/repl.go b/internal/repl/repl.go
index f79f92f..3e2d4c9 100644
--- a/internal/repl/repl.go
+++ b/internal/repl/repl.go
@@ -109,9 +109,8 @@ func executor(input string) {
// runRPN parses and evaluates an RPN expression
func runRPN(input string) (string, error) {
- vars := rpn.NewVariables()
- rpnCalc := rpn.NewRPN(vars)
- return rpnCalc.ParseAndEvaluate(input)
+ state := getRPNState()
+ return state.rpnCalc.ParseAndEvaluate(input)
}
// isBuiltinCommand checks if input starts with a built-in command