diff options
author | Ville Voutilainen <ville.voutilainen@qt.io> | 2019-05-10 16:45:56 +0300 |
---|---|---|
committer | Ville Voutilainen <ville.voutilainen@qt.io> | 2019-05-10 18:34:02 +0000 |
commit | 2a1651cc164b270dac81f4caa1fb8ded4fab6e4b (patch) | |
tree | 2643b0e960514acdaf2d7699d4001f50b9f67090 /src/tools/moc | |
parent | c99678fb19e579466f2a9e4df626de3cdb51f272 (diff) |
Make moc grok binary literals with digit separators
Task-number: QTBUG-75656
Change-Id: I6011ef2fb07497cc2a055d6828a1b6356927c281
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/tools/moc')
-rw-r--r-- | src/tools/moc/preprocessor.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tools/moc/preprocessor.cpp b/src/tools/moc/preprocessor.cpp index e83125925d..d135bddb4c 100644 --- a/src/tools/moc/preprocessor.cpp +++ b/src/tools/moc/preprocessor.cpp @@ -241,7 +241,8 @@ Symbols Preprocessor::tokenize(const QByteArray& input, int lineNum, Preprocesso if (!*data || *data != '.') { token = INTEGER_LITERAL; if (data - lexem == 1 && - (*data == 'x' || *data == 'X') + (*data == 'x' || *data == 'X' + || *data == 'b' || *data == 'B') && *lexem == '0') { ++data; while (is_hex_char(*data) || *data == '\'') |