Rendering for dynamic types

This commit is contained in:
Andrey Breslav
2014-11-09 23:55:31 +02:00
parent 65794183e7
commit e0bd881c1e
6 changed files with 18 additions and 4 deletions
@@ -56,6 +56,7 @@ import org.jetbrains.jet.lang.psi.JetFile
import org.jetbrains.jet.lang.psi.JetPackageDirective
import org.jetbrains.jet.lang.psi.JetImportDirective
import org.jetbrains.jet.lang.psi.JetImportList
import org.jetbrains.jet.lang.psi.JetDynamicType
// invoke this instead of getText() when you need debug text to identify some place in PSI without storing the element itself
// this is need to avoid unnecessary file parses
@@ -123,6 +124,10 @@ private object DebugTextBuildingVisitor : JetVisitor<String, Unit>() {
return render(userType, userType.getQualifier(), userType.getReferenceExpression(), userType.getTypeArgumentList())
}
override fun visitDynamicType(type: JetDynamicType, data: Unit?): String? {
return "dynamic"
}
override fun visitAnnotation(annotation: JetAnnotation, data: Unit?): String? {
return renderChildren(annotation, " ", "[", "]")
}