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

Function smem_parse_constant_attr

Core/SoarKernel/src/semantic_memory.cpp:3448–3466  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3446}
3447
3448inline Symbol* smem_parse_constant_attr(agent* thisAgent, struct lexeme_info* lexeme)
3449{
3450 Symbol* return_val = NIL;
3451
3452 if ((*lexeme).type == SYM_CONSTANT_LEXEME)
3453 {
3454 return_val = make_str_constant(thisAgent, static_cast<const char*>((*lexeme).string));
3455 }
3456 else if ((*lexeme).type == INT_CONSTANT_LEXEME)
3457 {
3458 return_val = make_int_constant(thisAgent, (*lexeme).int_val);
3459 }
3460 else if ((*lexeme).type == FLOAT_CONSTANT_LEXEME)
3461 {
3462 return_val = make_float_constant(thisAgent, (*lexeme).float_val);
3463 }
3464
3465 return return_val;
3466}
3467
3468bool smem_parse_chunk(agent* thisAgent, smem_str_to_chunk_map* chunks, smem_chunk_set* newbies)
3469{

Callers 2

smem_parse_chunkFunction · 0.85
smem_parse_cuesFunction · 0.85

Calls 3

make_str_constantFunction · 0.85
make_int_constantFunction · 0.85
make_float_constantFunction · 0.85

Tested by

no test coverage detected