From c3975cf27c792d493e76a2058a1eaf588324053e Mon Sep 17 00:00:00 2001 From: seyko Date: Sat, 17 Oct 2015 13:54:58 +0300 Subject: [PATCH] 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 --- tccpp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tccpp.c b/tccpp.c index e8fbd60..7ec0d44 100644 --- a/tccpp.c +++ b/tccpp.c @@ -2537,10 +2537,8 @@ maybe_newline: cstr_reset(&tokcstr); cstr_ccat(&tokcstr, '.'); goto parse_num; - } else if (c == '.') { + } else if ((c == '.') && (p[1] == '.')){ PEEKC(c, p); - if (c != '.') - expect("'.'"); PEEKC(c, p); tok = TOK_DOTS; } else {