- allow parsing of static constant arrays in class scope.

This is only the parsing part, the arrays are not yet getting evaluated.
This required quite a hacky workaround because the gramma couldn't be made to accept the rule. The scanner will check if a 'static' token is immediately followed by a 'const' token and will combine both to a new 'staticconst' token that does not create conflicts with other rules.
This commit is contained in:
Christoph Oelckers 2017-03-14 20:22:37 +01:00
commit 6926875b21
7 changed files with 52 additions and 2 deletions

View file

@ -166,6 +166,23 @@ void FMemArena::DumpInfo()
Printf("%zu bytes allocated, %zu bytes in use\n", allocated, used);
}
//==========================================================================
//
// FMemArena :: DumpInfo
//
// Dumps the arena to a file (for debugging)
//
//==========================================================================
void FMemArena::DumpData(FILE *f)
{
for (auto block = TopBlock; block != NULL; block = block->NextBlock)
{
auto used = BlockSize - ((char*)block->Limit - (char*)block->Avail);
fwrite(block, 1, used, f);
}
}
//==========================================================================
//
// FMemArena :: FreeBlockChain