vscode-scala-syntax
vscode-scala-syntax copied to clipboard
Fix #226: Parse quoted blocks with spaces (`' {`)
Fixes the linked issue.
That does not seem right. I believe that the syntax requires the quote to be immediately followed by a curly brace. I will double check.
That does not seem right. I believe that the syntax requires the quote to be immediately followed by a curly brace. I will double check.
It doesn't actually. At least last time I checked it did compile with whitespaces :O
Indeed. I opened an issue to fix this in https://github.com/lampepfl/dotty/issues/13951.
For
' { 2 }
' [ String ]
it looks like the current highlighting is correct for both Scala 2 and Scala 3 (after bug fix) as it is an unclosed Char or a Char with illegal contents.
Thank you @nicolasstucki for fixing the underlying issue :)
@nicolasstucki should we reopen this PR since it turns out it's a correct behaviour?
I'm reopening since the compiler is not changing behavior.
Still, this change is not perfect because it doesn't parse a comment in the middle of ' and {.
This is still missing some cases, see and other comments in that thread https://github.com/scala/vscode-scala-syntax/pull/227#discussion_r777565313
This was fixed in #250