Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
213702a3
Commit
213702a3
authored
Mar 11, 2008
by
Robert Griesemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- removed CompoundStat in favor of Block
SVN=112111
parent
8b212f67
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
20 deletions
+10
-20
go_lang.txt
doc/go_lang.txt
+10
-20
No files found.
doc/go_lang.txt
View file @
213702a3
...
...
@@ -210,11 +210,11 @@ productions are in CamelCase.
Common productions
----
IdentifierList = identifier { ',' identifier }.
ExpressionList = Expression { ',' Expression }.
IdentifierList = identifier { ',' identifier }
.
ExpressionList = Expression { ',' Expression }
.
QualifiedIdent = [ PackageName '.' ] identifier.
PackageName = identifier.
QualifiedIdent = [ PackageName '.' ] identifier
.
PackageName = identifier
.
Source code representation
...
...
@@ -713,7 +713,11 @@ Function Literals
Function literals represent anonymous functions.
FunctionLit = FunctionType Block .
Block = CompoundStat .
Block = '{' [ StatementList [ ';' ] ] '}' .
The scope of an identifier declared within a block extends
from the declaration of the identifier (that is, the position
immediately after the identifier) to the end of the block.
A function literal can be invoked
or assigned to a variable of the corresponding function pointer type.
...
...
@@ -1094,7 +1098,7 @@ Statements control execution.
[ LabelDecl ] ( StructuredStat | UnstructuredStat ) .
StructuredStat =
CompoundStat
| IfStat | SwitchStat | ForStat | RangeStat .
Block
| IfStat | SwitchStat | ForStat | RangeStat .
UnstructuredStat =
Declaration |
...
...
@@ -1135,20 +1139,6 @@ IncDec statements
Note that ++ and -- are not operators for expressions.
Compound statements
----
CompoundStat = '{' [ StatementList [ ";" ] ] '}' .
{
x := 1;
f(x);
}
The scope of an Identifier declared within a compound statement extends
from the declaration to the end of the compound statement.
Assignments
----
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment