simple-func-store.go: now imports 'builtins' module on creation

This commit is contained in:
Celestino Amoroso 2024-04-20 06:53:30 +02:00
parent c27e487fc3
commit 3c0307524b

View File

@ -35,10 +35,12 @@ func (info *funcInfo) Functor() Functor {
} }
func NewSimpleFuncStore() *SimpleFuncStore { func NewSimpleFuncStore() *SimpleFuncStore {
return &SimpleFuncStore{ ctx := &SimpleFuncStore{
SimpleVarStore: SimpleVarStore{varStore: make(map[string]any)}, SimpleVarStore: SimpleVarStore{varStore: make(map[string]any)},
funcStore: make(map[string]*funcInfo), funcStore: make(map[string]*funcInfo),
} }
ImportBuiltinsFuncs(ctx)
return ctx
} }
func (ctx *SimpleFuncStore) Clone() ExprContext { func (ctx *SimpleFuncStore) Clone() ExprContext {