[IR] KotlinLikeDumper: merge Break & Continue
This commit is contained in:
committed by
teamcityserver
parent
64b42401a1
commit
ad5df79e39
@@ -1194,23 +1194,15 @@ private class KotlinLikeDumper(val p: Printer, val options: KotlinLikeDumpOption
|
|||||||
p.printlnWithNoIndent()
|
p.printlnWithNoIndent()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun IrBreakContinue.printLabel() {
|
override fun visitBreakContinue(jump: IrBreakContinue, data: IrDeclaration?) {
|
||||||
label?.let {
|
// TODO render loop reference
|
||||||
|
p.printWithNoIndent(if (jump is IrContinue) "continue" else "break")
|
||||||
|
jump.label?.let {
|
||||||
p.printWithNoIndent("@")
|
p.printWithNoIndent("@")
|
||||||
p.printWithNoIndent(it)
|
p.printWithNoIndent(it)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun visitBreak(jump: IrBreak, data: IrDeclaration?) {
|
|
||||||
p.printWithNoIndent("break")
|
|
||||||
jump.printLabel()
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun visitContinue(jump: IrContinue, data: IrDeclaration?) {
|
|
||||||
p.printWithNoIndent("continue")
|
|
||||||
jump.printLabel()
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun visitErrorDeclaration(declaration: IrErrorDeclaration, data: IrDeclaration?) {
|
override fun visitErrorDeclaration(declaration: IrErrorDeclaration, data: IrDeclaration?) {
|
||||||
p.println("/* ERROR DECLARATION */")
|
p.println("/* ERROR DECLARATION */")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user