diff --git a/include/libabacus.h b/include/libabacus.h index 41fb301..e76335d 100644 --- a/include/libabacus.h +++ b/include/libabacus.h @@ -159,6 +159,19 @@ libab_basetype* libab_get_basetype_function(libab* ab); */ libab_basetype* libab_get_basetype_function_list(libab* ab); +/** + * Get the type of a number in this libabacus instance. + * @param ab the instance to get the type for. + * @param into the reference to store the type into. + */ +void libab_get_type_num(libab* ab, libab_ref* into); +/** + * Get the type of the function list in this libabacus instance. + * @param ab the instance to get the type for. + * @param into the ference to store the type into. + */ +void libab_get_type_function_list(libab* ab, libab_ref* into); + /** * Executes the given string of code. * @param ab the libabacus instance to use for executing code. diff --git a/src/libabacus.c b/src/libabacus.c index e1c859b..7026028 100644 --- a/src/libabacus.c +++ b/src/libabacus.c @@ -342,6 +342,14 @@ libab_basetype* libab_get_basetype_function_list(libab* ab) { return &_basetype_function_list; } +void libab_get_type_num(libab* ab, libab_ref* into) { + libab_ref_copy(&ab->type_num, into); +} + +void libab_get_type_function_list(libab* ab, libab_ref* into) { + libab_ref_copy(&ab->type_function_list, into); +} + libab_result libab_run(libab* ab, const char* string, libab_ref* value) { libab_result result = LIBAB_SUCCESS; ll tokens;