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

Method rangeIsOnOneLine

internal/format/context.go:62–67  ·  view source on GitHub ↗
(node core.TextRange)

Source from the content-addressed store, hash-verified

60}
61
62func (this *FormattingContext) rangeIsOnOneLine(node core.TextRange) core.Tristate {
63 if rangeIsOnOneLine(node, this.SourceFile) {
64 return core.TSTrue
65 }
66 return core.TSFalse
67}
68
69func (this *FormattingContext) nodeIsOnOneLine(node *ast.Node) core.Tristate {
70 return this.rangeIsOnOneLine(withTokenStart(node, this.SourceFile))

Callers 3

nodeIsOnOneLineMethod · 0.95
blockIsOnOneLineMethod · 0.95
TokensAreOnSameLineMethod · 0.95

Calls 1

rangeIsOnOneLineFunction · 0.85

Tested by

no test coverage detected