MCPcopy Create free account
hub / github.com/SoarGroup/Soar / find_variable

Function find_variable

Core/SoarKernel/src/symtab.cpp:237–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

235}
236
237Symbol* find_variable(agent* thisAgent, const char* name)
238{
239 uint32_t hash_value;
240 varSymbol* sym;
241
242 hash_value = hash_variable_raw_info(name, thisAgent->variable_hash_table->log2size);
243 sym = reinterpret_cast<varSymbol*>(*(thisAgent->variable_hash_table->buckets + hash_value));
244 for (; sym != NIL; sym = varSym(sym->next_in_hash_table))
245 {
246 if (!strcmp(sym->name, name))
247 {
248 return sym;
249 }
250 }
251 return NIL;
252}
253
254Symbol* find_identifier(agent* thisAgent, char name_letter, uint64_t name_number)
255{

Callers 2

get_context_var_infoFunction · 0.85
make_variableFunction · 0.85

Calls 2

hash_variable_raw_infoFunction · 0.85
varSymFunction · 0.85

Tested by

no test coverage detected