parentsOfTypeUntil

inline fun <T : KtElement, S : KtElement> KtElement.parentsOfTypeUntil(strict: Boolean = true): Sequence<T>

Returns a list of all parents of type T before first occurrence of S.