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

Function ParseIsolatedEntityName

internal/parser/parser.go:281–288  ·  view source on GitHub ↗
(text string)

Source from the content-addressed store, hash-verified

279}
280
281func ParseIsolatedEntityName(text string) *ast.EntityName {
282 p := getParser()
283 defer putParser(p)
284 p.initializeState(ast.SourceFileParseOptions{}, text, core.ScriptKindJS)
285 p.nextToken()
286 entityName := p.parseEntityName(true, nil)
287 return core.IfElse(p.token == ast.KindEndOfFile && len(p.diagnostics) == 0, entityName, nil)
288}
289
290func (p *Parser) initializeState(opts ast.SourceFileParseOptions, sourceText string, scriptKind core.ScriptKind) {
291 if scriptKind == core.ScriptKindUnknown {

Callers 2

verifyCompilerOptionsMethod · 0.92

Calls 7

IfElseFunction · 0.92
getParserFunction · 0.85
putParserFunction · 0.85
lenFunction · 0.85
initializeStateMethod · 0.80
nextTokenMethod · 0.80
parseEntityNameMethod · 0.80

Tested by

no test coverage detected