MCPcopy Create free account
hub / github.com/microsoft/typescript-go / nodeIsOnOneLine

Method nodeIsOnOneLine

internal/format/context.go:69–71  ·  view source on GitHub ↗
(node *ast.Node)

Source from the content-addressed store, hash-verified

67}
68
69func (this *FormattingContext) nodeIsOnOneLine(node *ast.Node) core.Tristate {
70 return this.rangeIsOnOneLine(withTokenStart(node, this.SourceFile))
71}
72
73func withTokenStart(loc *ast.Node, file *ast.SourceFile) core.TextRange {
74 startPos := scanner.GetTokenPosOfNode(loc, file, false)

Callers 2

NextNodeAllOnSameLineMethod · 0.95

Calls 2

rangeIsOnOneLineMethod · 0.95
withTokenStartFunction · 0.85

Tested by

no test coverage detected