Debugger: Minor syntax highlighter fixes.

- Add missing if/else keywords.
- Add missing comma that was preventing some keywords from being
  recognized properly.
- Add missing handling of condition operator.
This commit is contained in:
Rene Gollent
2014-12-11 22:32:47 -05:00
parent db1df758b8
commit cbd3910d6d
3 changed files with 11 additions and 1 deletions
@@ -34,6 +34,7 @@ static const char* kLanguageKeywords[] = {
"do", "do",
"double", "double",
"dynamic_cast", "dynamic_cast",
"else",
"enum", "enum",
"explicit", "explicit",
"extern", "extern",
@@ -41,6 +42,7 @@ static const char* kLanguageKeywords[] = {
"float", "float",
"for", "for",
"goto", "goto",
"if",
"inline", "inline",
"int", "int",
"long", "long",
@@ -74,7 +76,7 @@ static const char* kLanguageKeywords[] = {
"using", "using",
"virtual", "virtual",
"void", "void",
"volatile" "volatile",
"while" "while"
}; };
@@ -346,6 +348,7 @@ CLanguageFamilySyntaxHighlightInfo::_MapTokenToSyntaxType(const Token& token)
case TOKEN_LT: case TOKEN_LT:
case TOKEN_LE: case TOKEN_LE:
case TOKEN_MEMBER_PTR: case TOKEN_MEMBER_PTR:
case TOKEN_CONDITION:
case TOKEN_COLON: case TOKEN_COLON:
case TOKEN_SEMICOLON: case TOKEN_SEMICOLON:
case TOKEN_BACKSLASH: case TOKEN_BACKSLASH:
@@ -376,6 +376,12 @@ Tokenizer::_ParseOperator()
length = 1; length = 1;
break; break;
case '?':
type = TOKEN_CONDITION;
length = 1;
break;
case '.': case '.':
type = TOKEN_MEMBER_PTR; type = TOKEN_MEMBER_PTR;
length = 1; length = 1;
@@ -58,6 +58,7 @@ enum {
TOKEN_LE, TOKEN_LE,
TOKEN_BACKSLASH, TOKEN_BACKSLASH,
TOKEN_CONDITION,
TOKEN_COLON, TOKEN_COLON,
TOKEN_SEMICOLON, TOKEN_SEMICOLON,
TOKEN_COMMA, TOKEN_COMMA,