mirror of
https://github.com/golang/go
synced 2024-11-26 11:08:38 -07:00
go/printer: comment is equal to comments[cindex-1], not comments[cindex]
Change-Id: I18ee1120c4c179d3c8fd02cc95d8e221a610da0a
This commit is contained in:
parent
7b867b9bb7
commit
f859283324
@ -45,9 +45,9 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type commentInfo struct {
|
type commentInfo struct {
|
||||||
cindex int // current comment index
|
cindex int // index of the next comment
|
||||||
comment *ast.CommentGroup // = printer.comments[cindex]; or nil
|
comment *ast.CommentGroup // = printer.comments[cindex-1]; or nil
|
||||||
commentOffset int // = printer.posFor(printer.comments[cindex].List[0].Pos()).Offset; or infinity
|
commentOffset int // = printer.posFor(printer.comments[cindex-1].List[0].Pos()).Offset; or infinity
|
||||||
commentNewline bool // true if the comment group contains newlines
|
commentNewline bool // true if the comment group contains newlines
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user