void (Frame frame, PsiBuilder.Marker marker, IElementType elementType, boolean result) { if (marker == null) return; if (result) { if (elementType != null) { marker.done(elementType); } else { marker.drop(); } } else { if (frame != null) { int position = ((PsiBuilderImpl.ProductionMarker)marker).getStartIndex(); if (frame.errorReportedAt > position) { frame.errorReportedAt = frame.parentFrame == null ? -1 : frame.parentFrame.errorReportedAt; } } marker.rollbackTo(); } }