mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-06 00:55:50 +00:00
Merge branch 'variable_function' into 'master'
Parse local variables sharing a name with a function as variables Closes #6291 See merge request OpenMW/openmw!1269
This commit is contained in:
commit
88d5b4a90b
@ -48,6 +48,7 @@
|
||||
Bug #6282: Laura craft doesn't follow the player character
|
||||
Bug #6283: Avis Dorsey follows you after her death
|
||||
Bug #6289: Keyword search in dialogues expected the text to be all ASCII characters
|
||||
Bug #6291: Can't pickup the dead mage's journal from the mysterious hunter mod
|
||||
Bug #6302: Teleporting disabled actor breaks its disabled state
|
||||
Bug #6307: Pathfinding in Infidelities quest from Tribunal addon is broken
|
||||
Feature #890: OpenMW-CS: Column filtering
|
||||
|
@ -353,15 +353,21 @@ namespace Compiler
|
||||
{
|
||||
if (const Extensions *extensions = getContext().getExtensions())
|
||||
{
|
||||
char returnType; // ignored
|
||||
std::string argumentType; // ignored
|
||||
bool hasExplicit = false; // ignored
|
||||
if (extensions->isInstruction (keyword, argumentType, hasExplicit))
|
||||
bool isInstruction = extensions->isInstruction (keyword, argumentType, hasExplicit);
|
||||
|
||||
if(isInstruction || (mExplicit.empty() && extensions->isFunction(keyword, returnType, argumentType, hasExplicit)))
|
||||
{
|
||||
// pretend this is not a keyword
|
||||
std::string name = loc.mLiteral;
|
||||
if (name.size()>=2 && name[0]=='"' && name[name.size()-1]=='"')
|
||||
name = name.substr (1, name.size()-2);
|
||||
return parseName (name, loc, scanner);
|
||||
if(isInstruction || mLocals.getType(Misc::StringUtils::lowerCase(name)) != ' ')
|
||||
{
|
||||
// pretend this is not a keyword
|
||||
return parseName (name, loc, scanner);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user