translate-c: add support for integer suffixes on 0 (zero) litteral inside macro definitions

This commit is contained in:
Sahnvour
2019-03-10 14:43:35 +01:00
committed by Andrew Kelley
parent 0a8a7a57e7
commit fa9fcab620
2 changed files with 49 additions and 0 deletions

View File

@@ -362,6 +362,13 @@ void tokenize_c_macro(CTokenize *ctok, const uint8_t *c) {
ctok->cur_tok->id = CTokIdNumLitFloat;
buf_append_char(&ctok->buf, '.');
break;
case 'l':
case 'L':
case 'u':
case 'U':
c -= 1;
ctok->state = CTokStateDecimal;
continue;
default:
c -= 1;
ctok->state = CTokStateOctal;