From 1f7b9131fc8b022c857f33c8554084c46e3bdde0 Mon Sep 17 00:00:00 2001 From: Celestino Amoroso Date: Fri, 10 May 2024 04:41:26 +0200 Subject: [PATCH] The 'last' variable now also receives the value of the final expression --- ast.go | 1 + 1 file changed, 1 insertion(+) diff --git a/ast.go b/ast.go index 0534cc5..3030742 100644 --- a/ast.go +++ b/ast.go @@ -128,6 +128,7 @@ func (self *ast) eval(ctx ExprContext, preset bool) (result any, err error) { } if err == nil { result, err = self.root.compute(ctx) + ctx.setVar(ControlLastResult, result) } // } else { // err = errors.New("empty expression")