removed a redundant else and made unary + work also in the console

pull/778/head
Marc Zinnschlag 9 years ago
parent 2158bfe285
commit ae54f34f25

@ -650,13 +650,15 @@ namespace Compiler
mOperators.push_back ('m');
mTokenLoc = loc;
return true;
} else if (code ==Scanner::S_plus && mNextOperand) {
}
if (code ==Scanner::S_plus && mNextOperand)
{
// Also unary, but +, just ignore it
mTokenLoc = loc;
return true;
}
if (code==Scanner::S_open)
{
if (mNextOperand)

@ -555,7 +555,7 @@ namespace Compiler
}
if (mAllowExpression && mState==BeginState &&
(code==Scanner::S_open || code==Scanner::S_minus))
(code==Scanner::S_open || code==Scanner::S_minus || code==Scanner::S_plus))
{
scanner.putbackSpecial (code, loc);
parseExpression (scanner, loc);

Loading…
Cancel
Save