aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseyko <seyko2@gmail.com>2015-10-17 13:54:58 +0300
committerseyko <seyko2@gmail.com>2015-10-17 13:54:58 +0300
commitc3975cf27c792d493e76a2058a1eaf588324053e (patch)
tree4bd3a46c8c49ac5e9eb5140506d85372280ef2e9
parentf0b7566181d8cf3407a6aaef51703b62b07ce2a6 (diff)
downloadtinycc-c3975cf27c792d493e76a2058a1eaf588324053e.tar.gz
tinycc-c3975cf27c792d493e76a2058a1eaf588324053e.tar.bz2
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
-rw-r--r--tccpp.c4
1 files changed, 1 insertions, 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 {