2018-09-18 16:42:38 -04:00
|
|
|
package stdlib
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/MontFerret/ferret/pkg/runtime/core"
|
2018-10-05 21:27:34 -04:00
|
|
|
"github.com/MontFerret/ferret/pkg/stdlib/arrays"
|
2018-09-18 16:42:38 -04:00
|
|
|
"github.com/MontFerret/ferret/pkg/stdlib/collections"
|
|
|
|
"github.com/MontFerret/ferret/pkg/stdlib/html"
|
2018-10-13 21:07:28 -04:00
|
|
|
"github.com/MontFerret/ferret/pkg/stdlib/math"
|
2018-10-07 17:58:22 -04:00
|
|
|
"github.com/MontFerret/ferret/pkg/stdlib/objects"
|
2018-09-18 16:42:38 -04:00
|
|
|
"github.com/MontFerret/ferret/pkg/stdlib/strings"
|
|
|
|
"github.com/MontFerret/ferret/pkg/stdlib/types"
|
|
|
|
"github.com/MontFerret/ferret/pkg/stdlib/utils"
|
|
|
|
)
|
|
|
|
|
2019-07-22 17:21:20 -04:00
|
|
|
func RegisterLib(ns core.Namespace) error {
|
|
|
|
if err := types.RegisterLib(ns); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2019-07-22 17:21:20 -04:00
|
|
|
if err := strings.RegisterLib(ns); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2019-03-13 14:51:30 -04:00
|
|
|
|
2019-07-22 17:21:20 -04:00
|
|
|
if err := math.RegisterLib(ns); err != nil {
|
|
|
|
return err
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|
|
|
|
|
2019-07-22 17:21:20 -04:00
|
|
|
if err := collections.RegisterLib(ns); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
if err := arrays.RegisterLib(ns); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
if err := objects.RegisterLib(ns); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
if err := html.RegisterLib(ns); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2018-09-18 16:42:38 -04:00
|
|
|
|
2019-07-22 17:21:20 -04:00
|
|
|
return utils.RegisterLib(ns)
|
2018-09-18 16:42:38 -04:00
|
|
|
}
|