Open wojciech-kulik opened 4 months ago
Hmm, this is odd. My first assumption was that this came from the custom scanner, but then I remembered that single-line non-raw strings are part of the JS grammar, not the custom scanner.
I'm not sure if I understood your comment :D. Is there any chance to fix it?
I'm sure it is possible to fix. My earlier comment is saying that I don't have any pointers on where you might look to start to fix it, though.
I'm not sure if it's possible in case of Swift, but tree-sitter is often advertised by its error recovery and as one of examples it is shown that unterminated
String
doesn't break highlighting. That's not the case with Swift, if I leave openString
the rest of the file is considered asString
.Would it be possible to handle this case. It should be possible because multiline Strings have its own syntax:
"""
Xcode handles this case correctly.
Example: