xgo/objects/builtins.go

53 lines
644 B
Go
Raw Normal View History

2019-01-09 10:17:42 +03:00
package objects
// Builtins contains all known builtin functions.
2019-01-09 10:17:42 +03:00
var Builtins = []struct {
Name string
2019-01-17 12:56:05 +03:00
Func CallableFunc
2019-01-09 10:17:42 +03:00
}{
{
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,
},
2019-01-09 10:17:42 +03:00
}