mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-16 15:53:03 +00:00
(literalchar): fixed the code for escaping double quotes (thanks
Jonathan Czisny.)
This commit is contained in:
@@ -271,7 +271,9 @@ literalchar (char **pp, int *pcode, char term)
|
|||||||
so that `\012' and `\n' can be interchangeable. */
|
so that `\012' and `\n' can be interchangeable. */
|
||||||
|
|
||||||
p = *pp;
|
p = *pp;
|
||||||
if (code == '\\') {*p++ = '\\'; *p++ = '\\';}
|
if (code == term && wasquote)
|
||||||
|
*p++ = code;
|
||||||
|
else if (code == '\\') {*p++ = '\\'; *p++ = '\\';}
|
||||||
else if (code == '\'') {*p++ = '\\'; *p++ = '\'';}
|
else if (code == '\'') {*p++ = '\\'; *p++ = '\'';}
|
||||||
else if (code == '\"') {*p++ = '\\'; *p++ = '\"';}
|
else if (code == '\"') {*p++ = '\\'; *p++ = '\"';}
|
||||||
else if (code >= 040 && code < 0177)
|
else if (code >= 040 && code < 0177)
|
||||||
|
|||||||
Reference in New Issue
Block a user