Highlighting, string interpolation: $ is highlighted as part of string
Given e.g.:
in both instances $ will given the same highlighting as the literal string, which it is clearly not part of. It should probably be rendered as punctuation, not sure if there is an actual category for that. "Other", maybe.
s"Hello $world"
s"Hello ${world}"
in both instances $ will given the same highlighting as the literal string, which it is clearly not part of. It should probably be rendered as punctuation, not sure if there is an actual category for that. "Other", maybe.
Leave a comment
on 2013-01-02 16:39 *
By Simon Schäfer
Type set to Enhancement
Version changed from 2.1.0-M3-210 to 2.1.0-nightly-210
Assigned to set to Simon Schäfer
Component changed from None to Editor
on 2013-01-02 16:56 *
By Simon Schäfer
After looking at this I'm unsure if it should be fixed. To be consistent in s"$$" it would mean that the first $ is highlighted in a different color. On the other hand, as for escape literals, it would mean that it can easily be seen while reading such string literals. Further opinions on what to do?
on 2013-01-09 07:09 *
By Iulian Dragos
I believe the `$$` should be highlighted as escape sequences in string literals, same as the single `$` (`$` has a similar function to `\` does in a string literal).
I would also prefer if the
My solution would be to not highlight it at all, like the
My argument would be that the '$' is syntactically useful, but it has no semantic value. It is a marker which will be removed.
$
was not highlighted as the string literal.My solution would be to not highlight it at all, like the
{}
in the ${word}
case. Having two colors in the s"$$"
case is find by me.My argument would be that the '$' is syntactically useful, but it has no semantic value. It is a marker which will be removed.
on 2014-07-19 17:55 *
By Simon Schäfer
Version changed from 2.1.0-nightly-210 to 3.0.4-211
Assigned to changed from Simon Schäfer to -none-