dart-lang / code_builder

A fluent API for generating valid Dart source code
https://pub.dev/packages/code_builder
BSD 3-Clause "New" or "Revised" License
423 stars 66 forks source link

Add Expression.parenthesized #425

Closed natebosch closed 11 months ago

natebosch commented 11 months ago

We use ParenthesizedExpression internally in a few places where it's know that they are required, but some corners of the syntax require extra parenthesis in ways that are not feasible to detect in this library. Allow for explicit manual parenthesis.