mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-16 08:42:23 +00:00
ignore attempts to set non-existing variables
This commit is contained in:
parent
b3412b7eec
commit
749136bf33
@ -219,6 +219,14 @@ namespace Compiler
|
|||||||
|
|
||||||
bool LineParser::parseKeyword (int keyword, const TokenLoc& loc, Scanner& scanner)
|
bool LineParser::parseKeyword (int keyword, const TokenLoc& loc, Scanner& scanner)
|
||||||
{
|
{
|
||||||
|
if (mState==SetPotentialMemberVarState && keyword==Scanner::K_to)
|
||||||
|
{
|
||||||
|
getErrorHandler().warning ("unknown variable (ignoring set instruction)", loc);
|
||||||
|
SkipParser skip (getErrorHandler(), getContext());
|
||||||
|
scanner.scan (skip);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (mState==SetState)
|
if (mState==SetState)
|
||||||
{
|
{
|
||||||
// allow keywords to be used as variable names when assigning a value to a variable.
|
// allow keywords to be used as variable names when assigning a value to a variable.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user