fix logic for selecting brackets to open; same outer level op ranges select incorrectly
This commit is contained in:
@@ -292,6 +292,43 @@ public:
|
||||
{
|
||||
return (o == SUB || o == DIV);
|
||||
}
|
||||
|
||||
int is_math_op(void) const
|
||||
{
|
||||
if (t != OPERATOR)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch (v.o)
|
||||
{
|
||||
case OPA:
|
||||
case CPA:
|
||||
return 0;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
int is_opa(void) const
|
||||
{
|
||||
if (t != OPERATOR)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return v.o == OPA;
|
||||
}
|
||||
|
||||
int is_cpa(void) const
|
||||
{
|
||||
if (t != OPERATOR)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return v.o == CPA;
|
||||
}
|
||||
};
|
||||
|
||||
struct Operation
|
||||
|
||||
Reference in New Issue
Block a user