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

Function ConvertTypeToArray

NULLC/Callbacks.cpp:1237–1251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1235}
1236
1237void ConvertTypeToArray(const char* pos)
1238{
1239 CodeInfo::lastKnownStartPos = pos;
1240 if(!currType)
1241 {
1242 if(CodeInfo::nodeList.back()->nodeType == typeNodeNumber && CodeInfo::nodeList.back()->typeInfo == typeVoid)
1243 {
1244 CodeInfo::nodeList.pop_back();
1245 currType = typeAutoArray;
1246 return;
1247 }
1248 ThrowError(pos, "ERROR: cannot specify array size for auto variable");
1249 }
1250 currType = CodeInfo::GetArrayType(currType);
1251}
1252
1253//////////////////////////////////////////////////////////////////////////
1254// New functions for work with variables

Callers 2

ParseArrayDefinitionFunction · 0.85
ParseTerminalFunction · 0.85

Calls 2

ThrowErrorFunction · 0.85
pop_backMethod · 0.45

Tested by

no test coverage detected