<pre class="grammar">
Statement =
- Declaration | EmptyStat | LabeledStat |
- SimpleStat | GoStat | ReturnStat | BreakStat | ContinueStat | GotoStat |
- FallthroughStat | Block | IfStat | SwitchStat | SelectStat | ForStat |
- DeferStat .
+ Declaration | EmptyStmt | LabeledStmt |
+ SimpleStmt | GoStmt | ReturnStmt | BreakStmt | ContinueStmt | GotoStmt |
+ FallthroughStmt | Block | IfStmt | SwitchStmt | SelectStmt | ForStmt |
+ DeferStmt .
-SimpleStat = ExpressionStat | IncDecStat | Assignment | SimpleVarDecl .
+SimpleStmt = ExpressionStmt | IncDecStmt | Assignment | SimpleVarDecl .
StatementList = Statement { Separator Statement } .
Separator = [ ";" ]
</p>
<pre class="grammar">
-EmptyStat = .
+EmptyStmt = .
</pre>
<p>
</p>
<pre class="grammar">
-LabeledStat = Label ":" Statement .
+LabeledStmt = Label ":" Statement .
Label = identifier .
</pre>
<pre class="grammar">
-ExpressionStat = Expression .
+ExpressionStmt = Expression .
</pre>
<pre>
</p>
<pre class="grammar">
-IncDecStat = Expression ( "++" | "--" ) .
+IncDecStmt = Expression ( "++" | "--" ) .
</pre>
<p>
</p>
<pre class="grammar">
-IfStat = "if" [ [ SimpleStat ] ";" ] [ Expression ] Block [ "else" Statement ] .
+IfStmt = "if" [ [ SimpleStmt ] ";" ] [ Expression ] Block [ "else" Statement ] .
</pre>
<pre>
</p>
<pre class="grammar">
-SwitchStat = ExprSwitchStat | TypeSwitchStat .
+SwitchStmt = ExprSwitchStmt | TypeSwitchStmt .
</pre>
<p>
</p>
<pre class="grammar">
-ExprSwitchStat = "switch" [ [ SimpleStat ] ";" ] [ Expression ] "{" { ExprCaseClause } "}" .
+ExprSwitchStmt = "switch" [ [ SimpleStmt ] ";" ] [ Expression ] "{" { ExprCaseClause } "}" .
ExprCaseClause = ExprSwitchCase ":" [ StatementList ] .
ExprSwitchCase = "case" ExpressionList | "default" .
</pre>
</p>
<pre class="grammar">
-TypeSwitchStat = "switch" [ [ SimpleStat ] ";" ] TypeSwitchGuard "{" { TypeCaseClause } "}" .
+TypeSwitchStmt = "switch" [ [ SimpleStmt ] ";" ] TypeSwitchGuard "{" { TypeCaseClause } "}" .
TypeSwitchGuard = identifier ":=" Expression "." "(" "type" ")" .
TypeCaseClause = TypeSwitchCase ":" [ StatementList ] .
TypeSwitchCase = "case" ( type | "nil" ) | "default" .
</p>
<pre class="grammar">
-ForStat = "for" [ Condition | ForClause | RangeClause ] Block .
+ForStmt = "for" [ Condition | ForClause | RangeClause ] Block .
Condition = Expression .
</pre>
</p>
<pre class="grammar">
-ForClause = [ InitStat ] ";" [ Condition ] ";" [ PostStat ] .
-InitStat = SimpleStat .
-PostStat = SimpleStat .
+ForClause = [ InitStmt ] ";" [ Condition ] ";" [ PostStmt ] .
+InitStmt = SimpleStmt .
+PostStmt = SimpleStmt .
</pre>
<pre>
</p>
<pre class="grammar">
-GoStat = "go" Expression .
+GoStmt = "go" Expression .
</pre>
<p>
</p>
<pre class="grammar">
-SelectStat = "select" "{" { CommClause } "}" .
+SelectStmt = "select" "{" { CommClause } "}" .
CommClause = CommCase ":" StatementList .
CommCase = "case" ( SendExpr | RecvExpr) | "default" .
SendExpr = Expression "<-" Expression .
</p>
<pre class="grammar">
-ReturnStat = "return" [ ExpressionList ] .
+ReturnStmt = "return" [ ExpressionList ] .
</pre>
<pre>
</p>
<pre class="grammar">
-BreakStat = "break" [ Label ].
+BreakStmt = "break" [ Label ].
</pre>
<p>
</p>
<pre class="grammar">
-ContinueStat = "continue" [ Label ].
+ContinueStmt = "continue" [ Label ].
</pre>
<p>
</p>
<pre class="grammar">
-GotoStat = "goto" Label .
+GotoStmt = "goto" Label .
</pre>
<pre>
</p>
<pre class="grammar">
-FallthroughStat = "fallthrough" .
+FallthroughStmt = "fallthrough" .
</pre>
</p>
<pre class="grammar">
-DeferStat = "defer" Expression .
+DeferStmt = "defer" Expression .
</pre>
<p>