raulraja: my guess was wrong: there is no public api for compiler extensions planned. At least my friend makes his master degree for something similar, but not public and not sure that his work will be included to compiler.
So you can just add issue to kotlin github and look what they say.