mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 01:15:33 +00:00
fixed parsing of end statements in scripts with IDs matching keywords
This commit is contained in:
parent
ade871ce12
commit
90b38cbfbe
1 changed files with 13 additions and 0 deletions
|
@ -71,6 +71,19 @@ namespace Compiler
|
|||
return true;
|
||||
}
|
||||
|
||||
if (mState==EndNameState)
|
||||
{
|
||||
// optional repeated name after end statement
|
||||
if (mName!=loc.mLiteral)
|
||||
reportWarning ("Names for script " + mName + " do not match", loc);
|
||||
|
||||
mState = EndCompleteState;
|
||||
return false; // we are stopping here, because there might be more garbage on the end line,
|
||||
// that we must ignore.
|
||||
//
|
||||
/// \todo allow this workaround to be disabled for newer scripts
|
||||
}
|
||||
|
||||
return Parser::parseKeyword (keyword, loc, scanner);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue