Add suport for inline classes in Dart.g
Change-Id: I63b829e107458268d91b39e7f0abb673dc20d0f7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304004 Commit-Queue: William Hesse <whesse@google.com> Auto-Submit: Erik Ernst <eernst@google.com> Reviewed-by: William Hesse <whesse@google.com>
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
|
||||
// CHANGES:
|
||||
//
|
||||
// v0.34 Add support for inline classes.
|
||||
//
|
||||
// v0.33 This commit does not change the derived language at all. It just
|
||||
// changes several rules to use the regexp-like grammar operators to simplify
|
||||
// onParts, recordLiteralNoConst, functionTypeTails, and functionType.
|
||||
@@ -244,6 +246,7 @@ libraryDefinition
|
||||
topLevelDefinition
|
||||
: classDeclaration
|
||||
| mixinDeclaration
|
||||
| inlineClassDeclaration
|
||||
| extensionDeclaration
|
||||
| enumType
|
||||
| typeAlias
|
||||
@@ -431,6 +434,16 @@ mixinMemberDeclaration
|
||||
: classMemberDeclaration
|
||||
;
|
||||
|
||||
inlineClassDeclaration
|
||||
: FINAL? INLINE CLASS typeWithParameters interfaces?
|
||||
LBRACE (metadata inlineMemberDeclaration)* RBRACE
|
||||
;
|
||||
|
||||
// TODO: We might want to make this more strict.
|
||||
inlineMemberDeclaration
|
||||
: classMemberDeclaration
|
||||
;
|
||||
|
||||
extensionDeclaration
|
||||
: EXTENSION identifier? typeParameters? ON type
|
||||
LBRACE (metadata extensionMemberDefinition)* RBRACE
|
||||
@@ -1613,6 +1626,7 @@ otherIdentifier
|
||||
: ASYNC
|
||||
| BASE
|
||||
| HIDE
|
||||
| INLINE
|
||||
| OF
|
||||
| ON
|
||||
| SEALED
|
||||
@@ -1898,6 +1912,10 @@ HIDE
|
||||
: 'hide'
|
||||
;
|
||||
|
||||
INLINE
|
||||
: 'inline'
|
||||
;
|
||||
|
||||
OF
|
||||
: 'of'
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user