Add a boolean type.
This commit is contained in:
@@ -24,6 +24,11 @@ void libab_free_function_list(void* func_list);
|
||||
* @param unit the unit to free.
|
||||
*/
|
||||
void libab_free_unit(void* unit);
|
||||
/**
|
||||
* Frees a boolean value.
|
||||
* @param b the bool to free.
|
||||
*/
|
||||
void libab_free_bool(void* b);
|
||||
/**
|
||||
* Frees a parsetype.
|
||||
* @param parsetype the parsetype to free.
|
||||
|
||||
@@ -47,6 +47,10 @@ struct libab_s {
|
||||
* The number type instance.
|
||||
*/
|
||||
libab_ref type_num;
|
||||
/**
|
||||
* The boolean type instance.
|
||||
*/
|
||||
libab_ref type_bool;
|
||||
/**
|
||||
* The function list type instance.
|
||||
*/
|
||||
@@ -144,6 +148,12 @@ libab_result libab_create_type(libab* ab, libab_ref* into, const char* type);
|
||||
* @return the num basetype.
|
||||
*/
|
||||
libab_basetype* libab_get_basetype_num(libab* ab);
|
||||
/**
|
||||
* Finds and returns the built-in libabacus boolean type.
|
||||
* @param ab the ab instance for which to return a type.
|
||||
* @return the boolean basetype.
|
||||
*/
|
||||
libab_basetype* libab_get_basetype_bool(libab* ab);
|
||||
/**
|
||||
* Finds and returns the built-in libabacus function type.
|
||||
* @param ab the ab instance for which to return a type.
|
||||
@@ -169,6 +179,12 @@ libab_basetype* libab_get_basetype_unit(libab* ab);
|
||||
* @param into the reference to store the type into.
|
||||
*/
|
||||
void libab_get_type_num(libab* ab, libab_ref* into);
|
||||
/**
|
||||
* Get the type of a boolean 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_bool(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.
|
||||
|
||||
Reference in New Issue
Block a user