MCPcopy Index your code
hub / github.com/microsoft/typescript-go / parseModuleSpecifier

Method parseModuleSpecifier

internal/parser/parser.go:2326–2335  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2324}
2325
2326func (p *Parser) parseModuleSpecifier() *ast.Expression {
2327 if p.token == ast.KindStringLiteral {
2328 result := p.parseLiteralExpression(true /*intern*/)
2329 return result
2330 }
2331 // We allow arbitrary expressions here, even though the grammar only allows string
2332 // literals. We check to ensure that it is only a string literal later in the grammar
2333 // check pass.
2334 return p.parseExpression()
2335}
2336
2337func (p *Parser) tryParseImportClause(identifier *ast.Node, pos int, phaseModifier ast.Kind, skipJSDocLeadingAsterisks bool) *ast.Node {
2338 // ImportDeclaration:

Calls 2

parseExpressionMethod · 0.95

Tested by

no test coverage detected