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

Function AddGeneratorReturnData

NULLC/Callbacks.cpp:690–702  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

688}
689
690void AddGeneratorReturnData(const char *pos)
691{
692 // Check that we are inside the function
693 assert(currDefinedFunc.size());
694 TypeInfo *retType = currDefinedFunc.back()->retType;
695 // Check that return type is known
696 if(!retType)
697 ThrowError(pos, "ERROR: not a single element is generated, and an array element type is unknown");
698 if(retType == typeVoid)
699 ThrowError(pos, "ERROR: cannot generate an array of 'void' element type");
700 currType = retType;
701 CodeInfo::nodeList.push_back(new NodeZeroOP(retType));
702}
703
704void AddVoidNode()
705{

Callers 1

ParseArrayFunction · 0.85

Calls 4

assertFunction · 0.85
ThrowErrorFunction · 0.85
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected