p4t5h3 / purebasic-language-for-sublime-text

PureBasic support for Sublime Text.
MIT License
4 stars 1 forks source link

Strings with escape sequences are not parsed correctly #30

Closed p4t5h3 closed 2 years ago

p4t5h3 commented 2 years ago

This violates the PureBasic syntax because the escape sequence for the double quote is not recognized.

StartIndex = FindString(StringToSearchIn, "\"", StartIndex)

A tile is necessary to enable escape sequences in the string literal.

StartIndex = FindString(StringToSearchIn, ~"\"", StartIndex)

In both cases the escape sequence is not recognized by the Sublime Text syntax definition which considers the escaped double quote as the string end and the following double quote as the beginning of a new string.

See "literal strings" on general syntax rules.