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

Method hasCommentsAtPosition

internal/printer/printer.go:855–867  ·  view source on GitHub ↗
(pos int)

Source from the content-addressed store, hash-verified

853}
854
855func (p *Printer) hasCommentsAtPosition(pos int) bool {
856 if p.currentSourceFile == nil {
857 return false
858 }
859
860 for range scanner.GetTrailingCommentRanges(p.emitContext.Factory.AsNodeFactory(), p.currentSourceFile.Text(), pos+1) {
861 return true
862 }
863 for range scanner.GetLeadingCommentRanges(p.emitContext.Factory.AsNodeFactory(), p.currentSourceFile.Text(), pos+1) {
864 return true
865 }
866 return false
867}
868
869func (p *Printer) shouldEmitIndirectCall(node *ast.Node) bool {
870 return p.emitContext.EmitFlags(node)&EFIndirectCall != 0

Callers 1

emitJsxExpressionMethod · 0.95

Calls 4

GetTrailingCommentRangesFunction · 0.92
GetLeadingCommentRangesFunction · 0.92
AsNodeFactoryMethod · 0.65
TextMethod · 0.65

Tested by

no test coverage detected