mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-03 16:39:41 +00:00
allow declaration of local variables with keywords as names
This commit is contained in:
parent
32860a05e3
commit
2b2ac6f62b
1 changed files with 6 additions and 0 deletions
|
@ -370,6 +370,12 @@ namespace Compiler
|
||||||
mState = EndState;
|
mState = EndState;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if (mState==ShortState || mState==LongState || mState==FloatState)
|
||||||
|
{
|
||||||
|
// allow keywords to be used as local variable names. MW script compiler, you suck!
|
||||||
|
/// \todo option to disable this atrocity.
|
||||||
|
return parseName (loc.mLiteral, loc, scanner);
|
||||||
|
}
|
||||||
|
|
||||||
if (mAllowExpression)
|
if (mAllowExpression)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue