fix remove_extra_brackets undoing work of post-processing step

This commit is contained in:
2026-10-14 20:44:20 +03:00
parent 1b4693029f
commit 89335fbdc6
2 changed files with 21 additions and 0 deletions
+15
View File
@@ -277,6 +277,21 @@ public:
return "Invalid operator";
}
}
int negative_operator(void) const
{
if (t != OPERATOR)
{
return 0;
}
return (v.o == SUB || v.o == DIV);
}
static int is_negative(Operator o)
{
return (o == SUB || o == DIV);
}
};
struct Operation