[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()
|
||||
}
|
||||
|
||||
private fun IrBreakContinue.printLabel() {
|
||||
label?.let {
|
||||
override fun visitBreakContinue(jump: IrBreakContinue, data: IrDeclaration?) {
|
||||
// TODO render loop reference
|
||||
p.printWithNoIndent(if (jump is IrContinue) "continue" else "break")
|
||||
jump.label?.let {
|
||||
p.printWithNoIndent("@")
|
||||
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?) {
|
||||
p.println("/* ERROR DECLARATION */")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user