Skip to content

forEachDescendantOfTypeVisitor

inline fun <reified T : KtElement> forEachDescendantOfTypeVisitor(noinline block: (T) -> Unit): KtVisitorVoid

Returns a recursive visitor that calls block on each visited element of type T, including the element passed to accept. Calls happen in DFS-exit order, so deeper nodes are visited before their ancestors.