e055351442
This aligns the call to `Listener.beginEnum*` with that of `Listener.beginClass*`. A `beginExtensionPrelude` is added, replacing the call to `beginUncategorizedTopLevelDeclaration` and matching the call to `beginClassOrMixinOrNamedMixinApplicationPrelude` for classes. `beginEnumDeclaration` and `endEnumDeclaration` replaces the `beginEnum`/`endEnum` pair, matching the calls to `beginClassDeclaration`/`endClassDeclaration` with the name and type parameters now available at `beginEnumDeclaration` similar to `beginClassDeclaration`. This helps supporting primary constructors in enums because the enclosing enum can be prepared in `beginEnumDeclaration` before calls to `endPrimaryConstructor`. Change-Id: I9c1ad55db6e3fcc09ed5ac0c05f5d50db95ae608 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/458200 Commit-Queue: Johnni Winther <johnniwinther@google.com> Reviewed-by: Jens Johansen <jensj@google.com>