[FIR/IR generator] Generate kDocs for visitor classes

This commit is contained in:
Sergej Jaskiewicz
2023-10-30 11:58:25 +01:00
committed by Space Team
parent 570422dbd4
commit 54de11cb58
10 changed files with 29 additions and 4 deletions
@@ -6,10 +6,7 @@
package org.jetbrains.kotlin.generators.tree
import org.jetbrains.kotlin.descriptors.Modality
import org.jetbrains.kotlin.generators.tree.printer.FunctionParameter
import org.jetbrains.kotlin.generators.tree.printer.multipleUpperBoundsList
import org.jetbrains.kotlin.generators.tree.printer.printFunctionDeclaration
import org.jetbrains.kotlin.generators.tree.printer.typeParameters
import org.jetbrains.kotlin.generators.tree.printer.*
import org.jetbrains.kotlin.types.Variance
import org.jetbrains.kotlin.utils.SmartPrinter
import org.jetbrains.kotlin.utils.withIndent
@@ -138,6 +135,7 @@ abstract class AbstractVisitorPrinter<Element : AbstractElement<Element, Field>,
fun printVisitor(elements: List<Element>) {
val visitorType = this.visitorType
printer.run {
printKDoc("Auto-generated by [${this@AbstractVisitorPrinter::class.qualifiedName}]")
when (visitorType.kind) {
TypeKind.Interface -> print("interface ")
TypeKind.Class -> print("abstract class ")