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

Function GetSourceTextOfNodeFromSourceFile

internal/scanner/utilities.go:21–23  ·  view source on GitHub ↗
(sourceFile *ast.SourceFile, node *ast.Node, includeTrivia bool)

Source from the content-addressed store, hash-verified

19}
20
21func GetSourceTextOfNodeFromSourceFile(sourceFile *ast.SourceFile, node *ast.Node, includeTrivia bool) string {
22 return GetTextOfNodeFromSourceText(sourceFile.Text(), node, includeTrivia)
23}
24
25func GetTextOfNodeFromSourceText(sourceText string, node *ast.Node, includeTrivia bool) string {
26 if ast.NodeIsMissing(node) {

Callers 7

getTextOfNodeMethod · 0.92
getLiteralTextFunction · 0.92
getRawLiteralFunction · 0.92
writeTypeOrSymbolMethod · 0.92
isIntrinsicJsxTagFunction · 0.92
GetTextOfNodeFunction · 0.85

Calls 2

TextMethod · 0.65

Tested by

no test coverage detected