Improved closure context persistence. Now it is possibile to define counters like this func(base){func(){@base=base+1}}

This commit is contained in:
2024-06-24 07:20:17 +02:00
parent 3b641ac793
commit e41ddc664c
5 changed files with 82 additions and 63 deletions
+2 -1
View File
@@ -36,10 +36,11 @@ func (ctx *SimpleStore) GetParent() ExprContext {
}
func (ctx *SimpleStore) Clone() ExprContext {
return &SimpleStore{
clone := &SimpleStore{
varStore: CloneFilteredMap(ctx.varStore, filterRefName),
funcStore: CloneFilteredMap(ctx.funcStore, filterRefName),
}
return clone
}
func (ctx *SimpleStore) Merge(src ExprContext) {