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

Function AddBinInteger

NULLC/Callbacks.cpp:675–688  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

673}
674
675void AddBinInteger(const char* pos, const char* end)
676{
677 // skip leading zeros
678 while(*pos == '0')
679 pos++;
680 if(int(end - pos) > 64)
681 ThrowError(pos, "ERROR: overflow in binary constant");
682 long long num = parseLong(pos, end, 2);
683 // If number overflows integer number, create long number
684 if(int(num) == num)
685 CodeInfo::nodeList.push_back(new NodeNumber(int(num), typeInt));
686 else
687 CodeInfo::nodeList.push_back(new NodeNumber(num, typeLong));
688}
689
690void AddGeneratorReturnData(const char *pos)
691{

Callers 1

ParseNumberFunction · 0.85

Calls 3

ThrowErrorFunction · 0.85
parseLongFunction · 0.85
push_backMethod · 0.45

Tested by

no test coverage detected