FIR IDE: introduce withFir function
This commit is contained in:
+5
@@ -64,6 +64,11 @@ object LowLevelFirApiFacade {
|
|||||||
return action(firDeclaration)
|
return action(firDeclaration)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline fun <F : FirElement, R> withFir(fir: F, action: (F) -> R): R {
|
||||||
|
// TODO locking
|
||||||
|
return action(fir)
|
||||||
|
}
|
||||||
|
|
||||||
fun getDiagnosticsFor(element: KtElement, resolveState: FirModuleResolveState): Collection<Diagnostic> =
|
fun getDiagnosticsFor(element: KtElement, resolveState: FirModuleResolveState): Collection<Diagnostic> =
|
||||||
resolveState.getDiagnostics(element)
|
resolveState.getDiagnostics(element)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user