Open unleashy opened 5 years ago
@jacob-carlborg : I actually just installed TextMate to test this use case.
void main ()
{
writeln(q"EOF
Let's see"
this is still inside a string"
EOF");
string str = "Works?";
}
It's interesting that the last quote after EOF does not result in the result of the file being stringified.
It's interesting that the last quote after EOF does not result in the result of the file being stringified.
I think the grammar sees the above code snippet as containing two regular strings. One starting at q"EOF
and ending at see"
. The other one starting at string"
and ending at EOF"
.
The grammar doesn't recognize hex strings, delimited strings or token strings. Much of it is still based on D1.
See gist:
https://gist.github.com/unleashy/c6a01c0798d99726940aec4ffca7f321
After the (admittedly weird) delimited string, the whole file becomes "string"-highlighted. This is obviously because delimited strings are not recognised, so
"("
is recognised as a bog-standard string, and the final"
is taken as a bog-standard string again, but it never ends.I'm ok with making a PR to fix this... as soon as I figure out how textmate grammars work :stuck_out_tongue: