mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-03 09:00:21 +00:00
Properly handle backslash newline within an identifier or keyword.
PR: bin/6015 Submitted by: myself (schweikh) Patch by: Alexey V.Neyman <alex.neyman@auriga.ru> Tested by: indenting my chess problem solver and running its test suite MFC after: 3 weeks
This commit is contained in:
parent
e58c2b8381
commit
f828df9d17
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=85182
@ -209,8 +209,18 @@ lexi()
|
||||
}
|
||||
}
|
||||
else
|
||||
while (chartype[*buf_ptr] == alphanum) { /* copy it over */
|
||||
while (chartype[*buf_ptr] == alphanum || *buf_ptr == BACKSLASH) {
|
||||
/* fill_buffer() terminates buffer with newline */
|
||||
if (*buf_ptr == BACKSLASH) {
|
||||
if (*(buf_ptr + 1) == '\n') {
|
||||
buf_ptr += 2;
|
||||
if (buf_ptr >= buf_end)
|
||||
fill_buffer();
|
||||
} else
|
||||
break;
|
||||
}
|
||||
CHECK_SIZE_TOKEN;
|
||||
/* copy it over */
|
||||
*e_token++ = *buf_ptr++;
|
||||
if (buf_ptr >= buf_end)
|
||||
fill_buffer();
|
||||
|
Loading…
Reference in New Issue
Block a user