diff options
author | Błażej Kardyś <bkardys@virtuslab.com> | 2020-07-17 03:48:03 +0200 |
---|---|---|
committer | Sebastian Sellmair <34319766+sellmair@users.noreply.github.com> | 2020-08-11 14:27:44 +0200 |
commit | aeb2014eee704be377c06205d16f60562d2a8cf1 (patch) | |
tree | d144b627a0b379bebedf7e015f6d469fea61d0bb /core/src/main/kotlin/model/WithChildren.kt | |
parent | 49c9bcc586abb7c78f569526a05fea97da86993d (diff) | |
download | dokka-aeb2014eee704be377c06205d16f60562d2a8cf1.tar.gz dokka-aeb2014eee704be377c06205d16f60562d2a8cf1.tar.bz2 dokka-aeb2014eee704be377c06205d16f60562d2a8cf1.zip |
Fixing javadoc comment parser for psi files
Diffstat (limited to 'core/src/main/kotlin/model/WithChildren.kt')
-rw-r--r-- | core/src/main/kotlin/model/WithChildren.kt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/src/main/kotlin/model/WithChildren.kt b/core/src/main/kotlin/model/WithChildren.kt index 589bcd2a..06ff55b0 100644 --- a/core/src/main/kotlin/model/WithChildren.kt +++ b/core/src/main/kotlin/model/WithChildren.kt @@ -13,6 +13,9 @@ inline fun <reified T> WithChildren<*>.firstChildOfTypeOrNull(predicate: (T) -> inline fun <reified T> WithChildren<*>.firstChildOfType(): T = children.filterIsInstance<T>().first() +inline fun <reified T> WithChildren<*>.childrenOfType(): List<T> = + children.filterIsInstance<T>() + inline fun <reified T> WithChildren<*>.firstChildOfType(predicate: (T) -> Boolean): T = children.filterIsInstance<T>().first(predicate) |