Commit 0db55795 authored by hjk's avatar hjk
Browse files

CPlusPlus: Fix parsing of <: :> <% %> %: digraphs



See 2.5/2.12. Most useful feature ever.

Change-Id: I3f92256733e15078df56205dba9746ffff8ed145
Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
parent 21871959
......@@ -269,6 +269,9 @@ void Lexer::scan_helper(Token *tok)
if (_yychar == ':') {
yyinp();
tok->f.kind = T_COLON_COLON;
} else if (_yychar == '>') {
yyinp();
tok->f.kind = T_RBRACKET;
} else {
tok->f.kind = T_COLON;
}
......@@ -428,6 +431,12 @@ void Lexer::scan_helper(Token *tok)
if (_yychar == '=') {
yyinp();
tok->f.kind = T_PERCENT_EQUAL;
} else if (_yychar == '>') {
yyinp();
tok->f.kind = T_RBRACE;
} else if (_yychar == ':') {
yyinp();
tok->f.kind = T_POUND;
} else {
tok->f.kind = T_PERCENT;
}
......@@ -515,6 +524,12 @@ void Lexer::scan_helper(Token *tok)
} else if (_yychar == '=') {
yyinp();
tok->f.kind = T_LESS_EQUAL;
} else if (_yychar == ':') {
yyinp();
tok->f.kind = T_LBRACKET;
} else if (_yychar == '%') {
yyinp();
tok->f.kind = T_LBRACE;
} else {
tok->f.kind = T_LESS;
}
......
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