Skip to content

Avoid rendering parentheses on left associative operations #14398

@lukaseder

Description

@lukaseder

There exist a few operations that are left associative, where we still render unnecessary parentheses, e.g. Field::sub or Field::div:

-- These are equivalent:
((((0 - 1) - 2) - 3) - 4)
0 - 1 - 2 - 3 - 4

-- These aren't equivalent
(0 - (1 - (2 - (3 - 4))))
0 - 1 - 2 - 3 - 4

This affects at least:

  • SUB
  • DIV

Possibly others, as well

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions