writeInner method

  1. @protected
void writeInner(
  1. GenerationContext ctx,
  2. Expression<Object> inner
)

If this Expression wraps an inner expression, this utility method can be used inside writeInto to write that inner expression while wrapping it in parentheses if necessary.

Implementation

@protected
void writeInner(GenerationContext ctx, Expression inner) {
  assert(precedence != Precedence.unknown,
      "Expressions with unknown precedence shouldn't have inner expressions");
  inner.writeAroundPrecedence(ctx, precedence);
}