MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / getSwitchOR

Method getSwitchOR

Engine/source/console/astNodes.cpp:239–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237//------------------------------------------------------------
238
239ExprNode *IfStmtNode::getSwitchOR(ExprNode *left, ExprNode *list, bool string)
240{
241 ExprNode *nextExpr = (ExprNode *) list->getNext();
242 ExprNode *test;
243 if(string)
244 test = StreqExprNode::alloc( left->dbgLineNumber, left, list, true );
245 else
246 test = IntBinaryExprNode::alloc( left->dbgLineNumber, opEQ, left, list );
247 if(!nextExpr)
248 return test;
249 return IntBinaryExprNode::alloc( test->dbgLineNumber, opOR, test, getSwitchOR( left, nextExpr, string ) );
250}
251
252void IfStmtNode::propagateSwitchExpr(ExprNode *left, bool string)
253{

Callers

nothing calls this directly

Calls 2

allocFunction · 0.85
getNextMethod · 0.45

Tested by

no test coverage detected