mirror of
https://github.com/golang/go
synced 2024-11-22 15:34:53 -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 {
|
||||
cindex int // current comment index
|
||||
comment *ast.CommentGroup // = printer.comments[cindex]; or nil
|
||||
commentOffset int // = printer.posFor(printer.comments[cindex].List[0].Pos()).Offset; or infinity
|
||||
cindex int // index of the next comment
|
||||
comment *ast.CommentGroup // = printer.comments[cindex-1]; or nil
|
||||
commentOffset int // = printer.posFor(printer.comments[cindex-1].List[0].Pos()).Offset; or infinity
|
||||
commentNewline bool // true if the comment group contains newlines
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user