1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 23:23:52 +00:00

replaced stay [ ignoring implementation with one that does not interfere with other workarounds (Fixes #2205)

This commit is contained in:
Marc Zinnschlag 2014-12-13 15:43:40 +01:00
parent e4f75267d0
commit ed5387fb8c
2 changed files with 8 additions and 2 deletions

View file

@ -489,6 +489,13 @@ namespace Compiler
bool LineParser::parseSpecial (int code, const TokenLoc& loc, Scanner& scanner) bool LineParser::parseSpecial (int code, const TokenLoc& loc, Scanner& scanner)
{ {
if (mState==EndState && code==Scanner::S_open)
{
getErrorHandler().warning ("stray '[' or '(' at the end of the line (ignoring it)",
loc);
return true;
}
if (code==Scanner::S_newline && if (code==Scanner::S_newline &&
(mState==EndState || mState==BeginState || mState==PotentialEndState)) (mState==EndState || mState==BeginState || mState==PotentialEndState))
return false; return false;

View file

@ -528,8 +528,7 @@ namespace Compiler
bool Scanner::isWhitespace (char c) bool Scanner::isWhitespace (char c)
{ {
return c==' ' || c=='\t' return c==' ' || c=='\t';
|| c=='['; ///< \todo disable this when doing more strict compiling
} }
// constructor // constructor