add bracket opening logs
This commit is contained in:
@@ -634,6 +634,11 @@ static Expression::Token::Operator get_prior_mop(const std::vector<Expression::T
|
||||
|
||||
static void open_brackets(std::vector<Expression::Token>& tv, const Range &r)
|
||||
{
|
||||
std::vector<int> hl;
|
||||
hl.emplace_back(get_mop_location(tv, r.start) - 2);
|
||||
hl.emplace_back(get_mop_location(tv, r.finish) + 2);
|
||||
Parser::print_math_vector(tv, hl);
|
||||
|
||||
if (Expression::Token::Operator po = get_prior_mop(tv, get_mop_location(tv, r.start)); po == Expression::Token::SUB || po == Expression::Token::DIV)
|
||||
{
|
||||
for (int i = r.start; i <= r.finish; i++)
|
||||
@@ -666,6 +671,7 @@ static void open_brackets(std::vector<Expression::Token>& tv, const Range &r)
|
||||
|
||||
static void remove_extra_brackets(std::vector<Expression::Token>& tv)
|
||||
{
|
||||
pr_debug("Processing: removing extra brackets");
|
||||
std::vector<int> mp;
|
||||
create_prios_vector(tv, mp);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user