diff options
author | Robert Griesemer <gri@golang.org> | 2016-11-04 16:37:24 -0700 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2016-11-05 00:47:04 +0000 |
commit | 65269e7066c0e97532bf0fd082e95cf8444ee378 (patch) | |
tree | 03e395f3b910b2f455da4484e5dcd14410bb1924 /src/cmd/compile/internal/syntax/nodes.go | |
parent | 429edcff1049899cef4e3c5cb4b473e13a31d85c (diff) | |
download | go-65269e7066c0e97532bf0fd082e95cf8444ee378.tar.gz go-65269e7066c0e97532bf0fd082e95cf8444ee378.zip |
cmd/go/internal/syntax: reintroduce reverted comments
These comments were originally introduced together with the changes
for alias declarations, and then reverted when we backed out alias
support.
Reintroduce them.
Change-Id: I3ef2c4f4672d6af8a900f5d73df273edf28d1a14
Reviewed-on: https://go-review.googlesource.com/32826
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/cmd/compile/internal/syntax/nodes.go')
-rw-r--r-- | src/cmd/compile/internal/syntax/nodes.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/syntax/nodes.go b/src/cmd/compile/internal/syntax/nodes.go index bb56df33b1..87e39e00a3 100644 --- a/src/cmd/compile/internal/syntax/nodes.go +++ b/src/cmd/compile/internal/syntax/nodes.go @@ -33,6 +33,7 @@ func (n *node) init(p *parser) { // ---------------------------------------------------------------------------- // Files +// package PkgName; DeclList[0], DeclList[1], ... type File struct { PkgName *Name DeclList []Decl @@ -49,6 +50,8 @@ type ( aDecl() } + // Path + // LocalPkgName Path ImportDecl struct { LocalPkgName *Name // including "."; nil means no rename present Path *BasicLit @@ -56,6 +59,9 @@ type ( decl } + // NameList + // NameList = Values + // NameList Type = Values ConstDecl struct { NameList []*Name Type Expr // nil means no type @@ -64,6 +70,7 @@ type ( decl } + // Name Type TypeDecl struct { Name *Name Type Expr @@ -72,6 +79,9 @@ type ( decl } + // NameList Type + // NameList Type = Values + // NameList = Values VarDecl struct { NameList []*Name Type Expr // nil means no type @@ -80,6 +90,10 @@ type ( decl } + // func Name Type { Body } + // func Name Type + // func Receiver Name Type { Body } + // func Receiver Name Type FuncDecl struct { Attr map[string]bool // go:attr map Recv *Field // nil means regular function @@ -419,6 +433,8 @@ func (simpleStmt) aSimpleStmt() {} // ---------------------------------------------------------------------------- // Comments +// TODO(gri) Consider renaming to CommentPos, CommentPlacement, etc. +// Kind = Above doesn't make much sense. type CommentKind uint const ( |