Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for nextComment (0.2 sec)

  1. src/go/printer/printer.go

    func (p *printer) commentSizeBefore(next token.Position) int {
    	// save/restore current p.commentInfo (p.nextComment() modifies it)
    	defer func(info commentInfo) {
    		p.commentInfo = info
    	}(p.commentInfo)
    
    	size := 0
    	for p.commentBefore(next) {
    		for _, c := range p.comment.List {
    			size += len(c.Text)
    		}
    		p.nextComment()
    	}
    	return size
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 41.6K bytes
    - Viewed (0)
  2. src/go/printer/nodes.go

    	// (there may be a pending comment when a line comment is
    	// immediately followed by a lead comment with no other
    	// tokens between)
    	if p.commentOffset == infinity {
    		p.nextComment() // get comment ready for use
    	}
    }
    
    type exprListMode uint
    
    const (
    	commaTerm exprListMode = 1 << iota // list is optionally terminated by a comma
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 17 18:53:17 UTC 2023
    - 52.6K bytes
    - Viewed (0)
Back to top