History

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: 0b3612631f49ba0c008635aaa46ecf8be2eefcf7

grischka committed 10 years ago

Commit 8dd18591 parent 0b361261 file · +7 −4Browse files

Unified · Split

tccpp.c+7−4
@@ -2549,10 +2549,13 @@ maybe_newline: · 2548 unmodified lines
25492549 goto parse_num;
25502550 } else if (c == '.') {
25512551 PEEKC(c, p);
2552− if (c != '.')
2553− expect("'.'");
2554− PEEKC(c, p);
2555− tok = TOK_DOTS;
2552+ if (c == '.') {
2553+ p++;
2554+ tok = TOK_DOTS;
2555+ } else {
2556+ *--p = '.'; /* may underflow into file->unget[] */
2557+ tok = '.';
2558+ }
25562559 } else {
25572560 tok = '.';
25582561 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t