5a79f8a9f3
Previously, in the "mini-ast" pseudo-language for shared flow analysis and type analysis unit testing, there were two separate functions to create a rest pattern (`...`): - `listPatternRestElement` for creating a rest pattern for use in a list pattern - `mapPatternRestElement` for creating a rest pattern for use in a map pattern The latter is not allowed in Dart, but it's supported to allow for better error recovery. But having two functions wasn't necessary--the two functions did exactly the same thing. This CL simplifies things so that there is just a single function, `restPattern`. It also renames the underlying representation class from `RestPatternElement` to `RestPattern`, to match the nomenclature in the patterns spec document. Change-Id: Iecfe8c86f49161e0657cdab44f000f47c0e3c212 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/315520 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Paul Berry <paulberry@google.com> Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>