Add true / false values to interpreter.
This commit is contained in:
@@ -28,6 +28,14 @@ struct libab_interpreter_s {
|
||||
* The unit value, which doesn't need more than one instance.
|
||||
*/
|
||||
libab_ref value_unit;
|
||||
/**
|
||||
* The "true" boolean value, which doesn't need more than one instance.
|
||||
*/
|
||||
libab_ref value_true;
|
||||
/**
|
||||
* The "false" boolean value, which doesn't need more than one instance.
|
||||
*/
|
||||
libab_ref value_false;
|
||||
};
|
||||
|
||||
typedef enum libab_interpreter_scope_mode_e libab_interpreter_scope_mode;
|
||||
@@ -73,6 +81,18 @@ libab_result libab_interpreter_run_function(libab_interpreter* intr,
|
||||
* @param into the reference into which to store the unit value.
|
||||
*/
|
||||
void libab_interpreter_unit_value(libab_interpreter* intr, libab_ref* into);
|
||||
/**
|
||||
* Gets the true value from this interpreter.
|
||||
* @param intr the interpreter from which to get the true value.
|
||||
* @param into the reference into which to store the true value.
|
||||
*/
|
||||
void libab_interpreter_true_value(libab_interpreter* intr, libab_ref* into);
|
||||
/**
|
||||
* Gets the false value from this interpreter.
|
||||
* @param intr the interpreter from which to get the false value.
|
||||
* @param into the reference into which to store the false value.
|
||||
*/
|
||||
void libab_interpreter_false_value(libab_interpreter* intr, libab_ref* into);
|
||||
/**
|
||||
* Frees the given interpreter.
|
||||
* @param intr the interpreter to free.
|
||||
|
||||
@@ -204,6 +204,18 @@ void libab_get_type_unit(libab* ab, libab_ref* into);
|
||||
* @param into the reference into which to store the unit value.
|
||||
*/
|
||||
void libab_get_unit_value(libab* ab, libab_ref* into);
|
||||
/**
|
||||
* Gets the true value form this libab instance.
|
||||
* @param ab the instance to get the true value from.
|
||||
* @param into the reference into which to store the true value.
|
||||
*/
|
||||
void libab_get_true_value(libab* ab, libab_ref* into);
|
||||
/**
|
||||
* Gets the false value form this libab instance.
|
||||
* @param ab the instance to get the false value from.
|
||||
* @param into the reference into which to store the false value.
|
||||
*/
|
||||
void libab_get_false_value(libab* ab, libab_ref* into);
|
||||
|
||||
/**
|
||||
* Executes the given string of code.
|
||||
|
||||
Reference in New Issue
Block a user