Bug fix involving '\\'.
This commit is contained in:
parent
0595f74596
commit
c19358ee50
1 changed files with 5 additions and 3 deletions
|
@ -115,7 +115,6 @@ scanner() {
|
||||||
register int ch; /* Current char */
|
register int ch; /* Current char */
|
||||||
register char *p = ltext;
|
register char *p = ltext;
|
||||||
int reserved = 0; /* reserved word? */
|
int reserved = 0; /* reserved word? */
|
||||||
int last; /* Char before current char */
|
|
||||||
char *max = <ext[LTEXTSZ - 1];
|
char *max = <ext[LTEXTSZ - 1];
|
||||||
|
|
||||||
if (ch = savedtok.t_tokno) {
|
if (ch = savedtok.t_tokno) {
|
||||||
|
@ -138,13 +137,16 @@ scanner() {
|
||||||
switch(c_class[ch]) {
|
switch(c_class[ch]) {
|
||||||
case ISLIT :
|
case ISLIT :
|
||||||
for (;;) {
|
for (;;) {
|
||||||
last = ch;
|
|
||||||
ch = input();
|
ch = input();
|
||||||
if (ch == '\n' || ch == EOF) {
|
if (ch == '\n' || ch == EOF) {
|
||||||
error(linecount,"missing '");
|
error(linecount,"missing '");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (ch == '\'' && last != '\\') break;
|
if (ch == '\'') break;
|
||||||
|
if (ch == '\\') {
|
||||||
|
*p++ = ch;
|
||||||
|
ch = input();
|
||||||
|
}
|
||||||
*p++ = ch;
|
*p++ = ch;
|
||||||
if (p > max) p--;
|
if (p > max) p--;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue