Fix wording for break and continue.

Fixes #30011
BUG= http://dartbug.com/30011
R=eernst@google.com, paulberry@google.com

Review-Url: https://codereview.chromium.org/2961603002 .
This commit is contained in:
Lasse Reichstein Holst Nielsen 2017-06-27 10:33:21 +02:00
parent e7ba4959ca
commit 82a97d8b46

View file

@ -6566,7 +6566,15 @@ The {\em break statement} consists of the reserved word \BREAK{} and an optional
\end{grammar}
\LMHash{}
Let $s_b$ be a \BREAK{} statement. If $s_b$ is of the form \code{\BREAK{} $L$;}, then let $s_E$ be the innermost labeled statement with label $L$ enclosing $s_b$. If $s_b$ is of the form \code{\BREAK{};}, then let $s_E$ be the innermost \DO{} (\ref{do}), \FOR{} (\ref{for}), \SWITCH{} (\ref{switch}) or \WHILE{} (\ref{while}) statement enclosing $s_b$. It is a compile-time error if no such statement $s_E$ exists within the innermost function in which $s_b$ occurs.
Let $s_b$ be a \BREAK{} statement.
If $s_b$ is of the form \code{\BREAK{} $L$;},
then let $s_E$ be the innermost labeled statement with label $L$ enclosing $s_b$.
If $s_b$ is of the form \code{\BREAK{};},
then let $s_E$ be the innermost \code{\AWAIT{} \FOR{}} (\ref{asynchronousFor-in}),
\DO{} (\ref{do}), \FOR{} (\ref{for}), \SWITCH{} (\ref{switch})
or \WHILE{} (\ref{while}) statement enclosing $s_b$.
It is a compile-time error if no such statement $s_E$ exists within
the innermost function in which $s_b$ occurs.
\LMHash{}
Execution of a \BREAK{} statement \code{\BREAK{} $L$;} breaks to the label $L$ (\ref{completion}).
@ -6587,7 +6595,17 @@ The {\em continue statement} consists of the reserved word \CONTINUE{} and an op
\end{grammar}
\LMHash{}
Let $s_c$ be a \CONTINUE{} statement. If $s_c$ is of the form \code{\CONTINUE{} $L$;}, then let $s_E$ be the innermost labeled \DO{} (\ref{do}), \FOR{} (\ref{for}) or \WHILE{} (\ref{while}) statement or case clause with label $L$ enclosing $s_c$. If $s_c$ is of the form \code{\CONTINUE{};} then let $s_E$ be the innermost \DO{} (\ref{do}), \FOR{} (\ref{for}) or \WHILE{} (\ref{while}) statement enclosing $s_c$. It is a compile-time error if no such statement or case clause $s_E$ exists within the innermost function in which $s_c$ occurs.
Let $s_c$ be a \CONTINUE{} statement.
If $s_c$ is of the form \code{\CONTINUE{} $L$;},
then let $s_E$ be the innermost labeled \code{\AWAIT{} \FOR{}} (\ref{asynchronousFor-in}),
\DO{} (\ref{do}), \FOR{} (\ref{for}), or \WHILE{} (\ref{while})
statement or \SWITCH{} statement with a labeled case clause,
which is labeled with $L$ and encloses $s_c$.
If $s_c$ is of the form \code{\CONTINUE{};}
then let $s_E$ be the innermost \code{\AWAIT{} \FOR{}} (\ref{asynchronousFor-in})
\DO{} (\ref{do}), \FOR{} (\ref{for}), or \WHILE{} (\ref{while})
statement enclosing $s_c$.
It is a compile-time error if no such statement or case clause $s_E$ exists within the innermost function in which $s_c$ occurs.
Execution of a \CONTINUE{} statement \code{\CONTINUE{} $L$;} continues to the label $L$ (\ref{completion}).