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

Function nodeContainsPosition

internal/ast/utilities.go:2665–2667  ·  view source on GitHub ↗
(node *Node, position int)

Source from the content-addressed store, hash-verified

2663}
2664
2665func nodeContainsPosition(node *Node, position int) bool {
2666 return node.Kind >= KindFirstNode && node.Pos() <= position && (position < node.End() || position == node.End() && node.Kind == KindEndOfFile)
2667}
2668
2669func findImportOrRequire(text string, start int) (index int, size int) {
2670 index = max(start, 0)

Callers 2

getSmartSelectionRangeFunction · 0.85
GetNodeAtPositionFunction · 0.85

Calls 2

PosMethod · 0.65
EndMethod · 0.65

Tested by

no test coverage detected