2019-01-09 10:17:42 +03:00
|
|
|
package objects
|
|
|
|
|
2019-01-18 20:19:45 +03:00
|
|
|
// Builtins contains all default builtin functions.
|
2019-03-01 05:41:29 +03:00
|
|
|
// Use GetBuiltinFunctions instead of accessing Builtins directly.
|
2019-03-18 18:15:26 +03:00
|
|
|
var Builtins = []*BuiltinFunction{
|
2019-01-09 10:17:42 +03:00
|
|
|
{
|
2019-02-28 19:26:25 +03:00
|
|
|
Name: "len",
|
|
|
|
Value: builtinLen,
|
2019-01-09 10:17:42 +03:00
|
|
|
},
|
|
|
|
{
|
2019-02-28 19:26:25 +03:00
|
|
|
Name: "copy",
|
|
|
|
Value: builtinCopy,
|
2019-01-09 10:17:42 +03:00
|
|
|
},
|
|
|
|
{
|
2019-02-28 19:26:25 +03:00
|
|
|
Name: "append",
|
|
|
|
Value: builtinAppend,
|
2019-01-09 10:17:42 +03:00
|
|
|
},
|
2019-01-10 04:18:37 +03:00
|
|
|
{
|
2019-02-28 19:26:25 +03:00
|
|
|
Name: "string",
|
|
|
|
Value: builtinString,
|
2019-01-10 04:18:37 +03:00
|
|
|
},
|
|
|
|
{
|
2019-02-28 19:26:25 +03:00
|
|
|
Name: "int",
|
|
|
|
Value: builtinInt,
|
2019-01-10 04:18:37 +03:00
|
|
|
},
|
|
|
|
{
|
2019-02-28 19:26:25 +03:00
|
|
|
Name: "bool",
|
|
|
|
Value: builtinBool,
|
2019-01-10 04:18:37 +03:00
|
|
|
},
|
|
|
|
{
|
2019-02-28 19:26:25 +03:00
|
|
|
Name: "float",
|
|
|
|
Value: builtinFloat,
|
2019-01-10 04:18:37 +03:00
|
|
|
},
|
|
|
|
{
|
2019-02-28 19:26:25 +03:00
|
|
|
Name: "char",
|
|
|
|
Value: builtinChar,
|
2019-01-10 04:18:37 +03:00
|
|
|
},
|
2019-01-18 12:43:46 +03:00
|
|
|
{
|
2019-02-28 19:26:25 +03:00
|
|
|
Name: "bytes",
|
|
|
|
Value: builtinBytes,
|
2019-01-18 12:43:46 +03:00
|
|
|
},
|
2019-01-30 03:01:14 +03:00
|
|
|
{
|
2019-02-28 19:26:25 +03:00
|
|
|
Name: "time",
|
|
|
|
Value: builtinTime,
|
2019-01-30 03:01:14 +03:00
|
|
|
},
|
2019-01-18 08:23:20 +03:00
|
|
|
{
|
2019-02-28 19:26:25 +03:00
|
|
|
Name: "is_int",
|
|
|
|
Value: builtinIsInt,
|
2019-01-18 08:23:20 +03:00
|
|
|
},
|
|
|
|
{
|
2019-02-28 19:26:25 +03:00
|
|
|
Name: "is_float",
|
|
|
|
Value: builtinIsFloat,
|
2019-01-18 08:23:20 +03:00
|
|
|
},
|
|
|
|
{
|
2019-02-28 19:26:25 +03:00
|
|
|
Name: "is_string",
|
|
|
|
Value: builtinIsString,
|
2019-01-18 08:23:20 +03:00
|
|
|
},
|
|
|
|
{
|
2019-02-28 19:26:25 +03:00
|
|
|
Name: "is_bool",
|
|
|
|
Value: builtinIsBool,
|
2019-01-18 08:23:20 +03:00
|
|
|
},
|
|
|
|
{
|
2019-02-28 19:26:25 +03:00
|
|
|
Name: "is_char",
|
|
|
|
Value: builtinIsChar,
|
2019-01-18 08:23:20 +03:00
|
|
|
},
|
2019-01-18 12:43:46 +03:00
|
|
|
{
|
2019-02-28 19:26:25 +03:00
|
|
|
Name: "is_bytes",
|
|
|
|
Value: builtinIsBytes,
|
2019-01-18 12:43:46 +03:00
|
|
|
},
|
2019-01-30 03:01:14 +03:00
|
|
|
{
|
2019-02-28 19:26:25 +03:00
|
|
|
Name: "is_array",
|
|
|
|
Value: builtinIsArray,
|
2019-01-30 03:01:14 +03:00
|
|
|
},
|
|
|
|
{
|
2019-02-28 19:26:25 +03:00
|
|
|
Name: "is_immutable_array",
|
|
|
|
Value: builtinIsImmutableArray,
|
2019-01-30 03:01:14 +03:00
|
|
|
},
|
|
|
|
{
|
2019-02-28 19:26:25 +03:00
|
|
|
Name: "is_map",
|
|
|
|
Value: builtinIsMap,
|
2019-01-30 03:01:14 +03:00
|
|
|
},
|
|
|
|
{
|
2019-02-28 19:26:25 +03:00
|
|
|
Name: "is_immutable_map",
|
|
|
|
Value: builtinIsImmutableMap,
|
2019-01-30 03:01:14 +03:00
|
|
|
},
|
2019-03-27 11:27:59 +03:00
|
|
|
{
|
|
|
|
Name: "is_iterable",
|
|
|
|
Value: builtinIsIterable,
|
|
|
|
},
|
2019-01-30 03:01:14 +03:00
|
|
|
{
|
2019-02-28 19:26:25 +03:00
|
|
|
Name: "is_time",
|
|
|
|
Value: builtinIsTime,
|
2019-01-30 03:01:14 +03:00
|
|
|
},
|
2019-01-16 23:23:20 +03:00
|
|
|
{
|
2019-02-28 19:26:25 +03:00
|
|
|
Name: "is_error",
|
|
|
|
Value: builtinIsError,
|
2019-01-16 23:23:20 +03:00
|
|
|
},
|
|
|
|
{
|
2019-02-28 19:26:25 +03:00
|
|
|
Name: "is_undefined",
|
|
|
|
Value: builtinIsUndefined,
|
2019-01-16 23:23:20 +03:00
|
|
|
},
|
2019-02-04 02:50:40 +03:00
|
|
|
{
|
2019-02-28 19:26:25 +03:00
|
|
|
Name: "is_function",
|
|
|
|
Value: builtinIsFunction,
|
2019-02-04 02:50:40 +03:00
|
|
|
},
|
|
|
|
{
|
2019-02-28 19:26:25 +03:00
|
|
|
Name: "is_callable",
|
|
|
|
Value: builtinIsCallable,
|
2019-02-04 02:50:40 +03:00
|
|
|
},
|
2019-01-28 05:39:45 +03:00
|
|
|
{
|
2019-02-28 19:26:25 +03:00
|
|
|
Name: "type_name",
|
|
|
|
Value: builtinTypeName,
|
2019-01-28 05:39:45 +03:00
|
|
|
},
|
2019-04-13 21:29:50 +03:00
|
|
|
{
|
|
|
|
Name: "format",
|
|
|
|
Value: builtinFormat,
|
|
|
|
},
|
2019-01-09 10:17:42 +03:00
|
|
|
}
|