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

Function CheckCollisionWithFunction

NULLC/Callbacks.cpp:605–614  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

603}
604
605void CheckCollisionWithFunction(const char* pos, InplaceStr varName, unsigned hash, unsigned scope)
606{
607 HashMap<FunctionInfo*>::Node *curr = funcMap.first(hash);
608 while(curr)
609 {
610 if(curr->value->visible && curr->value->vTopSize == scope)
611 ThrowError(pos, "ERROR: name '%.*s' is already taken for a function", varName.end - varName.begin, varName.begin);
612 curr = funcMap.next(curr);
613 }
614}
615
616// Functions used to add node for constant numbers of different type
617void AddNumberNodeChar(const char* pos)

Callers 3

PushNamespaceFunction · 0.85
AddVariableFunction · 0.85
FunctionStartFunction · 0.85

Calls 3

ThrowErrorFunction · 0.85
firstMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected