MCPcopy Create free account
hub / github.com/EmbeddedRPC/erpc / parse_bfactor

Method parse_bfactor

erpcgen/src/cpptemplate/cpptempl.cpp:1300–1326  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1298}
1299
1300data_ptr ExprParser::parse_bfactor()
1301{
1302 data_ptr ldata = parse_gfactor();
1303
1304 token_type_t tokType = m_tok->get_type();
1305 if (tokType == token_type_t::EQ_TOKEN || tokType == token_type_t::NEQ_TOKEN)
1306 {
1307 m_tok.next();
1308
1309 data_ptr rdata = parse_gfactor();
1310
1311 std::string lhs = ldata->getvalue();
1312 std::string rhs = rdata->getvalue();
1313 switch (tokType)
1314 {
1315 case token_type_t::EQ_TOKEN:
1316 ldata = (lhs == rhs);
1317 break;
1318 case token_type_t::NEQ_TOKEN:
1319 ldata = (lhs != rhs);
1320 break;
1321 default:
1322 break;
1323 }
1324 }
1325 return ldata;
1326}
1327
1328data_ptr ExprParser::parse_gfactor()
1329{

Callers

nothing calls this directly

Calls 3

get_typeMethod · 0.80
getvalueMethod · 0.80
nextMethod · 0.45

Tested by

no test coverage detected