mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Expressions
- Eliminated % modulus operator - who cares? - Found a potential problem with argv[0].
This commit is contained in:
parent
3096364352
commit
9ceae7c5c2
2 changed files with 2 additions and 8 deletions
|
@ -119,7 +119,7 @@ static struct
|
|||
// { "-", 15, 'u', 1, 'r' }, // Unary minus
|
||||
{ "*", 13, 'b', 1, 'l' }, // Multiplication
|
||||
{ "/", 13, 'b', 1, 'l' }, // Division
|
||||
{ "%", 13, 'b', 1, 'l' }, // Modulus
|
||||
// { "%", 13, 'b', 1, 'l' }, // Modulus
|
||||
{ "+", 12, 'b', 1, 'l' }, // Addition
|
||||
{ "-", 12, 'b', 1, 'l' }, // Subtraction
|
||||
{ "<", 10, 'b', 1, 'l' }, // Less than
|
||||
|
@ -288,7 +288,7 @@ void Arguments::categorize ()
|
|||
// program
|
||||
else if (arg == this->begin ())
|
||||
{
|
||||
arg->second = "program";
|
||||
arg->second = "program"; // TODO Is this a problem for expressions that do not contain a program name?
|
||||
}
|
||||
|
||||
// command
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#include <sstream>
|
||||
#include <stdlib.h>
|
||||
#include <Context.h>
|
||||
#include <Lexer.h>
|
||||
#include <Date.h>
|
||||
#include <Duration.h>
|
||||
#include <Nibbler.h>
|
||||
|
@ -336,11 +335,6 @@ bool Expression::eval (Task& task)
|
|||
value_stack.push_back (left);
|
||||
}
|
||||
|
||||
else if (arg->first == "%")
|
||||
{
|
||||
// TODO Implement modulus.
|
||||
}
|
||||
|
||||
else if (arg->first == "+")
|
||||
{
|
||||
left = left + right;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue