Add functions to separately register different types of operators.
This commit is contained in:
@@ -17,7 +17,7 @@ libab_table_entry* table_search(libab_table* table, const char* string) {
|
||||
libab_operator* libab_table_search_operator(libab_table* table, const char* string) {
|
||||
libab_table_entry* entry = table_search(table, string);
|
||||
libab_operator* to_return = NULL;
|
||||
if(entry && entry->variant == ENTRY_OPERATOR) {
|
||||
if(entry && entry->variant == ENTRY_OP) {
|
||||
to_return = &entry->data_u.op;
|
||||
}
|
||||
return to_return;
|
||||
@@ -25,7 +25,7 @@ libab_operator* libab_table_search_operator(libab_table* table, const char* stri
|
||||
libab_function* libab_table_search_function(libab_table* table, const char* string) {
|
||||
libab_table_entry* entry = table_search(table, string);
|
||||
libab_function* to_return = NULL;
|
||||
if(entry && entry->variant == ENTRY_FUNCTION) {
|
||||
if(entry && entry->variant == ENTRY_FUN) {
|
||||
to_return = &entry->data_u.function;
|
||||
}
|
||||
return to_return;
|
||||
|
||||
Reference in New Issue
Block a user