fix logic for selecting brackets to open; same outer level op ranges select incorrectly

This commit is contained in:
2026-10-15 09:03:54 +03:00
parent e837671d15
commit 360628d65c
2 changed files with 244 additions and 30 deletions
+37
View File
@@ -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