mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Eval
- Eval maps '!==' to Variant::operator!=, '!=' to Variant::operator_nopartial, '==' to Variant::operator== and '=' to Variant::operator_partial.
This commit is contained in:
parent
855de25e0d
commit
9318dced5a
1 changed files with 4 additions and 2 deletions
|
@ -71,7 +71,8 @@ static struct
|
|||
|
||||
{ "=", 9, 'b', 'l' }, // Equal (partial)
|
||||
{ "==", 9, 'b', 'l' }, // Equal (exact)
|
||||
{ "!=", 9, 'b', 'l' }, // Inequal
|
||||
{ "!=", 9, 'b', 'l' }, // Inequal (partial)
|
||||
{ "!==", 9, 'b', 'l' }, // Inequal (exact)
|
||||
|
||||
{ "~", 8, 'b', 'l' }, // Regex match
|
||||
{ "!~", 8, 'b', 'l' }, // Regex non-match
|
||||
|
@ -278,8 +279,9 @@ void Eval::evaluatePostfixStack (
|
|||
else if (token->first == ">") left = left > right;
|
||||
else if (token->first == ">=") left = left >= right;
|
||||
else if (token->first == "==") left = left.operator== (right);
|
||||
else if (token->first == "!==") left = left.operator!= (right);
|
||||
else if (token->first == "=") left = left.operator_partial (right);
|
||||
else if (token->first == "!=") left = left.operator!= (right);
|
||||
else if (token->first == "!=") left = left.operator_nopartial (right);
|
||||
else if (token->first == "+") left += right;
|
||||
else if (token->first == "-") left -= right;
|
||||
else if (token->first == "*") left *= right;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue