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 f3b298586f
commit 85830c5f63

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);