mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-06 10:45:33 +00:00
also allow the use of keywords as remote local variables in set statements
This commit is contained in:
parent
2086ebe410
commit
e76ef92669
1 changed files with 14 additions and 0 deletions
|
@ -219,6 +219,20 @@ namespace Compiler
|
||||||
|
|
||||||
bool LineParser::parseKeyword (int keyword, const TokenLoc& loc, Scanner& scanner)
|
bool LineParser::parseKeyword (int keyword, const TokenLoc& loc, Scanner& scanner)
|
||||||
{
|
{
|
||||||
|
if (mState==SetMemberVarState)
|
||||||
|
{
|
||||||
|
mMemberName = loc.mLiteral;
|
||||||
|
std::pair<char, bool> type = getContext().getMemberType (mMemberName, mName);
|
||||||
|
|
||||||
|
if (type.first!=' ')
|
||||||
|
{
|
||||||
|
mState = SetMemberVarState2;
|
||||||
|
mType = type.first;
|
||||||
|
mReferenceMember = type.second;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (mState==SetPotentialMemberVarState && keyword==Scanner::K_to)
|
if (mState==SetPotentialMemberVarState && keyword==Scanner::K_to)
|
||||||
{
|
{
|
||||||
getErrorHandler().warning ("unknown variable (ignoring set instruction)", loc);
|
getErrorHandler().warning ("unknown variable (ignoring set instruction)", loc);
|
||||||
|
|
Loading…
Reference in a new issue