mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-14 00:21:34 +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);
|
parser = ZCCParseAlloc(malloc);
|
||||||
ZCCParseState state;
|
ZCCParseState state;
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
FILE *f = nullptr;
|
FILE *f = nullptr;
|
||||||
const char *tracefile = Args->CheckValue("-tracefile");
|
const char *tracefile = Args->CheckValue("-tracefile");
|
||||||
if (tracefile != nullptr)
|
if (tracefile != nullptr)
|
||||||
|
@ -311,6 +312,7 @@ static void DoParse(int lumpnum)
|
||||||
char prompt = '\0';
|
char prompt = '\0';
|
||||||
ZCCParseTrace(f, &prompt);
|
ZCCParseTrace(f, &prompt);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
sc.OpenLumpNum(lumpnum);
|
sc.OpenLumpNum(lumpnum);
|
||||||
auto saved = sc.SavePos();
|
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());
|
I_Error("%d errors while parsing %s", FScriptPosition::ErrorCounter, Wads.GetLumpFullPath(lumpnum).GetChars());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
if (f != nullptr)
|
if (f != nullptr)
|
||||||
{
|
{
|
||||||
fclose(f);
|
fclose(f);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Make a dump of the AST before running the compiler for diagnostic purposes.
|
// Make a dump of the AST before running the compiler for diagnostic purposes.
|
||||||
if (Args->CheckParm("-dumpast"))
|
if (Args->CheckParm("-dumpast"))
|
||||||
|
|
Loading…
Reference in a new issue