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

Method emitModuleName

internal/printer/printer.go:1288–1301  ·  view source on GitHub ↗
(node *ast.ModuleName)

Source from the content-addressed store, hash-verified

1286}
1287
1288func (p *Printer) emitModuleName(node *ast.ModuleName) {
1289 if node == nil {
1290 return
1291 }
1292
1293 switch node.Kind {
1294 case ast.KindIdentifier:
1295 p.emitBindingIdentifier(node.AsIdentifier())
1296 case ast.KindStringLiteral:
1297 p.emitStringLiteral(node.AsStringLiteral())
1298 default:
1299 panic(fmt.Sprintf("unexpected ModuleName: %v", node.Kind))
1300 }
1301}
1302
1303func (p *Printer) emitModuleExportName(node *ast.ModuleExportName) {
1304 if node == nil {

Callers 1

emitModuleDeclarationMethod · 0.95

Calls 5

emitBindingIdentifierMethod · 0.95
emitStringLiteralMethod · 0.95
panicFunction · 0.85
AsIdentifierMethod · 0.80
AsStringLiteralMethod · 0.80

Tested by

no test coverage detected