Didier Villevalois
05/29/2022, 9:29 AMInternalNonStableExtensionPoints
, namely TypeResolutionIntercepterExtension
and CallResolutionInterceptorExtension
.
My use-case is the following: I would like to rewrite some calls to a library-defined fun <T> quote(t: T): FirExpression = TODO()
function. That library would itself depend on kotlin-compiler-embeddable
.
As I see it, I would have to:
1. Participate early to the type resolution, and for each call to quote
set its resolved type of o.j.k.f.e.FirExpression
2. At some point after BODY_RESOLVE, recursively visit the expression argument to quote
and generate fir builder calls for each FIR node.
Does this make sense? Do you think it is feasible?
Again thanks for any of your help!