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

Method NodeReturnOp

NULLC/SyntaxTree.cpp:331–345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

329// Node that returns from function or program
330
331NodeReturnOp::NodeReturnOp(bool localRet, TypeInfo* tinfo, FunctionInfo* parentFunc, bool yield)
332{
333 localReturn = localRet;
334 yieldResult = yield;
335 parentFunction = parentFunc;
336
337 // Result type is set from outside
338 typeInfo = tinfo;
339
340 first = TakeLastNode();
341 if(first->nodeType == typeNodeNumber && first->typeInfo != typeInfo)
342 ((NodeNumber*)first)->ConvertTo(typeInfo);
343
344 nodeType = typeNodeReturnOp;
345}
346NodeReturnOp::~NodeReturnOp()
347{
348}

Callers

nothing calls this directly

Calls 2

TakeLastNodeFunction · 0.85
ConvertToMethod · 0.80

Tested by

no test coverage detected