MCPcopy Index your code
hub / github.com/microsoft/typescript-go / writeLineSeparatorsAfter

Method writeLineSeparatorsAfter

internal/printer/printer.go:437–444  ·  view source on GitHub ↗
(node *ast.Node, parent *ast.Node)

Source from the content-addressed store, hash-verified

435}
436
437func (p *Printer) writeLineSeparatorsAfter(node *ast.Node, parent *ast.Node) {
438 if p.Options.PreserveSourceNewlines {
439 trailingNewlines := p.getClosingLineTerminatorCount(parent, node, LFNone, core.NewTextRange(-1, -1) /*childrenTextRange*/)
440 if trailingNewlines > 0 {
441 p.writeLineRepeat(trailingNewlines)
442 }
443 }
444}
445
446func (p *Printer) getLinesBetweenNodes(parent *ast.Node, node1 *ast.Node, node2 *ast.Node) int {
447 if p.shouldElideIndentation(parent) {

Callers 2

emitJsxOpeningElementMethod · 0.95

Calls 3

writeLineRepeatMethod · 0.95
NewTextRangeFunction · 0.92

Tested by

no test coverage detected