tccpp: allow .. in token stream

for gas comments lonely on a line such as

    # .. more stuff

where tcc would try to parse .. as a preprocessor directive

See also: 0b3612631f
This commit is contained in:
grischka
2015-11-20 18:25:00 +01:00
parent 0b3612631f
commit 8dd1859176

11
tccpp.c
View File

@ -2549,10 +2549,13 @@ maybe_newline:
goto parse_num; goto parse_num;
} else if (c == '.') { } else if (c == '.') {
PEEKC(c, p); PEEKC(c, p);
if (c != '.') if (c == '.') {
expect("'.'"); p++;
PEEKC(c, p); tok = TOK_DOTS;
tok = TOK_DOTS; } else {
*--p = '.'; /* may underflow into file->unget[] */
tok = '.';
}
} else { } else {
tok = '.'; tok = '.';
} }