mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 20:19:57 +00:00
removed an unused parser settings (implicitly fixing a case were this setting was not applied correctly)
This commit is contained in:
parent
27c795483b
commit
12fc0aaecb
3 changed files with 10 additions and 18 deletions
|
@ -730,7 +730,7 @@ namespace Compiler
|
||||||
}
|
}
|
||||||
|
|
||||||
int ExprParser::parseArguments (const std::string& arguments, Scanner& scanner,
|
int ExprParser::parseArguments (const std::string& arguments, Scanner& scanner,
|
||||||
std::vector<Interpreter::Type_Code>& code, bool invert)
|
std::vector<Interpreter::Type_Code>& code)
|
||||||
{
|
{
|
||||||
bool optional = false;
|
bool optional = false;
|
||||||
int optionalCount = 0;
|
int optionalCount = 0;
|
||||||
|
@ -762,15 +762,10 @@ namespace Compiler
|
||||||
|
|
||||||
if (*iter!='x')
|
if (*iter!='x')
|
||||||
{
|
{
|
||||||
if (invert)
|
std::vector<Interpreter::Type_Code> tmp;
|
||||||
{
|
stringParser.append (tmp);
|
||||||
std::vector<Interpreter::Type_Code> tmp;
|
|
||||||
stringParser.append (tmp);
|
|
||||||
|
|
||||||
stack.push (tmp);
|
stack.push (tmp);
|
||||||
}
|
|
||||||
else
|
|
||||||
stringParser.append (code);
|
|
||||||
|
|
||||||
if (optional)
|
if (optional)
|
||||||
++optionalCount;
|
++optionalCount;
|
||||||
|
@ -795,10 +790,7 @@ namespace Compiler
|
||||||
if (type!=*iter)
|
if (type!=*iter)
|
||||||
Generator::convert (tmp, type, *iter);
|
Generator::convert (tmp, type, *iter);
|
||||||
|
|
||||||
if (invert)
|
stack.push (tmp);
|
||||||
stack.push (tmp);
|
|
||||||
else
|
|
||||||
std::copy (tmp.begin(), tmp.end(), std::back_inserter (code));
|
|
||||||
|
|
||||||
if (optional)
|
if (optional)
|
||||||
++optionalCount;
|
++optionalCount;
|
||||||
|
|
|
@ -96,7 +96,7 @@ namespace Compiler
|
||||||
/// \return Type ('l': integer, 'f': float)
|
/// \return Type ('l': integer, 'f': float)
|
||||||
|
|
||||||
int parseArguments (const std::string& arguments, Scanner& scanner,
|
int parseArguments (const std::string& arguments, Scanner& scanner,
|
||||||
std::vector<Interpreter::Type_Code>& code, bool invert = false);
|
std::vector<Interpreter::Type_Code>& code);
|
||||||
///< Parse sequence of arguments specified by \a arguments.
|
///< Parse sequence of arguments specified by \a arguments.
|
||||||
/// \param arguments Uses ScriptArgs typedef
|
/// \param arguments Uses ScriptArgs typedef
|
||||||
/// \see Compiler::ScriptArgs
|
/// \see Compiler::ScriptArgs
|
||||||
|
|
|
@ -166,7 +166,7 @@ namespace Compiler
|
||||||
if (!arguments.empty())
|
if (!arguments.empty())
|
||||||
{
|
{
|
||||||
mExprParser.reset();
|
mExprParser.reset();
|
||||||
mExprParser.parseArguments (arguments, scanner, mCode, true);
|
mExprParser.parseArguments (arguments, scanner, mCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
mName = name;
|
mName = name;
|
||||||
|
@ -278,7 +278,7 @@ namespace Compiler
|
||||||
mExplicit.clear();
|
mExplicit.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
int optionals = mExprParser.parseArguments (argumentType, scanner, mCode, true);
|
int optionals = mExprParser.parseArguments (argumentType, scanner, mCode);
|
||||||
|
|
||||||
extensions->generateInstructionCode (keyword, mCode, mLiterals, mExplicit, optionals);
|
extensions->generateInstructionCode (keyword, mCode, mLiterals, mExplicit, optionals);
|
||||||
mState = EndState;
|
mState = EndState;
|
||||||
|
@ -363,14 +363,14 @@ namespace Compiler
|
||||||
|
|
||||||
case Scanner::K_startscript:
|
case Scanner::K_startscript:
|
||||||
|
|
||||||
mExprParser.parseArguments ("c", scanner, mCode, true);
|
mExprParser.parseArguments ("c", scanner, mCode);
|
||||||
Generator::startScript (mCode);
|
Generator::startScript (mCode);
|
||||||
mState = EndState;
|
mState = EndState;
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case Scanner::K_stopscript:
|
case Scanner::K_stopscript:
|
||||||
|
|
||||||
mExprParser.parseArguments ("c", scanner, mCode, true);
|
mExprParser.parseArguments ("c", scanner, mCode);
|
||||||
Generator::stopScript (mCode);
|
Generator::stopScript (mCode);
|
||||||
mState = EndState;
|
mState = EndState;
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue