25 lines
322 B
Go
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,
|
|
},
|
|
}
|