Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions specification/dartLangSpec.tex
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@
% version of the language which will actually be specified by the next stable
% release of this document.
%
% Oct 2025
% - Simplify the member declaration grammar by using a single `memberDeclaration`
% to derive all kinds of member declarations (for a class, a mixin, etc),
% rather than having a dedicated `classMemberDeclaration`.
%
% Sep 2025
% - Remove the rules about DartDoc comments. This topic is now handled by each
% of the tools that process those comments in any way.
Expand Down Expand Up @@ -2831,12 +2836,12 @@ \section{Classes}
<classDeclaration> ::=
\ABSTRACT? \CLASS{} <typeIdentifier> <typeParameters>?
\gnewline{} <superclass>? <interfaces>?
\gnewline{} `{' (<metadata> <classMemberDeclaration>)* `}'
\gnewline{} `{' (<metadata> <memberDeclaration>)* `}'
\alt \ABSTRACT? \CLASS{} <mixinApplicationClass>

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

<classMemberDeclaration> ::= <declaration> `;'
<memberDeclaration> ::= <declaration> `;'
\alt <methodSignature> <functionBody>

<methodSignature> ::= <constructorSignature> <initializers>?
Expand Down Expand Up @@ -2879,6 +2884,8 @@ \section{Classes}

\LMHash{}%
A class has constructors, instance members and static members.
The members are declared by
\IndexCustom{member declarations}{member declaration}.
The \IndexCustom{instance members}{members!instance} of a class
are its instance methods, getters, setters and instance variables.
The \IndexCustom{static members}{members!static} of a class
Expand Down Expand Up @@ -5963,7 +5970,7 @@ \subsection{Mixin Declaration}

\LMHash{}%
A mixin defines zero or more
\IndexCustom{mixin member declarations}{mixin!member declaration},
\IndexCustom{member declarations}{member declaration},
zero or more
\IndexCustom{required superinterfaces}{mixin!required superinterface},
one
Expand Down Expand Up @@ -5994,7 +6001,7 @@ \subsection{Mixin Declaration}
\begin{grammar}
<mixinDeclaration> ::= \MIXIN{} <typeIdentifier> <typeParameters>?
\gnewline{} (\ON{} <typeNotVoidList>)? <interfaces>?
\gnewline{} `\{' (<metadata> <classMemberDeclaration>)* `\}'
\gnewline{} `\{' (<metadata> <memberDeclaration>)* `\}'
\end{grammar}

\LMHash{}%
Expand Down Expand Up @@ -6081,7 +6088,7 @@ \subsection{Mixin Declaration}
with the \NoIndex{required superinterface}s $T_1$, \ldots, $T_n$,
the \NoIndex{combined superinterface} $M_S$,
\NoIndex{implemented interface}s $I_1$, \ldots, $I_k$
and the instance members declared in $M$ as \Index{mixin member declarations}.
and the instance members declared in $M$ as \Index{member declarations}.


\subsection{Mixin Application}
Expand All @@ -6095,7 +6102,7 @@ \subsection{Mixin Application}
$M$ be a mixin with \NoIndex{required superinterface}s $T_1$, \ldots, $T_n$,
\NoIndex{combined superinterface} $M_S$,
\NoIndex{implemented interfaces} $I_1$, \ldots, $I_k$ and
\metavar{members} as \NoIndex{mixin member declarations},
\metavar{members} as \NoIndex{member declarations},
and let $N$ be a name.

\LMHash{}%
Expand Down Expand Up @@ -6224,7 +6231,7 @@ \section{Extensions}
\begin{grammar}
<extensionDeclaration> ::= \gnewline{}
\EXTENSION{} <typeIdentifierNotType>? <typeParameters>? \ON{} <type>
\gnewline{} `\{' (<metadata> <classMemberDeclaration>)* `\}'
\gnewline{} `\{' (<metadata> <memberDeclaration>)* `\}'
\end{grammar}

\LMHash{}%
Expand Down