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