MCPcopy Create free account
hub / github.com/AMReX-Codes/amrex / parser_newcmpchain

Function parser_newcmpchain

Src/Base/Parser/AMReX_Parser_Y.cpp:235–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233}
234
235struct parser_node* parser_newcmpchain (struct parser_node* nl, enum parser_f2_t cmp,
236 struct parser_node* nr)
237{
238 /* If left side is already a comparison, this extends the chain */
239 if (amrex::parser_is_comparison(nl)) {
240 return amrex::parser_newf2(amrex::PARSER_CMP_CHAIN, nl,
241 amrex::parser_newf2(cmp,
242 amrex::parser_get_rightmost_operand(nl),
243 nr));
244 } else {
245 return amrex::parser_newf2(cmp, nl, nr); // Initial comparison
246 }
247}
248
249/*******************************************************************/
250

Callers 1

yyparseFunction · 0.85

Calls 3

parser_is_comparisonFunction · 0.85
parser_newf2Function · 0.85

Tested by

no test coverage detected