mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 20:53:50 +00:00
removed a redundant else and made unary + work also in the console
This commit is contained in:
parent
2158bfe285
commit
ae54f34f25
2 changed files with 5 additions and 3 deletions
|
@ -650,13 +650,15 @@ namespace Compiler
|
||||||
mOperators.push_back ('m');
|
mOperators.push_back ('m');
|
||||||
mTokenLoc = loc;
|
mTokenLoc = loc;
|
||||||
return true;
|
return true;
|
||||||
} else if (code ==Scanner::S_plus && mNextOperand) {
|
}
|
||||||
|
|
||||||
|
if (code ==Scanner::S_plus && mNextOperand)
|
||||||
|
{
|
||||||
// Also unary, but +, just ignore it
|
// Also unary, but +, just ignore it
|
||||||
mTokenLoc = loc;
|
mTokenLoc = loc;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (code==Scanner::S_open)
|
if (code==Scanner::S_open)
|
||||||
{
|
{
|
||||||
if (mNextOperand)
|
if (mNextOperand)
|
||||||
|
|
|
@ -555,7 +555,7 @@ namespace Compiler
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mAllowExpression && mState==BeginState &&
|
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);
|
scanner.putbackSpecial (code, loc);
|
||||||
parseExpression (scanner, loc);
|
parseExpression (scanner, loc);
|
||||||
|
|
Loading…
Reference in a new issue