Closed zquintana closed 6 years ago
Thanks for the bug report, and sorry for the delay in responding. Per the documentation, this is the expected behaviour when you use a mode that defines a quote character:
Furthermore, to avoid interference between the GPP syntax and the contents of the input file, a quote character is provided. The quote character can be used to prevent the interpretation of a macro call, comment, or string as anything but plain text. The quote character "protects" the following character, and always gets removed during evaluation. Two consecutive quote characters evaluate as a single quote character.
In the default mode, the backslash is the quote character, so when processing the input file, GPP changes all occurrences of \"
to "
. If you don't want it to do this, you should select a mode with a different quote character (or without any quote character at all), or else escape all your quote characters in your input file (i.e., changing all \
to \\
).
With regards to escape chars in Javascript Javascript programs, "gpp -C" seems to work fine.
Hey guys,
I appreciate the work your putting into this project. Recently on an old project I was trying to replace filepp with your gpp. Found a bug where escape strings are being stripped on include. As an example:
Included File Example:
Main File:
The result:
Include works great, but it's stripping out the
\
which then breaks the code. Tried looking through the code, but I'm not a C developer so my skills there are limited.