mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-07 22:58:34 +02:00
Eval
- The _neg_ operator was a copy/paste of the ! operator, and needed to be numeric, not boolean.
This commit is contained in:
parent
78f1f29db1
commit
c0424cedeb
1 changed files with 6 additions and 2 deletions
|
@ -273,13 +273,17 @@ void Eval::evaluatePostfixStack (
|
|||
|
||||
Variant right = values.back ();
|
||||
values.pop_back ();
|
||||
|
||||
Variant result (0);
|
||||
result -= right;
|
||||
|
||||
if (_debug)
|
||||
{
|
||||
context.debug (format ("[{1}] eval pop '{2}'", values.size () + 1, (std::string) right));
|
||||
context.debug (format ("[{1}] eval operator '{2}'", values.size (), token->first));
|
||||
context.debug (format ("[{1}] eval result push '{2}'", values.size (), (bool) !right));
|
||||
context.debug (format ("[{1}] eval result push '{2}'", values.size (), (std::string) result));
|
||||
}
|
||||
values.push_back (Variant (0) - right);
|
||||
values.push_back (result);
|
||||
}
|
||||
else if (token->second == Lexer::typeOperator &&
|
||||
token->first == "_pos_")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue