removed an unused parser settings (implicitly fixing a case were this setting was not applied correctly)

deque
Marc Zinnschlag 11 years ago
parent 27c795483b
commit 12fc0aaecb

@ -730,7 +730,7 @@ namespace Compiler
}
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;
int optionalCount = 0;
@ -762,15 +762,10 @@ namespace Compiler
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);
}
else
stringParser.append (code);
stack.push (tmp);
if (optional)
++optionalCount;
@ -795,10 +790,7 @@ namespace Compiler
if (type!=*iter)
Generator::convert (tmp, type, *iter);
if (invert)
stack.push (tmp);
else
std::copy (tmp.begin(), tmp.end(), std::back_inserter (code));
stack.push (tmp);
if (optional)
++optionalCount;

@ -96,7 +96,7 @@ namespace Compiler
/// \return Type ('l': integer, 'f': float)
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.
/// \param arguments Uses ScriptArgs typedef
/// \see Compiler::ScriptArgs

@ -166,7 +166,7 @@ namespace Compiler
if (!arguments.empty())
{
mExprParser.reset();
mExprParser.parseArguments (arguments, scanner, mCode, true);
mExprParser.parseArguments (arguments, scanner, mCode);
}
mName = name;
@ -278,7 +278,7 @@ namespace Compiler
mExplicit.clear();
}
int optionals = mExprParser.parseArguments (argumentType, scanner, mCode, true);
int optionals = mExprParser.parseArguments (argumentType, scanner, mCode);
extensions->generateInstructionCode (keyword, mCode, mLiterals, mExplicit, optionals);
mState = EndState;
@ -363,14 +363,14 @@ namespace Compiler
case Scanner::K_startscript:
mExprParser.parseArguments ("c", scanner, mCode, true);
mExprParser.parseArguments ("c", scanner, mCode);
Generator::startScript (mCode);
mState = EndState;
return true;
case Scanner::K_stopscript:
mExprParser.parseArguments ("c", scanner, mCode, true);
mExprParser.parseArguments ("c", scanner, mCode);
Generator::stopScript (mCode);
mState = EndState;
return true;

Loading…
Cancel
Save