Skip to content

Commit

Permalink
Introduce <memberedDeclarationBody> and use it
Browse files Browse the repository at this point in the history
  • Loading branch information
eernstg committed Oct 11, 2024
1 parent 4ba6e14 commit 5cd1a44
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions specification/dartLangSpec.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2888,14 +2888,18 @@ \section{Classes}
<classDeclaration> ::=
\ABSTRACT? \CLASS{} <typeIdentifier> <typeParameters>?
\gnewline{} <superclass>? <interfaces>?
\gnewline{} `{' (<metadata> <classMemberDeclaration>)* `}'
\gnewline{} <memberedDeclarationBody>
\alt \ABSTRACT? \CLASS{} <mixinApplicationClass>

<typeNotVoidList> ::= <typeNotVoid> (`,' <typeNotVoid>)*

<classMemberDeclaration> ::= <declaration> `;'
<memberDeclarationNoMetadata> ::= <declaration> `;'
\alt <methodHeader> <functionBody>

<memberDeclaration> ::= <metadata> <memberDeclarationNoMetadata>

<memberedDeclarationBody> ::= `{' <memberDeclaration>* `}'

<methodHeader> ::= <constructorHeader> <initializers>?
\alt <factoryConstructorHeader>
\alt \STATIC? <functionHeader>
Expand Down Expand Up @@ -6051,7 +6055,7 @@ \subsection{Mixin Declaration}
\begin{grammar}
<mixinDeclaration> ::= \MIXIN{} <typeIdentifier> <typeParameters>?
\gnewline{} (\ON{} <typeNotVoidList>)? <interfaces>?
\gnewline{} `\{' (<metadata> <classMemberDeclaration>)* `\}'
\gnewline{} <memberedDeclarationBody>
\end{grammar}

%% TODO(eernst): Change this paragraph if we allow factory constructors.
Expand Down Expand Up @@ -6306,7 +6310,7 @@ \section{Extensions}
\begin{grammar}
<extensionDeclaration> ::= \gnewline{}
\EXTENSION{} <typeIdentifierNotType>? <typeParameters>? \ON{} <type>
\gnewline{} `\{' (<metadata> <classMemberDeclaration>)* `\}'
\gnewline{} <memberedDeclarationBody>
\end{grammar}

\LMHash{}%
Expand Down Expand Up @@ -22154,8 +22158,8 @@ \subsection{Static Types}

<optionalPositionalParameterTypes> ::= `[' <normalParameterTypes> `,'? `]'

<namedParameterTypes> ::=
`\{' <namedParameterType> (`,' <namedParameterType>)* `,'? `\}'
<namedParameterTypes> ::= \gnewline{}
`{' <namedParameterType> (`,' <namedParameterType>)* `,'? `}'

<namedParameterType> ::=
<metadata> \REQUIRED? <typedIdentifier>
Expand Down

0 comments on commit 5cd1a44

Please sign in to comment.