Improved closure context persistence. Now it is possibile to define counters like this func(base){func(){@base=base+1}}
This commit is contained in:
+2
-1
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user