C++: Fix lexing of >> / >>=

The current code always ends up setting the token to T_GREATER_GREATER.

Change-Id: If75ff1f5bccffd5918ec2bf491724cd0981220ae
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Philip Lorenz
2015-09-22 23:21:08 +02:00
committed by Orgad Shaneh
parent c8ef91f789
commit c0f3094866
2 changed files with 82 additions and 3 deletions

View File

@@ -630,9 +630,9 @@ void Lexer::scan_helper(Token *tok)
if (_yychar == '=') {
yyinp();
tok->f.kind = T_GREATER_GREATER_EQUAL;
} else
tok->f.kind = T_LESS_LESS;
tok->f.kind = T_GREATER_GREATER;
} else {
tok->f.kind = T_GREATER_GREATER;
}
} else if (_yychar == '=') {
yyinp();
tok->f.kind = T_GREATER_EQUAL;