xgo/objects/builtins.go

26 lines
322 B
Go
Raw Normal View History

2019-01-09 10:17:42 +03:00
package objects
type BuiltinFunc func(args ...Object) (ret Object, err error)
var Builtins = []struct {
Name string
Func BuiltinFunc
}{
{
Name: "print",
Func: builtinPrint,
},
{
Name: "len",
Func: builtinLen,
},
{
Name: "copy",
Func: builtinCopy,
},
{
Name: "append",
Func: builtinAppend,
},
}