diff options
author | Robert Griesemer <gri@golang.org> | 2016-11-04 16:27:31 -0700 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2016-11-05 00:46:39 +0000 |
commit | 429edcff1049899cef4e3c5cb4b473e13a31d85c (patch) | |
tree | eff2794211af0f7ad00182030f3d5edf8e9acfbf /src/cmd/compile/internal/syntax/nodes.go | |
parent | a1a688fa0012f7ce3a37e9ac0070461fe8e3f28e (diff) | |
download | go-429edcff1049899cef4e3c5cb4b473e13a31d85c.tar.gz go-429edcff1049899cef4e3c5cb4b473e13a31d85c.zip |
Revert "cmd/compile/internal/syntax: support for alias declarations"
This reverts commit 32db3f2756324616b7c856ac9501deccc2491239.
Reason: Decision to back out current alias implementation.
For #16339.
Change-Id: Ib05e3d96041d8347e49cae292f66bec791a1fdc8
Reviewed-on: https://go-review.googlesource.com/32825
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 | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/cmd/compile/internal/syntax/nodes.go b/src/cmd/compile/internal/syntax/nodes.go index b88d16e113..bb56df33b1 100644 --- a/src/cmd/compile/internal/syntax/nodes.go +++ b/src/cmd/compile/internal/syntax/nodes.go @@ -25,21 +25,14 @@ func (n *node) Line() uint32 { return n.line } -// TODO(gri) clean up init/initFrom once we have a good file pos story func (n *node) init(p *parser) { n.pos = uint32(p.pos) n.line = uint32(p.line) } -func (n *node) initFrom(a *node) { - n.pos = a.pos - n.line = a.line -} - // ---------------------------------------------------------------------------- // Files -// package PkgName; DeclList[0], DeclList[1], ... type File struct { PkgName *Name DeclList []Decl @@ -56,8 +49,6 @@ type ( aDecl() } - // Path - // LocalPkgName Path ImportDecl struct { LocalPkgName *Name // including "."; nil means no rename present Path *BasicLit @@ -65,18 +56,6 @@ type ( decl } - // Name => Orig - AliasDecl struct { - Tok token // Const, Type, Var, or Func - Name *Name - Orig Expr - Group *Group // nil means not part of a group - decl - } - - // NameList - // NameList = Values - // NameList Type = Values ConstDecl struct { NameList []*Name Type Expr // nil means no type @@ -85,7 +64,6 @@ type ( decl } - // Name Type TypeDecl struct { Name *Name Type Expr @@ -94,9 +72,6 @@ type ( decl } - // NameList Type - // NameList Type = Values - // NameList = Values VarDecl struct { NameList []*Name Type Expr // nil means no type @@ -105,10 +80,6 @@ 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 @@ -448,8 +419,6 @@ func (simpleStmt) aSimpleStmt() {} // ---------------------------------------------------------------------------- // Comments -// TODO(gri) Consider renaming to CommentPos, CommentPlacement, etc. -// Kind = Above doesn't make much sense. type CommentKind uint const ( |