Debugger: Adjustments to syntax highlighter.

SyntaxHighlighter/CLanguageFamilySyntaxHighlighter/SourceView:
- TeamTypeInformation is now passed as a parameter when requesting parsing,
  so highlighters can make use of it to identify types. Adjust callers.

CLanguageFamilySyntaxHighlightInfo:
- Use TeamTypeInformation to check if identifiers map to types, and highlight
  accordingly if they do.
This commit is contained in:
Rene Gollent
2015-01-01 17:49:02 -05:00
parent d21bcbb0ac
commit 4d9388f389
6 changed files with 22 additions and 7 deletions
@@ -76,7 +76,7 @@ static rgb_color kSyntaxColors[] = {
{0, 0x64, 0, 255}, // SYNTAX_HIGHLIGHT_PREPROCESSOR_KEYWORD
{0, 0, 0, 255}, // SYNTAX_HIGHLIGHT_IDENTIFIER
{0x44, 0x8a, 0, 255}, // SYNTAX_HIGHLIGHT_OPERATOR
{0, 0, 0, 255}, // SYNTAX_HIGHLIGHT_TYPE
{0x70, 0x70, 0x70, 255}, // SYNTAX_HIGHLIGHT_TYPE
{0x85, 0x19, 0x19, 255}, // SYNTAX_HIGHLIGHT_NUMERIC_LITERAL
{0x3f, 0x48, 0x84, 255}, // SYNTAX_HIGHLIGHT_STRING_LITERAL
{0xa1, 0x64, 0xe, 255}, // SYNTAX_HIGHLIGHT_COMMENT
@@ -2254,7 +2254,8 @@ SourceView::SetSourceCode(SourceCode* sourceCode)
if (highlighter != NULL) {
BReference<SyntaxHighlighter> syntaxReference(highlighter,
true);
highlighter->ParseText(fSourceCode, fCurrentSyntaxInfo);
highlighter->ParseText(fSourceCode,
fTeam->GetTeamTypeInformation(), fCurrentSyntaxInfo);
}
}
}