5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-25 13:21:36 +00:00
matterbridge/vendor/github.com/d5/tengo/objects/builtins.go

115 lines
1.6 KiB
Go
Raw Normal View History

package objects
// Builtins contains all default builtin functions.
2019-03-05 22:08:54 +00:00
// Use GetBuiltinFunctions instead of accessing Builtins directly.
var Builtins = []*BuiltinFunction{
{
2019-03-05 22:08:54 +00:00
Name: "len",
Value: builtinLen,
},
{
2019-03-05 22:08:54 +00:00
Name: "copy",
Value: builtinCopy,
},
{
2019-03-05 22:08:54 +00:00
Name: "append",
Value: builtinAppend,
},
{
2019-03-05 22:08:54 +00:00
Name: "string",
Value: builtinString,
},
{
2019-03-05 22:08:54 +00:00
Name: "int",
Value: builtinInt,
},
{
2019-03-05 22:08:54 +00:00
Name: "bool",
Value: builtinBool,
},
{
2019-03-05 22:08:54 +00:00
Name: "float",
Value: builtinFloat,
},
{
2019-03-05 22:08:54 +00:00
Name: "char",
Value: builtinChar,
},
{
2019-03-05 22:08:54 +00:00
Name: "bytes",
Value: builtinBytes,
},
{
2019-03-05 22:08:54 +00:00
Name: "time",
Value: builtinTime,
},
{
2019-03-05 22:08:54 +00:00
Name: "is_int",
Value: builtinIsInt,
},
{
2019-03-05 22:08:54 +00:00
Name: "is_float",
Value: builtinIsFloat,
},
{
2019-03-05 22:08:54 +00:00
Name: "is_string",
Value: builtinIsString,
},
{
2019-03-05 22:08:54 +00:00
Name: "is_bool",
Value: builtinIsBool,
},
{
2019-03-05 22:08:54 +00:00
Name: "is_char",
Value: builtinIsChar,
},
{
2019-03-05 22:08:54 +00:00
Name: "is_bytes",
Value: builtinIsBytes,
},
{
2019-03-05 22:08:54 +00:00
Name: "is_array",
Value: builtinIsArray,
},
{
2019-03-05 22:08:54 +00:00
Name: "is_immutable_array",
Value: builtinIsImmutableArray,
},
{
2019-03-05 22:08:54 +00:00
Name: "is_map",
Value: builtinIsMap,
},
{
2019-03-05 22:08:54 +00:00
Name: "is_immutable_map",
Value: builtinIsImmutableMap,
},
{
Name: "is_iterable",
Value: builtinIsIterable,
},
{
2019-03-05 22:08:54 +00:00
Name: "is_time",
Value: builtinIsTime,
},
{
2019-03-05 22:08:54 +00:00
Name: "is_error",
Value: builtinIsError,
},
{
2019-03-05 22:08:54 +00:00
Name: "is_undefined",
Value: builtinIsUndefined,
},
{
2019-03-05 22:08:54 +00:00
Name: "is_function",
Value: builtinIsFunction,
},
{
2019-03-05 22:08:54 +00:00
Name: "is_callable",
Value: builtinIsCallable,
},
{
2019-03-05 22:08:54 +00:00
Name: "type_name",
Value: builtinTypeName,
},
}