diff options
author | Robert Griesemer <gri@golang.org> | 2009-03-16 17:36:52 -0700 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2009-03-16 17:36:52 -0700 |
commit | 75afd61f65ad90ca38e464d15d20df871ade344e (patch) | |
tree | 1e329f44275429b7bb9cab7c0314285ba588eda9 | |
parent | 6621b3b9a62963770fe75e5b5a619d2a1bb4ef77 (diff) | |
download | golang-75afd61f65ad90ca38e464d15d20df871ade344e.tar.gz |
instead of unlabeled statements, have a single labeled statement
- no syntactic or semantic change
R=r
DELTA=45 (24 added, 18 deleted, 3 changed)
OCL=26349
CL=26368
-rw-r--r-- | doc/go_spec.html | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/doc/go_spec.html b/doc/go_spec.html index 315df8f19..18c4b84a2 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -2908,16 +2908,13 @@ Statements control execution. </p> <pre class="grammar"> -Statement = { Label ":" } UnlabeledStatement . -Label = identifier . -UnlabeledStatement = - Declaration | EmptyStat | +Statement = + Declaration | EmptyStat | LabeledStat | SimpleStat | GoStat | ReturnStat | BreakStat | ContinueStat | GotoStat | FallthroughStat | Block | IfStat | SwitchStat | SelectStat | ForStat | DeferStat . -SimpleStat = - ExpressionStat | IncDecStat | Assignment | SimpleVarDecl . +SimpleStat = ExpressionStat | IncDecStat | Assignment | SimpleVarDecl . StatementList = Statement { Separator Statement } . Separator = [ ";" ] @@ -2936,14 +2933,6 @@ which may be omitted only if the previous statement: (including "switch" and "select" statements). </ul> -<p> -A labeled statement may be the target of a <code>goto</code>, -<code>break</code> or <code>continue</code> statement. -</p> - -<pre> -Error: log.Fatal("error encountered") -</pre> <h3>Empty statements</h3> @@ -2961,6 +2950,23 @@ adding an empty statement. </p> +<h3>Labeled statements</h3> + +<p> +A labeled statement may be the target of a <code>goto</code>, +<code>break</code> or <code>continue</code> statement. +</p> + +<pre class="grammar"> +LabeledStat = Label ":" Statement . +Label = identifier . +</pre> + +<pre> +Error: log.Fatal("error encountered") +</pre> + + <h3>Expression statements</h3> <p> |