xgo/stdlib/builtin_modules.go
Daniel 61890b15cb
module refactor (#148)
* wip

* move print and JSON functions to modules

* builtin functions are not replacable now

* builtin functions are added for default nil symbol table

* importables: builtin modules and source modules

* refactoring runtime tests

* fix tests

* update documentation

* cleanup

* clean up cli

* fix REPL prints
2019-03-18 08:15:26 -07:00

14 lines
388 B
Go

package stdlib
import "github.com/d5/tengo/objects"
// BuiltinModules are builtin type standard library modules.
var BuiltinModules = map[string]*objects.BuiltinModule{
"math": {Attrs: mathModule},
"os": {Attrs: osModule},
"text": {Attrs: textModule},
"times": {Attrs: timesModule},
"rand": {Attrs: randModule},
"fmt": {Attrs: fmtModule},
"json": {Attrs: jsonModule},
}