mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
CLI
- Modify ::disqualifyOnlyParenOps to count sugared operators. - Labelled '(' and ')' as circumflex operators, thanks awwaiid.
This commit is contained in:
parent
61e943f456
commit
3279566244
2 changed files with 18 additions and 6 deletions
|
@ -45,8 +45,8 @@ static struct
|
|||
{
|
||||
std::string op;
|
||||
int precedence;
|
||||
char type;
|
||||
char associativity;
|
||||
char type; // b=binary, u=unary, c=circumfix
|
||||
char associativity; // l=left, r=right, _=?
|
||||
} operators[] =
|
||||
{
|
||||
// Operator Precedence Type Associativity
|
||||
|
@ -83,8 +83,8 @@ static struct
|
|||
{ "or", 4, 'b', 'l' }, // Disjunction
|
||||
{ "xor", 3, 'b', 'l' }, // Disjunction
|
||||
|
||||
{ "(", 0, '_', 'l' }, // Precedence start
|
||||
{ ")", 0, '_', 'l' }, // Precedence end
|
||||
{ "(", 0, 'c', '_' }, // Precedence start
|
||||
{ ")", 0, 'c', '_' }, // Precedence end
|
||||
};
|
||||
|
||||
#define NUM_OPERATORS (sizeof (operators) / sizeof (operators[0]))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue