xgo/objects/builtins.go
2019-01-08 23:17:42 -08:00

25 lines
322 B
Go

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,
},
}