MPS-extensions icon indicating copy to clipboard operation
MPS-extensions copied to clipboard

Vertical alignment in nested layouts

Open eugenschindler opened this issue 5 years ago • 4 comments

From mps-plaintextgen created by nkoester: DSLFoundry/mps-plaintextgen#26

I face the issue of not being able to specify the vertical alignment of text within nested layouts.

A simple example of this would be any generator that uses e.g.

[> $LOOP$[> [> $COPY_SRC$element <] $IF$, <] <]

as a generator structure in order to separate nested lines with a comma.

However, if nested lines themselves have multiple lines as a result, this construct fails. The plaintextgen will always put the comma on the same (first) line.

Example:

verticalalignment

This is where I'd like to generate it to:

verticalalignment2

I suggest adding something like a vertical alignment to make these kind of constructs possible.

eugenschindler avatar Apr 07 '19 17:04 eugenschindler

Sorry, the last one slipped through the cracks. Could you make an MPS project example? That would help more with understanding the issue.

eugenschindler avatar Apr 07 '19 17:04 eugenschindler

Maybe take a look at the json language [1]. The above screenshots where taken from it and there is not much more to it than what is shown there.

[1] ttps://github.com/nkoester/mps-json

eugenschindler avatar Apr 07 '19 17:04 eugenschindler

Any thoughts or updates on this?

eugenschindler avatar Apr 07 '19 17:04 eugenschindler

Maybe you can have a look at the plaintextflow language (which is also in the plaintextgen plugin and has some extra constructs to handle nesting and newlines). Would that solve your issue?

eugenschindler avatar Apr 07 '19 17:04 eugenschindler