fix lacking range expansion; misreading indices during weight sorting; extra sorts on too large ranges
This commit is contained in:
+13
-3
@@ -353,7 +353,7 @@ public:
|
||||
return (o == SUB || o == DIV);
|
||||
}
|
||||
|
||||
int is_math_op(void) const
|
||||
[[nodiscard]] int is_math_op(void) const
|
||||
{
|
||||
if (t != OPERATOR)
|
||||
{
|
||||
@@ -370,7 +370,12 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
int is_opa(void) const
|
||||
[[nodiscard]] int is_mop(void) const
|
||||
{
|
||||
return is_math_op();
|
||||
}
|
||||
|
||||
[[nodiscard]] int is_opa(void) const
|
||||
{
|
||||
if (t != OPERATOR)
|
||||
{
|
||||
@@ -380,7 +385,7 @@ public:
|
||||
return v.o == OPA;
|
||||
}
|
||||
|
||||
int is_cpa(void) const
|
||||
[[nodiscard]] int is_cpa(void) const
|
||||
{
|
||||
if (t != OPERATOR)
|
||||
{
|
||||
@@ -389,6 +394,11 @@ public:
|
||||
|
||||
return v.o == CPA;
|
||||
}
|
||||
|
||||
[[nodiscard]] int is_bracket(void) const
|
||||
{
|
||||
return is_opa() || is_cpa();
|
||||
}
|
||||
};
|
||||
|
||||
struct Operation
|
||||
|
||||
Reference in New Issue
Block a user