1
0
mirror of https://github.com/golang/go synced 2024-09-30 22:38:33 -06:00

go/ast/astutil: revert support for Go 1.8 type aliases

This reverts commit 50193ec1c5.

Reason for revert: aliases will not be part of Go 1.8

Change-Id: Idb3b74243eeb8dbeb2a2f4bd69a248c1dafa5348
Reviewed-on: https://go-review.googlesource.com/32835
Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
Alan Donovan 2016-11-04 21:02:15 +00:00
parent d268a2ba76
commit e2e4d7aa62

View File

@ -200,11 +200,6 @@ func childrenOf(n ast.Node) []ast.Node {
// Then add fake Nodes for bare tokens.
switch n := n.(type) {
case *ast.AliasSpec:
// TODO(adonovan): AliasSpec.{Doc,Comment}?
// Guess position of "=>" assuming well-formattedness.
children = append(children, tok(n.Orig.Pos()-token.Pos(len("=> ")), len("=>")))
case *ast.ArrayType:
children = append(children,
tok(n.Lbrack, len("[")),
@ -628,8 +623,7 @@ func NodeDescription(n ast.Node) string {
return fmt.Sprintf("unary %s operation", n.Op)
case *ast.ValueSpec:
return "value specification"
case *ast.AliasSpec:
return "alias specification"
}
panic(fmt.Sprintf("unexpected node type: %T", n))
}