mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-27 06:12:19 +00:00
- fixed: Lemon includes ParseTrace only in debug builds so the option to use it must be #ifdef'd.
This commit is contained in:
parent
cc7120d5b6
commit
aab304c0cf
1 changed files with 4 additions and 0 deletions
|
@ -303,6 +303,7 @@ static void DoParse(int lumpnum)
|
|||
parser = ZCCParseAlloc(malloc);
|
||||
ZCCParseState state;
|
||||
|
||||
#ifndef NDEBUG
|
||||
FILE *f = nullptr;
|
||||
const char *tracefile = Args->CheckValue("-tracefile");
|
||||
if (tracefile != nullptr)
|
||||
|
@ -311,6 +312,7 @@ static void DoParse(int lumpnum)
|
|||
char prompt = '\0';
|
||||
ZCCParseTrace(f, &prompt);
|
||||
}
|
||||
#endif
|
||||
|
||||
sc.OpenLumpNum(lumpnum);
|
||||
auto saved = sc.SavePos();
|
||||
|
@ -360,10 +362,12 @@ static void DoParse(int lumpnum)
|
|||
I_Error("%d errors while parsing %s", FScriptPosition::ErrorCounter, Wads.GetLumpFullPath(lumpnum).GetChars());
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
if (f != nullptr)
|
||||
{
|
||||
fclose(f);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Make a dump of the AST before running the compiler for diagnostic purposes.
|
||||
if (Args->CheckParm("-dumpast"))
|
||||
|
|
Loading…
Reference in a new issue