817882c36b
Before, when parsing a new style typedef without an identifier (e.g. `typedef = whatnot`) it concluded that the token after the equal-sign wasn't an equal sign an that it thus had to be an old style typedef, followed by recovery there. This CL makes the recovery insert an identifier after `typedef` (what the recovery of the old style actually did too), and then parse it as a new style typedef. This causes the previous many errors to just be `Expected an identifier, but got '='.` It is furthermore verified that the parsing of such a case is ~the same as when having an indentifier. Fixes https://github.com/dart-lang/sdk/issues/56912 Change-Id: I5cde1f29839555b1d6027a7d040dc6f60ac614a5 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/392560 Reviewed-by: Johnni Winther <johnniwinther@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Jens Johansen <jensj@google.com>