The 'last' variable now also receives the value of the final expression
This commit is contained in:
parent
dce49fd2b7
commit
1f7b9131fc
1
ast.go
1
ast.go
@ -128,6 +128,7 @@ func (self *ast) eval(ctx ExprContext, preset bool) (result any, err error) {
|
|||||||
}
|
}
|
||||||
if err == nil {
|
if err == nil {
|
||||||
result, err = self.root.compute(ctx)
|
result, err = self.root.compute(ctx)
|
||||||
|
ctx.setVar(ControlLastResult, result)
|
||||||
}
|
}
|
||||||
// } else {
|
// } else {
|
||||||
// err = errors.New("empty expression")
|
// err = errors.New("empty expression")
|
||||||
|
Loading…
Reference in New Issue
Block a user