[FIR] update FirRenderer for scripts

^KT-60728
This commit is contained in:
Dmitrii Gridin
2023-07-28 18:01:55 +02:00
committed by Space Team
parent 2bacba5a9a
commit da71a152cd
234 changed files with 38820 additions and 29149 deletions
@@ -179,6 +179,29 @@ class FirRenderer(
printer.popIndent()
}
override fun visitScript(script: FirScript) {
renderContexts(script.contextReceivers)
annotationRenderer?.render(script)
printer.print("SCRIPT: ")
declarationRenderer?.renderPhaseAndAttributes(script) ?: resolvePhaseRenderer?.render(script)
printer.newLine()
printer.pushIndent()
script.parameters.forEach {
it.accept(this)
printer.newLine()
}
printer.newLine()
script.statements.forEach {
it.accept(this)
printer.newLine()
}
printer.popIndent()
}
override fun visitFileAnnotationsContainer(fileAnnotationsContainer: FirFileAnnotationsContainer) {
if (fileAnnotationsContainerRenderer != null) {
fileAnnotationsContainerRenderer.render(fileAnnotationsContainer)