Skip to content

Commit 60bbf6e

Browse files
authored
Introduce grammar updates (#4109)
1 parent 2d47285 commit 60bbf6e

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

working/augmentation-libraries/feature-specification.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,13 +1127,13 @@ topLevelDeclaration ::= classDeclaration
11271127
| extensionDeclaration
11281128
| enumType
11291129
| typeAlias
1130-
| 'external' functionSignature ';'
1131-
| 'external' getterSignature ';'
1132-
| 'external' setterSignature ';'
1133-
| 'external' finalVarOrType identifierList ';'
1134-
| 'augment'? functionSignature functionBody
1135-
| 'augment'? getterSignature functionBody
1136-
| 'augment'? setterSignature functionBody
1130+
| 'augment'? 'external' functionSignature ';'
1131+
| 'augment'? 'external' getterSignature ';'
1132+
| 'augment'? 'external' setterSignature ';'
1133+
| 'augment'? 'external' finalVarOrType identifierList ';'
1134+
| 'augment'? functionSignature (functionBody | ';')
1135+
| 'augment'? getterSignature (functionBody | ';')
1136+
| 'augment'? setterSignature (functionBody | ';')
11371137
| 'augment'? ('final' | 'const') type? initializedIdentifierList ';'
11381138
| 'augment'? 'late' 'final' type? initializedIdentifierList ';'
11391139
| 'augment'? 'late'? varOrType initializedIdentifierList ';'
@@ -1172,7 +1172,7 @@ memberedDeclarationBody ::= '{' memberDeclarations '}'
11721172
11731173
memberDeclarations ::= (metadata memberDeclaration)*
11741174
1175-
memberDeclaration ::= declaration ';'
1175+
memberDeclaration ::= 'augment'? declaration ';'
11761176
| 'augment'? methodSignature functionBody
11771177
11781178
enumEntry ::= metadata 'augment'? identifier argumentPart?
@@ -1188,17 +1188,17 @@ declaration ::= 'external'? factoryConstructorSignature
11881188
| 'external' ('static'? finalVarOrType | 'covariant' varOrType) identifierList
11891189
| 'external'? operatorSignature
11901190
| 'abstract' (finalVarOrType | 'covariant' varOrType) identifierList
1191-
| 'augment'? 'static' 'const' type? initializedIdentifierList
1192-
| 'augment'? 'static' 'final' type? initializedIdentifierList
1193-
| 'augment'? 'static' 'late' 'final' type? initializedIdentifierList
1194-
| 'augment'? 'static' 'late'? varOrType initializedIdentifierList
1195-
| 'augment'? 'covariant' 'late' 'final' type? identifierList
1196-
| 'augment'? 'covariant' 'late'? varOrType initializedIdentifierList
1197-
| 'augment'? 'late'? 'final' type? initializedIdentifierList
1198-
| 'augment'? 'late'? varOrType initializedIdentifierList
1199-
| 'augment'? redirectingFactoryConstructorSignature
1200-
| 'augment'? constantConstructorSignature (redirection | initializers)?
1201-
| 'augment'? constructorSignature (redirection | initializers)?
1191+
| 'static' 'const' type? initializedIdentifierList
1192+
| 'static' 'final' type? initializedIdentifierList
1193+
| 'static' 'late' 'final' type? initializedIdentifierList
1194+
| 'static' 'late'? varOrType initializedIdentifierList
1195+
| 'covariant' 'late' 'final' type? identifierList
1196+
| 'covariant' 'late'? varOrType initializedIdentifierList
1197+
| 'late'? 'final' type? initializedIdentifierList
1198+
| 'late'? varOrType initializedIdentifierList
1199+
| redirectingFactoryConstructorSignature
1200+
| constantConstructorSignature (redirection | initializers)?
1201+
| constructorSignature (redirection | initializers)?
12021202
```
12031203

12041204
**TODO: Define the grammar for the various `augmented` expressions.**

0 commit comments

Comments
 (0)