parsing "..." sequence
don't panic with
error: '.' expected
if there is only two '.' chars. Return tok='.' in such case.
An asm code to test:
jz do_move0 # .. then we have a normal low
# .. or else we have a high
This commit is contained in:
4
tccpp.c
4
tccpp.c
@ -2537,10 +2537,8 @@ maybe_newline:
|
|||||||
cstr_reset(&tokcstr);
|
cstr_reset(&tokcstr);
|
||||||
cstr_ccat(&tokcstr, '.');
|
cstr_ccat(&tokcstr, '.');
|
||||||
goto parse_num;
|
goto parse_num;
|
||||||
} else if (c == '.') {
|
} else if ((c == '.') && (p[1] == '.')){
|
||||||
PEEKC(c, p);
|
PEEKC(c, p);
|
||||||
if (c != '.')
|
|
||||||
expect("'.'");
|
|
||||||
PEEKC(c, p);
|
PEEKC(c, p);
|
||||||
tok = TOK_DOTS;
|
tok = TOK_DOTS;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user