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
9119f55e
Commit
9119f55e
authored
May 15, 2008
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add a couple of TODOs
fixed grammar for "Program" SVN=118923
parent
aa533738
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
go_lang.txt
doc/go_lang.txt
+7
-2
No files found.
doc/go_lang.txt
View file @
9119f55e
...
...
@@ -942,7 +942,7 @@ Incomplete types can be used together (and only) with pointer types.
TypeSpecList = TypeSpec { ";" TypeSpec }.
type List // foward declaration
type List // fo
r
ward declaration
type IntArray [16] int
type (
Point struct { x, y float };
...
...
@@ -993,6 +993,7 @@ Also, in some contexts such as if or for statements,
this construct can be used to
declare local temporary variables.
TODO: var a, b = 1, "x"; is permitted by grammar but not by current compiler
Function and method declarations
----
...
...
@@ -1290,6 +1291,9 @@ These conversions are called ``compound conversions''.
convert(map[string]int, "1", 1, "2", 2)
convert(struct{ x int; y float }, 3, sqrt(2.0))
TODO: are interface/struct and 'any' conversions legal? they're not
equivalent, just compatible. convert([]any, 1, "hi", nil);
There is syntactic help to make conversion expressions simpler to write.
If the result type is of ConversionType (a type name, array type,
...
...
@@ -1876,7 +1880,7 @@ Program
A program is package clause, optionally followed by import declarations,
followed by a series of declarations.
Program = PackageClause { ImportDecl
} { Declaration
} .
Program = PackageClause { ImportDecl
[ ";" ] } { Declaration [ ";" ]
} .
TODO
...
...
@@ -1885,3 +1889,4 @@ TODO
- TODO: type switch?
- TODO: words about slices
- TODO: I (gri) would like to say that sizeof(int) == sizeof(pointer), always.
- TODO: really lock down semicolons
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