tieskedh / KotlinPoetDSL

A DSL for KotlinPoet
https://kotlinpoetdsl.devhaan.nl
MIT License
27 stars 0 forks source link

add control-flow in a DSL-like way to CodeBlockBuilder #33

Open tieskedh opened 6 years ago

tieskedh commented 6 years ago

Code-block-Builder needs to have a DSL-like Constrol-flow. lambda's with bodys needs to have control-flow access:

myType.someFunc(arg1){ it ->
    //plpl
}
val t =  someOtherFunction{
    //inside the lambda
}.andAlsoMyFunc{
    //hey
}

the code above can never be built in, so not allowing accessto the contrrol-flow is simply not feasible.