]> Cypherpunks repositories - gostls13.git/commitdiff
go/ast: remove unused code
authorqiulaidongfeng <2645477756@qq.com>
Fri, 30 Aug 2024 01:13:44 +0000 (01:13 +0000)
committerRobert Griesemer <gri@google.com>
Tue, 3 Sep 2024 16:32:29 +0000 (16:32 +0000)
Change-Id: I57a03961dc97d20224498a67687a8c8ecfbbb627
GitHub-Last-Rev: 07ca14263feb7476c7163cc4172b8d3b324d74e9
GitHub-Pull-Request: golang/go#69157
Reviewed-on: https://go-review.googlesource.com/c/go/+/609758
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>

src/go/ast/commentmap.go

index b62fe489e4ee3f7da390f1417ce8a28fd10300a6..b72b5e2b208913c5fabd57e5318184732c1c920b 100644 (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