Lines Matching full:comments
16 // of the comments from the code. This is useful for when you want to analyze
17 // text written in comments (like copyright notices) but not in the code
35 // Parse parses the input data and returns the comments.
36 func Parse(contents []byte, lang language.Language) Comments {
53 return i.comments
64 // Comments allows us to treat a slice of comments as a unit.
65 type Comments []*Comment type
67 // ChunkIterator returns a read-only channel and generates the comments in a
69 func (c Comments) ChunkIterator() <-chan Comments {
70 ch := make(chan Comments)
80 var chunk Comments
111 func (c Comments) StartLine() int {
118 // String creates a string out of the text of the comments. Comment begin and
120 func (c Comments) String() string {
140 comments Comments // Comments in the source file. member
143 // lex is called to obtain the comments.
216 i.comments = append(i.comments, &Comment{
235 // Allows nested comments.
248 i.comments = append(i.comments, &Comment{
265 i.comments = append(i.comments, &Comment{
273 i.readRune() // Ignore non-comments.