- yet another backend update.

This commit is contained in:
Christoph Oelckers 2023-08-20 02:15:57 +02:00
parent d34bad3045
commit b95a5a4b2b
54 changed files with 837 additions and 446 deletions

View file

@ -407,8 +407,6 @@ PNamespace *ParseOneScript(const int baselump, ZCCParseState &state)
int lumpnum = baselump;
auto fileno = fileSystem.GetFileContainer(lumpnum);
FString file = fileSystem.GetFileFullPath(lumpnum);
state.FileNo = fileno;
if (TokenMap.CountUsed() == 0)
@ -503,7 +501,7 @@ PNamespace *ParseOneScript(const int baselump, ZCCParseState &state)
// If the parser fails, there is no point starting the compiler, because it'd only flood the output with endless errors.
if (FScriptPosition::ErrorCounter > 0)
{
I_Error("%d errors while parsing %s", FScriptPosition::ErrorCounter, fileSystem.GetFileFullPath(baselump).GetChars());
I_Error("%d errors while parsing %s", FScriptPosition::ErrorCounter, fileSystem.GetFileFullPath(baselump).c_str());
}
#ifndef NDEBUG
@ -517,7 +515,7 @@ PNamespace *ParseOneScript(const int baselump, ZCCParseState &state)
if (Args->CheckParm("-dumpast"))
{
FString ast = ZCC_PrintAST(state.TopNode);
FString filename = fileSystem.GetFileFullPath(baselump);
FString filename = fileSystem.GetFileFullPath(baselump).c_str();
filename.ReplaceChars(":\\/?|", '.');
filename << ".ast";
FileWriter *ff = FileWriter::Open(filename);