Strings and character constants now stop at end-of-line, unless escaped

by a backslash
This commit is contained in:
ceriel 1987-02-03 23:28:09 +00:00
parent d6cb339c6c
commit 703b6cf608

View File

@ -122,18 +122,23 @@ preprocess(fn)
do { do {
echo(c); echo(c);
LoadChar(c); LoadChar(c);
if (c == '\\') {
echo(c);
LoadChar(c);
}
if (c == '\n') { if (c == '\n') {
++LineNumber; ++LineNumber;
lineno++; lineno++;
break;
} }
else if (c == EOI) { else if (c == EOI) {
flush(op-_obuf); flush(op-_obuf);
return; return;
} }
if (c == '\\') {
echo(c);
LoadChar(c);
if (c == '\n') {
++LineNumber;
lineno++;
}
}
} }
while (c != stopc); while (c != stopc);
echo(c); echo(c);