FIR IDE: Add name filtering to scope KtScope and implementations
This commit is contained in:
committed by
Ilya Kirillov
parent
dc600e3caf
commit
75d8710bf6
@@ -27,14 +27,16 @@ interface KtScope : ValidityTokenOwner {
|
||||
}
|
||||
}
|
||||
|
||||
fun getCallableSymbols(): Sequence<KtCallableSymbol>
|
||||
fun getClassifierSymbols(): Sequence<KtClassifierSymbol>
|
||||
fun getCallableSymbols(nameFilter: KtScopeNameFilter = { true }): Sequence<KtCallableSymbol>
|
||||
fun getClassifierSymbols(nameFilter: KtScopeNameFilter = { true }): Sequence<KtClassifierSymbol>
|
||||
|
||||
fun containsName(name: Name): Boolean = withValidityAssertion {
|
||||
name in getCallableNames() || name in getClassifierNames()
|
||||
}
|
||||
}
|
||||
|
||||
typealias KtScopeNameFilter = (Name) -> Boolean
|
||||
|
||||
interface KtCompositeScope : KtScope {
|
||||
val subScopes: List<KtScope>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user