1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 09:35:28 +00:00

interpret instruction keywords as names within expressions

This commit is contained in:
Marc Zinnschlag 2014-02-12 09:56:25 +01:00
parent c0a6acfe6c
commit 93d4743012

View File

@ -344,6 +344,17 @@ namespace Compiler
bool ExprParser::parseKeyword (int keyword, const TokenLoc& loc, Scanner& scanner)
{
if (const Extensions *extensions = getContext().getExtensions())
{
std::string argumentType; // ignored
bool hasExplicit = false; // ignored
if (extensions->isInstruction (keyword, argumentType, hasExplicit))
{
// pretend this is not a keyword
return parseName (loc.mLiteral, loc, scanner);
}
}
mFirst = false;
if (!mExplicit.empty())