Commit a5900877 authored by Leandro Melo's avatar Leandro Melo

C++: Lex correctly a u8"literal"

Previously it was considering invalid things `such as U8"literal".

Change-Id: Icf4d051a26617ac2c6cb35d5a98f8af0ed801556
Reviewed-by: default avatarRoberto Raggi <roberto.raggi@nokia.com>
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent df0d3c28
......@@ -579,8 +579,7 @@ void Lexer::scan_helper(Token *tok)
} else if (_yychar == '\'') {
yyinp();
scanCharLiteral(tok, ch);
} else {
if (_yychar == '8') {
} else if (ch == 'u' && _yychar == '8') {
unsigned char la = 0;
if (_currentChar + 1 != _lastChar)
la = *(_currentChar + 1);
......@@ -598,7 +597,6 @@ void Lexer::scan_helper(Token *tok)
} else {
scanIdentifier(tok);
}
}
} else if (std::isalpha(ch) || ch == '_' || ch == '$') {
scanIdentifier(tok);
} else if (std::isdigit(ch)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment