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

Function scanNavigationToken

internal/astnav/tokens.go:15–21  ·  view source on GitHub ↗
(s *scanner.Scanner, containingNode *ast.Node)

Source from the content-addressed store, hash-verified

13}
14
15func scanNavigationToken(s *scanner.Scanner, containingNode *ast.Node) ast.Kind {
16 token := s.Token()
17 if shouldRescanLessThanLessThanToken(s, containingNode, token) {
18 return s.ReScanJsxToken(true /*allowMultilineJsxText*/)
19 }
20 return token
21}
22
23func GetTouchingPropertyName(sourceFile *ast.SourceFile, position int) *ast.Node {
24 return getTokenAtPosition(sourceFile, position, false /*allowPositionInLeadingTrivia*/, func(node *ast.Node) bool {

Callers 2

getTokenAtPositionFunction · 0.85
findRightmostValidTokenFunction · 0.85

Calls 3

TokenMethod · 0.80
ReScanJsxTokenMethod · 0.80

Tested by

no test coverage detected