- Modify ::disqualifyOnlyParenOps to count sugared operators.
- Labelled '(' and ')' as circumflex operators, thanks awwaiid.
This commit is contained in:
Paul Beckingham 2014-11-09 16:51:36 -05:00
parent 61e943f456
commit 3279566244
2 changed files with 18 additions and 6 deletions

View file

@ -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]))