mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
merge from base, from sashan@:
> - odd condition/test in PF lexer > (and other lexers too) > > This commit rectifies earlier change: > > in the lex... even inside quotes, a \ followed by space or tab should > expand to space or tab, and a \ followed by newline should be ignored > (as a line continuation). compatible with the needs of hoststated > (which has the most strict quoted string requirements), and ifstated > (where one commonly does line continuations in strings). > > OK deraadt@, OK millert@
This commit is contained in:
parent
a63b87e315
commit
268deed916
3
parse.y
3
parse.y
@ -467,7 +467,8 @@ yylex(void)
|
|||||||
} else if (c == '\\') {
|
} else if (c == '\\') {
|
||||||
if ((next = lgetc(quotec)) == EOF)
|
if ((next = lgetc(quotec)) == EOF)
|
||||||
return (0);
|
return (0);
|
||||||
if (next == quotec || c == ' ' || c == '\t')
|
if (next == quotec || next == ' ' ||
|
||||||
|
next == '\t')
|
||||||
c = next;
|
c = next;
|
||||||
else if (next == '\n') {
|
else if (next == '\n') {
|
||||||
file->lineno++;
|
file->lineno++;
|
||||||
|
Loading…
Reference in New Issue
Block a user