PP: Recognize <> style #include header names. I.e., #include <header-name>.

Also correctly test and handle missing newline.
This commit is contained in:
John Kessenich 2017-01-02 20:12:08 -07:00
parent faa720f14c
commit affc26674d
8 changed files with 105 additions and 44 deletions

View file

@ -688,6 +688,9 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
}
break;
case '"':
// TODO: If this gets enhanced to handle escape sequences, or
// anything that is different than what #include needs, then
// #include needs to use scanHeaderName() for this.
ch = getch();
while (ch != '"' && ch != '\n' && ch != EndOfInput) {
if (len < MaxTokenLength) {