You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 open String the rest of the file is considered as String.
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:
func foo(){letmyLet="abcd someObj.call()}
The text was updated successfully, but these errors were encountered:
wojciech-kulik
changed the title
Unterminated strings don't introduce error recovery
Unterminated strings don't provide error recovery
Mar 24, 2024
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 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:
The text was updated successfully, but these errors were encountered: