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

go/ast: remove unused code

Change-Id: Id3a88d8e80272c430be8cf8563ff9201f578e2f1
This commit is contained in:
qiulaidongfeng 2024-08-30 09:08:02 +08:00
parent 9e8ea567c8
commit 07ca14263f

View File

@ -35,15 +35,6 @@ func (cmap CommentMap) addComment(n Node, c *CommentGroup) {
cmap[n] = list
}
type byInterval []Node
func (a byInterval) Len() int { return len(a) }
func (a byInterval) Less(i, j int) bool {
pi, pj := a[i].Pos(), a[j].Pos()
return pi < pj || pi == pj && a[i].End() > a[j].End()
}
func (a byInterval) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
// nodeList returns the list of nodes of the AST n in source order.
func nodeList(n Node) []Node {
var list []Node