Hi everyone.
I'm Feriaman, i use XPand in a XText project, it is really impressive. I carefully readed the manual, but i cannot find a way to do something that should be pretty easy.
First question :
I'd like to make a rule like this :
«EXPAND rule FOREACH ABasketOfTomatoesAndCuncumbers SEPARATOR ','»
with :
«DEFINE rule FOR Tomato»«ENDDEFINE»
«DEFINE rule FOR Cuncumber»green«ENDDEFINE»
And I'd like to obtain this :
(Tomato,Cuncumber,Tomato,Tomato,Cuncumber) ---> green,green
But of course i obtain :
(Tomato,Cuncumber,Tomato,Tomato,Cuncumber) ---> ,green,,,green
Second question :
In fact i'd like to output a keword before my enumeration, something like this :
that could be achieve by writing the rule like this :
=>«EXPAND rule FOREACH ABasketOfTomatoesAndCuncumbers SEPARATOR ','»
(Tomato) ---> "" (nothing)
And of course i obtain this :
Thanks to every reader.
Thanks to every answerer.