mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-03 21:45:34 +00:00
Merge branch 'the_goal_is_elevation' into 'master'
Make names starting with digits use normal name parsing code Closes #6282 See merge request OpenMW/openmw!1222
This commit is contained in:
commit
ba0f6ada71
3 changed files with 5 additions and 23 deletions
|
@ -37,6 +37,7 @@
|
||||||
Bug #6184: Command and Calm and Demoralize and Frenzy and Rally magic effects inconsistencies with vanilla
|
Bug #6184: Command and Calm and Demoralize and Frenzy and Rally magic effects inconsistencies with vanilla
|
||||||
Bug #6197: Infinite Casting Loop
|
Bug #6197: Infinite Casting Loop
|
||||||
Bug #6273: Respawning NPCs rotation is inconsistent
|
Bug #6273: Respawning NPCs rotation is inconsistent
|
||||||
|
Bug #6282: Laura craft doesn't follow the player character
|
||||||
Bug #6289: Keyword search in dialogues expected the text to be all ASCII characters
|
Bug #6289: Keyword search in dialogues expected the text to be all ASCII characters
|
||||||
Feature #890: OpenMW-CS: Column filtering
|
Feature #890: OpenMW-CS: Column filtering
|
||||||
Feature #2554: Modifying an object triggers the instances table to scroll to the corresponding record
|
Feature #2554: Modifying an object triggers the instances table to scroll to the corresponding record
|
||||||
|
|
|
@ -164,8 +164,6 @@ namespace Compiler
|
||||||
std::string value;
|
std::string value;
|
||||||
c.appendTo(value);
|
c.appendTo(value);
|
||||||
|
|
||||||
bool error = false;
|
|
||||||
|
|
||||||
while (get (c))
|
while (get (c))
|
||||||
{
|
{
|
||||||
if (c.isDigit())
|
if (c.isDigit())
|
||||||
|
@ -174,16 +172,11 @@ namespace Compiler
|
||||||
}
|
}
|
||||||
else if (!c.isMinusSign() && isStringCharacter (c))
|
else if (!c.isMinusSign() && isStringCharacter (c))
|
||||||
{
|
{
|
||||||
error = true;
|
/// workaround that allows names to begin with digits
|
||||||
c.appendTo(value);
|
return scanName(c, parser, cont, value);
|
||||||
}
|
}
|
||||||
else if (c=='.')
|
else if (c=='.')
|
||||||
{
|
{
|
||||||
if (error)
|
|
||||||
{
|
|
||||||
putback (c);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return scanFloat (value, parser, cont);
|
return scanFloat (value, parser, cont);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -193,17 +186,6 @@ namespace Compiler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (error)
|
|
||||||
{
|
|
||||||
/// workaround that allows names to begin with digits
|
|
||||||
/// \todo disable
|
|
||||||
TokenLoc loc (mLoc);
|
|
||||||
mLoc.mLiteral.clear();
|
|
||||||
cont = parser.parseName (value, loc, *this);
|
|
||||||
return true;
|
|
||||||
// return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
TokenLoc loc (mLoc);
|
TokenLoc loc (mLoc);
|
||||||
mLoc.mLiteral.clear();
|
mLoc.mLiteral.clear();
|
||||||
|
|
||||||
|
@ -268,9 +250,8 @@ namespace Compiler
|
||||||
nullptr
|
nullptr
|
||||||
};
|
};
|
||||||
|
|
||||||
bool Scanner::scanName (MultiChar& c, Parser& parser, bool& cont)
|
bool Scanner::scanName (MultiChar& c, Parser& parser, bool& cont, std::string name)
|
||||||
{
|
{
|
||||||
std::string name;
|
|
||||||
c.appendTo(name);
|
c.appendTo(name);
|
||||||
|
|
||||||
if (!scanName (name))
|
if (!scanName (name))
|
||||||
|
|
|
@ -236,7 +236,7 @@ namespace Compiler
|
||||||
|
|
||||||
bool scanFloat (const std::string& intValue, Parser& parser, bool& cont);
|
bool scanFloat (const std::string& intValue, Parser& parser, bool& cont);
|
||||||
|
|
||||||
bool scanName (MultiChar& c, Parser& parser, bool& cont);
|
bool scanName (MultiChar& c, Parser& parser, bool& cont, std::string name = {});
|
||||||
|
|
||||||
/// \param name May contain the start of the name (one or more characters)
|
/// \param name May contain the start of the name (one or more characters)
|
||||||
bool scanName (std::string& name);
|
bool scanName (std::string& name);
|
||||||
|
|
Loading…
Reference in a new issue