xgo/objects/builtins.go
Daniel Kang 3f55a6b5b0
Modules (#5)
Implement module imports
2019-01-17 01:56:05 -08:00

52 lines
644 B
Go

package objects
// Builtins contains all known builtin functions.
var Builtins = []struct {
Name string
Func CallableFunc
}{
{
Name: "print",
Func: builtinPrint,
},
{
Name: "len",
Func: builtinLen,
},
{
Name: "copy",
Func: builtinCopy,
},
{
Name: "append",
Func: builtinAppend,
},
{
Name: "string",
Func: builtinString,
},
{
Name: "int",
Func: builtinInt,
},
{
Name: "bool",
Func: builtinBool,
},
{
Name: "float",
Func: builtinFloat,
},
{
Name: "char",
Func: builtinChar,
},
{
Name: "is_error",
Func: builtinIsError,
},
{
Name: "is_undefined",
Func: builtinIsUndefined,
},
}