Lexer: Support the integer suffixes LU and LLU also

Before we only supported UL and ULL.

And add tests for all variants of allowed integer suffixes.

Fixes: QTCREATORBUG-25604
Change-Id: Id92f371d2effa7456d2d50891a6c29810c5c4c75
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Andre Hartmann
2021-04-17 18:15:31 +02:00
committed by André Hartmann
parent 2ae36b9e26
commit 2df71c5798
2 changed files with 48 additions and 0 deletions

View File

@@ -926,11 +926,15 @@ bool Lexer::scanOptionalIntegerSuffix(bool allowU)
yyinp();
if (_yychar == 'l')
yyinp();
if (_yychar == 'u' || _yychar == 'U')
yyinp();
return true;
case 'L':
yyinp();
if (_yychar == 'L')
yyinp();
if (_yychar == 'u' || _yychar == 'U')
yyinp();
return true;
default:
return false;