void (@NotNull PsiWhileStatement statement) { startElement(statement); PsiStatement body = statement.getBody(); if (body == null) { myStartStatementStack.pushStatement(statement, false); } else { myStartStatementStack.pushStatement(body, true); } myEndStatementStack.pushStatement(statement, false); PsiExpression condition = statement.getCondition(); if (condition != null) { condition.accept(this); } Object loopCondition = myConstantEvaluationHelper.computeConstantExpression(statement.getCondition()); if (loopCondition instanceof Boolean) { boolean value = ((Boolean)loopCondition).booleanValue(); if (value) { emitEmptyInstruction(); } else { myCurrentFlow.addInstruction(new GoToInstruction(0)); addElementOffsetLater(statement, false); } } else { Instruction instruction = new ConditionalGoToInstruction(0, statement.getCondition()); myCurrentFlow.addInstruction(instruction); addElementOffsetLater(statement, false); } if (body != null) { body.accept(this); } int offset = myCurrentFlow.getStartOffset(statement); Instruction instruction = new GoToInstruction(offset); myCurrentFlow.addInstruction(instruction); myStartStatementStack.popStatement(); myEndStatementStack.popStatement(); finishElement(statement); }