diff --git a/tools/spec_parser/Dart.g b/tools/spec_parser/Dart.g index b5ec6e0af3e..6951a0df445 100644 --- a/tools/spec_parser/Dart.g +++ b/tools/spec_parser/Dart.g @@ -4,6 +4,9 @@ // CHANGES: // +// v0.58 Gather some occurrences of `AUGMENT` in a single location. Rename +// `topLevelDefinition` to `topLevelDeclaration` (as in the specification). +// // v0.57 Introduce augmentation related updates. // // v0.56 Update constructor declaration syntax to allow `constructorHead`. @@ -292,11 +295,11 @@ libraryDeclaration libraryName? importOrExport* partDirective* - (metadata topLevelDefinition)* + (metadata topLevelDeclaration)* EOF ; -topLevelDefinition +topLevelDeclaration : classDeclaration | mixinDeclaration | extensionTypeDeclaration @@ -452,7 +455,7 @@ memberedDeclarationBody ; memberDeclarations - : (metadata memberDeclaration)* + : (metadata AUGMENT? memberDeclaration)* ; classModifiers @@ -478,8 +481,8 @@ interfaces ; memberDeclaration - : AUGMENT? methodSignature functionBody - | AUGMENT? declaration ';' + : methodSignature functionBody + | declaration ';' ; mixinApplicationClass @@ -1558,7 +1561,7 @@ partDeclaration : FEFF? partHeader importOrExport* partDirective* - (metadata topLevelDefinition)* + (metadata topLevelDeclaration)* EOF ; diff --git a/tools/spec_parser/dart_spec_parser/Dart.g4 b/tools/spec_parser/dart_spec_parser/Dart.g4 index b47e13c5644..bdea3a1a7f4 100644 --- a/tools/spec_parser/dart_spec_parser/Dart.g4 +++ b/tools/spec_parser/dart_spec_parser/Dart.g4 @@ -4,6 +4,9 @@ // CHANGES: // +// v0.59 Gather some occurrences of `AUGMENT` in a single location. Rename +// `topLevelDefinition` to `topLevelDeclaration` (as in the specification). +// // v0.58 Introduce augmentation related updates. // // v0.57 Update constructor declaration syntax to allow `constructorHead`. @@ -302,11 +305,11 @@ libraryDeclaration libraryName? importOrExport* partDirective* - (metadata topLevelDefinition)* + (metadata topLevelDeclaration)* EOF ; -topLevelDefinition +topLevelDeclaration : classDeclaration | mixinDeclaration | extensionTypeDeclaration @@ -462,7 +465,7 @@ memberedDeclarationBody ; memberDeclarations - : (metadata memberDeclaration)* + : (metadata AUGMENT? memberDeclaration)* ; classModifiers @@ -488,8 +491,8 @@ interfaces ; memberDeclaration - : AUGMENT? methodSignature functionBody - | AUGMENT? declaration ';' + : methodSignature functionBody + | declaration ';' ; mixinApplicationClass @@ -1572,7 +1575,7 @@ partDeclaration : FEFF? partHeader importOrExport* partDirective* - (metadata topLevelDefinition)* + (metadata topLevelDeclaration)* EOF ;