0

Inside a string literal, the margin character (a single quote) indicates that the initial part of the line, before the margin character, should be ignored. Is there a complementary "right-margin" character, that indicates that everything after it on the same line should be ignored?

(I realized that this would be useful when writing somewhat lengthy code inside interpolated expressions in a string. In order to make that code more readable, I would like to split it over multiple lines, but the newlines introduced that way should not be part of the string literal. And putting the newlines inside the <...> looks ugly.)

Dennis
  • 171
  • 9

1 Answers1

0

Rascal only supports ignoring left-margin characters before the single quote (') in interpolated strings. Your suggestion for also ignoring right-margin characters is interesting but currently not supported.

Since layout inside interpolations <...> is ignored you can (and have to) place all your additional layout there.

Paul Klint
  • 1,418
  • 7
  • 12