New J2K: Display element type when hit visitElement
This commit is contained in:
committed by
Ilya Kirillov
parent
a4630af109
commit
2f38edb55f
@@ -18,6 +18,7 @@ package org.jetbrains.kotlin.j2k
|
||||
|
||||
import org.jetbrains.kotlin.j2k.tree.JKClass
|
||||
import org.jetbrains.kotlin.j2k.tree.JKElement
|
||||
import org.jetbrains.kotlin.j2k.tree.prettyDebugPrintTree
|
||||
import org.jetbrains.kotlin.j2k.tree.visitors.JKVisitor
|
||||
import org.jetbrains.kotlin.utils.Printer
|
||||
|
||||
@@ -37,7 +38,7 @@ class NewCodeBuilder {
|
||||
|
||||
inner class Visitor : JKVisitor<Unit, Unit> {
|
||||
override fun visitElement(element: JKElement, data: Unit) {
|
||||
builder.append("/* !!! Hit visitElement !!! */")
|
||||
printer.print("/* !!! Hit visitElement for element type: ${element::class} !!! */")
|
||||
}
|
||||
|
||||
override fun visitClass(klass: JKClass, data: Unit) {
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
class Some {
|
||||
/* !!! Hit visitElement !!! */
|
||||
/* !!! Hit visitElement for element type: class org.jetbrains.kotlin.j2k.tree.impl.JKKtPropertyImpl !!! */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user