vscode_erlang icon indicating copy to clipboard operation
vscode_erlang copied to clipboard

"~" is incorrectly marked as syntax error

Open bzoli22 opened this issue 6 years ago • 3 comments

The string literal "~" is marked as syntax error, and the closing " is ignored, messing up the parsing of the rest of the whole source code unit, which is not indexed, leading to syntax errors in all referencing modules.

While "~" is incorrect as a format string (it should be "~~"), it is perfectly acceptable as a string in all other cases.

A possible workaround is to use [$~], but that is a bit difficult to read and requires an explanation in comment.

I don't think this is a grave error or that you should put too much effort into fixing it, but I thought I report it anyway.

Thanks for this great plugin. I look forward to updates, Zoltan B.

bzoli22 avatar Apr 05 '19 08:04 bzoli22

I'd appreciate this one being fixed, I work with several files where several hundred lines are considered a single string by the parser due to this error

artman41 avatar Apr 05 '19 12:04 artman41

I have the same issue as artman41. And this is something i cant change code wise cause this is widely used in a legacy product.

JesperOAndersson avatar May 05 '20 08:05 JesperOAndersson

Hi,

Sorry for the delay...

Thanks for your report. Could you add a sample of your problem, if already exists into this repository : https://github.com/pgourlain/erlang-vscode-test.

pgourlain avatar Jul 13 '20 09:07 pgourlain