-
Notifications
You must be signed in to change notification settings - Fork 14
Description
String literals in EOL can be multi-line as shown below.
This "feature" is unintentional and undocumented. Before da11738 we used SingleLineRule
s to syntax-highlight string literals in Epsilon Eclipse's editors, which was masking this. However, in da11738 the EOL editor became consistent with the parser and now uses MultiLineRule
s. This can create some awkward syntax highlighting when a string is not properly closed with a single/double quote as shown below.
What's more, being an accidental feature, multi-line strings are not properly supported (e.g. indentation is not considered when computing their contents). To maintain backwards compatibility, one option would be to use SingleLineRule
s for double-quoted strings and raise a warning in the editor when multi-line double-quoted strings are used. For single-quoted strings, we can keep the MultiLineRule
for syntax highlighting and not raise a warning, with the intention of improving support for them in 3.0 (i.e. in 3.0 onwards double-quoted strings would be single-line and single-quoted strings would be multi-line with proper support for indentation).