General
(node *ast.Node, sourceFile *ast.SourceFile)
| 5011 | // |
| 5012 | |
| 5013 | func (p *Printer) Emit(node *ast.Node, sourceFile *ast.SourceFile) string { |
| 5014 | // ensure a reusable writer |
| 5015 | if p.ownWriter == nil { |
| 5016 | p.ownWriter = NewTextWriter(p.Options.NewLine.GetNewLineCharacter(), 0) |
| 5017 | } |
| 5018 | |
| 5019 | p.Write(node, sourceFile, p.ownWriter, nil /*sourceMapGenerator*/) |
| 5020 | text := p.ownWriter.String() |
| 5021 | |
| 5022 | p.ownWriter.Clear() |
| 5023 | return text |
| 5024 | } |
| 5025 | |
| 5026 | func (p *Printer) EmitSourceFile(sourceFile *ast.SourceFile) string { |
| 5027 | return p.Emit(sourceFile.AsNode(), sourceFile) |
no test coverage detected