hernad / atom-language-harbour

atom editor language harbour
MIT License
3 stars 7 forks source link

escape in string #6

Closed APerricone closed 7 years ago

APerricone commented 7 years ago

Hello, In Harbour there is not the escape sequence, if you write "\n" it is a string with \n, in the same way is you write "\" it is a backslash, instead with this case your language parser fails... I see in harbour.cson line 56 there is a comment about # TOFIX: String parsing will fail on this string: "\" is it not enough remove this line?

'patterns': [
        { 'include': '#escaped_character' }
      ]

I am newbie with atom, and I don't know how build a plugin...

In harbour the string can be written with double quote and with single quote, in this way you can write: 'Goofy is a "dog"' and "Goofy is a 'dog'" of 'This string has " < this' + " this ' characters"

Antonino

hernad commented 7 years ago

@APerricone you are quite right 👍 I have published 3.1.0 version.

This test sequence in .prg now works as expected

cVar := "\"

Regards, Ernad