ccomparini / fpl2cc

fpl parser generator language

Home Page:https://ccomparini.github.io/fpl2cc/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add @join(joinval, collection) {@ to jemp

ccomparini opened this issue · comments

Make it so you can do (eg)

@join(", ", some_collection:item_in_collection) {@
    @item_in_collection@
@}@

... or some such syntax. @for ... @ is nice and all but hard to generate stuff for languages which don't allow trailing commas etc.

Another useful case:

@join(" else ", some_collection:item_in_collection) {@
    if(foo == @item_in_collection@) {
         do_something_with(foo);
    }
@}@

.. so that it generates a towering if/else relatively neatly.