mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-07 12:54:00 +00:00
improved the remaining handling of extra arguments
This commit is contained in:
parent
46e32de350
commit
ece40b1e96
@ -639,6 +639,7 @@ namespace Compiler
|
|||||||
if (code==Scanner::S_newline)
|
if (code==Scanner::S_newline)
|
||||||
{
|
{
|
||||||
// end marker
|
// end marker
|
||||||
|
if (mTokenLoc.mLiteral.empty())
|
||||||
mTokenLoc = loc;
|
mTokenLoc = loc;
|
||||||
scanner.putbackSpecial (code, loc);
|
scanner.putbackSpecial (code, loc);
|
||||||
return false;
|
return false;
|
||||||
@ -820,7 +821,7 @@ namespace Compiler
|
|||||||
if (parser.isEmpty())
|
if (parser.isEmpty())
|
||||||
break;
|
break;
|
||||||
else
|
else
|
||||||
getErrorHandler().warning("Ignoring extra argument", mTokenLoc);
|
getErrorHandler().warning("Ignoring extra argument", parser.getTokenLoc());
|
||||||
}
|
}
|
||||||
else if (*iter=='z')
|
else if (*iter=='z')
|
||||||
{
|
{
|
||||||
@ -878,4 +879,9 @@ namespace Compiler
|
|||||||
|
|
||||||
return optionalCount;
|
return optionalCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const TokenLoc& ExprParser::getTokenLoc() const
|
||||||
|
{
|
||||||
|
return mTokenLoc;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -103,6 +103,8 @@ namespace Compiler
|
|||||||
/// \param invert Store arguments in reverted order.
|
/// \param invert Store arguments in reverted order.
|
||||||
/// \param ignoreKeyword A keyword that is seen as junk
|
/// \param ignoreKeyword A keyword that is seen as junk
|
||||||
/// \return number of optional arguments
|
/// \return number of optional arguments
|
||||||
|
|
||||||
|
const TokenLoc& getTokenLoc() const;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user