mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-25 16:43:33 +00:00
fixed parsing of end statements in scripts with IDs matching keywords
This commit is contained in:
parent
ade871ce12
commit
90b38cbfbe
@ -71,6 +71,19 @@ namespace Compiler
|
|||||||
return true;
|
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);
|
return Parser::parseKeyword (keyword, loc, scanner);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user