[ANTLR] Move optional trailing question mark up.

Closes https://github.com/dart-lang/sdk/pull/51742

GitOrigin-RevId: 8aed1ba4ebbd14aa88a74f4f23464e2c24a10c38
Change-Id: I8184a2edc66acc79c51d3838b0849c4a414784fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288981
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
This commit is contained in:
Modestas Valauskas 2023-03-17 11:33:59 +00:00 committed by Commit Queue
parent 8912e03797
commit 337d2cc8b1

View file

@ -1397,18 +1397,18 @@ type
typeNotVoid
: functionType '?'?
| recordType '?'?
| typeNotVoidNotFunction
| typeNotVoidNotFunction '?'?
;
typeNotFunction
: typeNotVoidNotFunction
: typeNotVoidNotFunction '?'?
| recordType '?'?
| VOID
;
typeNotVoidNotFunction
: typeName typeArguments? '?'?
| FUNCTION '?'?
: typeName typeArguments?
| FUNCTION
;
typeName