MPS-extensions
MPS-extensions copied to clipboard
Add separator functionality
From mps-plaintextgen created by eugenschindler: DSLFoundry/mps-plaintextgen#13
For generating lists, it is useful to have something like the separators in MPS textual editors.
This has been +1'd by MPS power users
Is there still no way to do this easily? I found the following workaround for looping over children with a (non-trailing) separator:
The VAR macro captures the node's children in a variable over which the LOOP macro loops. That LOOP macro is also set up to use a counter variable:
Then, the IF macro only inserts the separator (a dot here) if the counter is small enough:
Is there any easier workaround?