MCPcopy Create free account
hub / github.com/WheretIB/nullc / AddWhileNode

Function AddWhileNode

NULLC/Callbacks.cpp:4740–4757  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4738 cycleDepth.back()--;
4739}
4740void AddWhileNode(const char* pos)
4741{
4742 CodeInfo::lastKnownStartPos = pos;
4743 assert(CodeInfo::nodeList.size() >= 2);
4744
4745 NodeZeroOP *body = CodeInfo::nodeList.back(); CodeInfo::nodeList.pop_back();
4746
4747 if(CodeInfo::nodeList.back()->typeInfo->type == TypeInfo::TYPE_COMPLEX && CodeInfo::nodeList.back()->typeInfo != typeObject)
4748 AddFunctionCallNode(pos, "bool", 1, true);
4749
4750 CodeInfo::nodeList.push_back(body);
4751
4752 CodeInfo::nodeList.push_back(new NodeWhileExpr());
4753 CodeInfo::nodeList.back()->SetCodeInfo(pos);
4754
4755 assert(cycleDepth.size() != 0);
4756 cycleDepth.back()--;
4757}
4758void AddDoWhileNode(const char* pos)
4759{
4760 CodeInfo::lastKnownStartPos = pos;

Callers 1

ParseWhileExprFunction · 0.85

Calls 6

assertFunction · 0.85
AddFunctionCallNodeFunction · 0.85
SetCodeInfoMethod · 0.80
sizeMethod · 0.45
pop_backMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected