1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-01 03:21:41 +00:00

allow leaving out if in a top-level if-statement

This commit is contained in:
Marc Zinnschlag 2014-02-13 08:49:40 +01:00
parent 2eeb0eb4f3
commit 0313876d88

View File

@ -71,6 +71,12 @@ namespace Compiler
if (code==Scanner::S_newline) // empty line
return true;
if (code==Scanner::S_open) /// \todo Option to switch this off
{
scanner.putbackSpecial (code, loc);
return parseKeyword (Scanner::K_if, loc, scanner);
}
mLineParser.reset();
if (mLineParser.parseSpecial (code, loc, scanner))
scanner.scan (mLineParser);