Hi there,
for a Kotlin/JS app, I’d like to show sample code on a web page. This sample code is the body of a lambda (but could also be refactored to a normal function / method. Currently I copy/paste the sample code into a multi line string constant and use that constant to show the sample code on the web page.
Is it possible to mark the function containing the sample code with an annotation and use a KSP processor to extract the function body and generate a string constant with that exact source code? Ot is this only possible using a compiler plugin?