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

Function AddForNode

NULLC/Callbacks.cpp:4721–4739  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4719 cycleDepth.back()++;
4720}
4721void AddForNode(const char* pos)
4722{
4723 CodeInfo::lastKnownStartPos = pos;
4724 assert(CodeInfo::nodeList.size() >= 4);
4725
4726 NodeZeroOP *body = CodeInfo::nodeList.back(); CodeInfo::nodeList.pop_back();
4727 NodeZeroOP *increment = CodeInfo::nodeList.back(); CodeInfo::nodeList.pop_back();
4728
4729 if(CodeInfo::nodeList.back()->typeInfo->type == TypeInfo::TYPE_COMPLEX && CodeInfo::nodeList.back()->typeInfo != typeObject)
4730 AddFunctionCallNode(pos, "bool", 1, true);
4731
4732 CodeInfo::nodeList.push_back(increment);
4733 CodeInfo::nodeList.push_back(body);
4734
4735 CodeInfo::nodeList.push_back(new NodeForExpr());
4736
4737 assert(cycleDepth.size() != 0);
4738 cycleDepth.back()--;
4739}
4740void AddWhileNode(const char* pos)
4741{
4742 CodeInfo::lastKnownStartPos = pos;

Callers 1

ParseForExprFunction · 0.85

Calls 5

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

Tested by

no test coverage detected