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

Function getStartLineForNode

internal/format/indent.go:514–516  ·  view source on GitHub ↗
(n *ast.Node, sourceFile *ast.SourceFile)

Source from the content-addressed store, hash-verified

512}
513
514func getStartLineForNode(n *ast.Node, sourceFile *ast.SourceFile) int {
515 return scanner.GetECMALineOfPosition(sourceFile, scanner.GetTokenPosOfNode(n, sourceFile, false))
516}
517
518func GetContainingList(node *ast.Node, sourceFile *ast.SourceFile) *ast.NodeList {
519 if node.Parent == nil {

Calls 2

GetECMALineOfPositionFunction · 0.92
GetTokenPosOfNodeFunction · 0.92

Tested by

no test coverage detected