1
0
mirror of https://github.com/golang/go synced 2024-11-25 02:07:58 -07:00

remove leftover forward-decl syntax and example

(per feedback from Austin)

R=rsc
DELTA=7  (0 added, 2 deleted, 5 changed)
OCL=34158
CL=34161
This commit is contained in:
Robert Griesemer 2009-08-31 17:57:14 -07:00
parent aeaab597db
commit bdec330c85

View File

@ -1503,19 +1503,17 @@ to a new type. <font color=red>TODO: what exactly is a "new type"?</font>
<pre class="ebnf"> <pre class="ebnf">
TypeDecl = "type" ( TypeSpec | "(" [ TypeSpecList ] ")" ) . TypeDecl = "type" ( TypeSpec | "(" [ TypeSpecList ] ")" ) .
TypeSpecList = TypeSpec { ";" TypeSpec } [ ";" ] . TypeSpecList = TypeSpec { ";" TypeSpec } [ ";" ] .
TypeSpec = identifier ( Type | "struct" | "interface" ) . TypeSpec = identifier Type .
</pre> </pre>
<pre> <pre>
type IntArray [16] int type IntArray [16]int
type ( type (
Point struct { x, y float }; Point struct { x, y float };
Polar Point Polar Point
) )
type Comparable interface
type TreeNode struct { type TreeNode struct {
left, right *TreeNode; left, right *TreeNode;
value *Comparable; value *Comparable;