mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +00:00
Add enhanced enums support to Dart.g
Change-Id: Ie9b93497491dd44576f6e0e8c58499f98e7a74df Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216021 Commit-Queue: Erik Ernst <eernst@google.com> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
This commit is contained in:
parent
393b97a69e
commit
1c13f49159
|
@ -4,7 +4,10 @@
|
|||
|
||||
// CHANGES:
|
||||
//
|
||||
// v0.17 Correct `uri` to allow multi-line strings (raw and non-raw).
|
||||
// v0.18 Add support for enhanced `enum` declarations.
|
||||
//
|
||||
// v0.17 (58d917e7573c359580ade43845004dbbc62220d5) Correct `uri` to allow
|
||||
// multi-line strings (raw and non-raw).
|
||||
//
|
||||
// v0.16 (284695f1937c262523a9a11b9084213f889c83e0) Correct instance variable
|
||||
// declaration syntax such that `covariant late final` is allowed.
|
||||
|
@ -484,11 +487,15 @@ mixinApplication
|
|||
;
|
||||
|
||||
enumType
|
||||
: ENUM typeIdentifier LBRACE enumEntry (',' enumEntry)* (',')? RBRACE
|
||||
: ENUM typeIdentifier typeParameters? mixins? interfaces? LBRACE
|
||||
enumEntry (',' enumEntry)* (',')?
|
||||
(';' (metadata classMemberDefinition)*)?
|
||||
RBRACE
|
||||
;
|
||||
|
||||
enumEntry
|
||||
: metadata identifier
|
||||
: metadata identifier argumentPart?
|
||||
| metadata identifier typeArguments? '.' identifier arguments
|
||||
;
|
||||
|
||||
typeParameter
|
||||
|
|
Loading…
Reference in a new issue