Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for consumeCommentGroup (0.12 sec)

  1. src/go/printer/testdata/parser.go

    			comment, endline = p.consumeCommentGroup()
    			if p.file.Line(p.pos) != endline {
    				// The next token is on a different line, thus
    				// the last comment group is a line comment.
    				p.lineComment = comment
    			}
    		}
    
    		// consume successor comments, if any
    		endline = -1
    		for p.tok == token.COMMENT {
    			comment, endline = p.consumeCommentGroup()
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 20 20:19:51 UTC 2023
    - 50.5K bytes
    - Viewed (0)
  2. src/go/parser/parser.go

    // comments list, and return it together with the line at which
    // the last comment in the group ends. A non-comment token or n
    // empty lines terminate a comment group.
    func (p *parser) consumeCommentGroup(n int) (comments *ast.CommentGroup, endline int) {
    	var list []*ast.Comment
    	endline = p.file.Line(p.pos)
    	for p.tok == token.COMMENT && p.file.Line(p.pos) <= endline+n {
    		var comment *ast.Comment
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 08 20:07:50 UTC 2023
    - 72.2K bytes
    - Viewed (0)
Back to top