-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider adding in-place formatted code blocks #55
Comments
If I'm right, this code is about adding extension-properties to Strings and Specs, such that it will be easier to compose the codeblock. |
Ok. Let me try that. However, I think it won't be added to KotlinPoet judging by square/kotlinpoet#496 (comment) |
As you can see, square/kotlinpoet#877 was closed, so WDYT regarding extended blocks in KotlinPoetDSL? |
I personally would have something more reflection-like... val j = "j" valOf Int::class
val hello = strVal("""Hello, "world", \n test""")
cb {
addLazy(::println, hello+j)
}
fun <R> CodeBlock.addLazy(func : KFunction1<String, R>, stringValue : StringValue){
add(func.name+"("+stringValue+")")
}
But I have to investigate it more... |
See square/javapoet#761 (comment)
For instance:
==>
The text was updated successfully, but these errors were encountered: