void () { PsiExpression value = myReturnStatement.getReturnValue(); PsiStatement currentContext = goUp(); if (currentContext == null) return; if (value != null) { myExitContext.registerReturnValue(value, myReplacements); } while (currentContext != null) { currentContext = advance(currentContext); } replace(); }