Skip to content

Render

opulse.expression.render

Render expression trees as text.

Two styles:

  • full - every operator application except the outermost is parenthesised. Used inside definitions, where the grammar has a single precedence level.
  • minimal - brackets only where precedence (priority, larger binds tighter) or associativity requires them. Unary applications below the root are always bracketed, and so is a binary operand of a unary operator, because unary operators bind tighter than every binary operator (docs/reference/semantics.md section 8). Operators without a priority fall back to full.

Operators with three or more arguments are written in call form, ⊕(x, y, z), in both styles: the call delimits itself, so it is never bracketed, and each argument is written as a top-level expression.