Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(203)

Unified Diff: docs/language/dartLangSpec.tex

Issue 2963533002: Improve wording of break/continue. (Closed)
Patch Set: a -> an Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: docs/language/dartLangSpec.tex
diff --git a/docs/language/dartLangSpec.tex b/docs/language/dartLangSpec.tex
index 64ebe465deb9687b5d3efb8efdf4ebf4949a2b09..50b6c778793ace5d9af1f1982b6cc1fee30d0437 100644
--- a/docs/language/dartLangSpec.tex
+++ b/docs/language/dartLangSpec.tex
@@ -6568,13 +6568,13 @@ The {\em break statement} consists of the reserved word \BREAK{} and an optional
\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$.
+then it is a compile-time error if $s_b$ is not enclosed in a labeled statement
+with the label $L$ within the innermost function in which $s_b$ occurs.
If $s_b$ is of the form \code{\BREAK{};},
-then let $s_E$ be the innermost \code{\AWAIT{} \FOR{}} (\ref{asynchronousFor-in}),
+then it is a compile-time error if $s_b$ is not enclosed in an
+\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.
+or \WHILE{} (\ref{while}) statement 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}).
@@ -6597,15 +6597,16 @@ The {\em continue statement} consists of the reserved word \CONTINUE{} and an op
\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 \code{\AWAIT{} \FOR{}} (\ref{asynchronousFor-in}),
+then it is a compile-time error if $s_c$ is not enclosed in either an
+\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$.
+statement labeled with $L$, or in a \SWITCH{} statement with a case clause
+labeled with $L$, within the innermost function in which $s_c$ occurs.
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.
+then it is a compile-time error if $s_c$ is not enclosed in an
+\code{\AWAIT{} \FOR{}} (\ref{asynchronousFor-in})
+\DO{} (\ref{do}), \FOR{} (\ref{for}), or \WHILE{} (\ref{while}) statement
+within the innermost function in which $s_c$ occurs.
Execution of a \CONTINUE{} statement \code{\CONTINUE{} $L$;} continues to the label $L$ (\ref{completion}).
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698