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

Function getStartLineAndCharacterForNode

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

Source from the content-addressed store, hash-verified

508}
509
510func getStartLineAndCharacterForNode(n *ast.Node, sourceFile *ast.SourceFile) (line int, character int) {
511 return scanner.GetECMALineAndByteOffsetOfPosition(sourceFile, scanner.GetTokenPosOfNode(n, sourceFile, false))
512}
513
514func getStartLineForNode(n *ast.Node, sourceFile *ast.SourceFile) int {
515 return scanner.GetECMALineOfPosition(sourceFile, scanner.GetTokenPosOfNode(n, sourceFile, false))

Callers 2

getSmartIndentFunction · 0.85

Calls 2

GetTokenPosOfNodeFunction · 0.92

Tested by

no test coverage detected