- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for linesFrom (0.21 sec)
-
src/go/printer/nodes.go
if i > 0 { p.linebreak(p.lineFor(s.Pos()), 1, ignore, p.linesFrom(line) > 0) } p.recordLine(&line) p.valueSpec(s.(*ast.ValueSpec), keepType[i]) } } else { var line int for i, s := range d.Specs { if i > 0 { p.linebreak(p.lineFor(s.Pos()), 1, ignore, p.linesFrom(line) > 0) } p.recordLine(&line) p.spec(s, n, false) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 17 18:53:17 UTC 2023 - 52.6K bytes - Viewed (0) -
src/go/printer/printer.go
func (p *printer) recordLine(linePtr *int) { p.linePtr = linePtr } // linesFrom returns the number of output lines between the current // output line and the line argument, ignoring any pending (not yet // emitted) whitespace or comments. It is used to compute an accurate // size (in number of lines) for a formatted construct. func (p *printer) linesFrom(line int) int { return p.out.Line - line }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 12:02:03 UTC 2023 - 41.6K bytes - Viewed (0)