b64c9ee5e9
The `toString` logic in `mini_types.dart` is improved in the following ways: - The `toString` representation of the "unknown" type is changed from `?` to `_`, to match the behavior of the mini_types parser. - Logic for applying parentheses is simplified and moved into the function `_parenthesizeIf`. - The boolean `allowSuffixes` (which was not well documented, and poorly named) is replaced with a boolean `parenthesizeIfComplex`, and documentation is added to clarify its behavior. - Unit tests of `toString` are added to `mini_types_test.dart`. Change-Id: I251e137369b5880017022be2514f00975a511e72 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/365660 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Paul Berry <paulberry@google.com>
FE/analyzer shared code
This package contains logic that is shared between the front_end and analyzer packages. It is intended solely to facilitate development of the Dart SDK, and is not intended for use by end users. In particular, this package has no public API, so no guarantee is made of compatibility between one version of the package and the next.
End users should consider using the analyzer package to analyze Dart source code.