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

Method getSwitchOR

Engine/source/console/astNodes.cpp:183–194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181//------------------------------------------------------------
182
183ExprNode* IfStmtNode::getSwitchOR(ExprNode* left, ExprNode* list, bool string)
184{
185 ExprNode* nextExpr = (ExprNode*)list->getNext();
186 ExprNode* test;
187 if (string)
188 test = StreqExprNode::alloc(left->dbgLineNumber, left, list, true);
189 else
190 test = IntBinaryExprNode::alloc(left->dbgLineNumber, opEQ, left, list);
191 if (!nextExpr)
192 return test;
193 return IntBinaryExprNode::alloc(test->dbgLineNumber, opOR, test, getSwitchOR(left, nextExpr, string));
194}
195
196void IfStmtNode::propagateSwitchExpr(ExprNode* left, bool string)
197{

Callers

nothing calls this directly

Calls 2

allocFunction · 0.85
getNextMethod · 0.45

Tested by

no test coverage detected