Replace identifierNotFUNCTION with identifier.

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

GitOrigin-RevId: 420ce80ffed652776cc612aaa7209a81df4fe222
Change-Id: I870ffe0d63eb0bbcbfe8f5db6be940c6a470750d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287667
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
This commit is contained in:
Modestas Valauskas 2023-03-09 14:50:46 +00:00 committed by Commit Queue
parent a06ade1d14
commit e0fedb81a1

View file

@ -3,6 +3,8 @@
// BSD-style license that can be found in the LICENSE file. // BSD-style license that can be found in the LICENSE file.
// CHANGES: // CHANGES:
// v0.31 Inline `identifierNotFUNCTION` into `identifier`. Replace all
// other references with `identifier` to match the spec.
// //
// v0.30 Add support for the class modifiers `sealed`, `final`, `base`, // v0.30 Add support for the class modifiers `sealed`, `final`, `base`,
// `interface`, and for `mixin class` declarations. Also add support for // `interface`, and for `mixin class` declarations. Also add support for
@ -280,7 +282,7 @@ initializedIdentifierList
; ;
functionSignature functionSignature
: type? identifierNotFUNCTION formalParameterPart : type? identifier formalParameterPart
; ;
functionBody functionBody
@ -337,7 +339,7 @@ normalFormalParameterNoMetadata
// NB: It is an anomaly that a functionFormalParameter cannot be FINAL. // NB: It is an anomaly that a functionFormalParameter cannot be FINAL.
functionFormalParameter functionFormalParameter
: COVARIANT? type? identifierNotFUNCTION formalParameterPart '?'? : COVARIANT? type? identifier formalParameterPart '?'?
; ;
simpleFormalParameter simpleFormalParameter
@ -997,18 +999,13 @@ assignableSelector
| '?' '[' expression ']' | '?' '[' expression ']'
; ;
identifierNotFUNCTION identifier
: IDENTIFIER : IDENTIFIER
| builtInIdentifier | builtInIdentifier
| otherIdentifier | otherIdentifier
| { asyncEtcPredicate(getCurrentToken().getType()) }? (AWAIT|YIELD) | { asyncEtcPredicate(getCurrentToken().getType()) }? (AWAIT|YIELD)
; ;
identifier
: identifierNotFUNCTION
| FUNCTION // Built-in identifier that can be used as a type.
;
qualifiedName qualifiedName
: typeIdentifier '.' identifierOrNew : typeIdentifier '.' identifierOrNew
| typeIdentifier '.' typeIdentifier '.' identifierOrNew | typeIdentifier '.' typeIdentifier '.' identifierOrNew