Syntax highlighting for "super" keyword, closes #680

dev-time-step
krzys-h 2015-11-21 14:00:38 +01:00
parent b0dbb11fac
commit 2ed1494574
3 changed files with 2 additions and 4 deletions

View File

@ -117,7 +117,6 @@ const std::map<EID,const char *> CBotString::s_keywordString =
{ID_MODULO, "%"},
{ID_POWER, "**"},
{ID_ASSMODULO, "%="},
{ID_SUPER, "super"},
{TX_UNDEF, "undefined"},
{TX_NAN, "not a number"}
};

View File

@ -112,8 +112,7 @@ enum EID
ID_POWER,
ID_ASSMODULO,
TX_UNDEF = 4000,
TX_NAN,
ID_SUPER = 6000
TX_NAN
};
// TODO: refactor & change to enum!

View File

@ -666,7 +666,7 @@ void CScript::ColorizeScript(Ui::CEdit* edit, int rangeStart, int rangeEnd)
{
color = Gfx::FONT_HIGHLIGHT_TOKEN;
}
else if (type == TokenTypVar && strcmp(token, "this") == 0) // this
else if (type == TokenTypVar && (strcmp(token, "this") == 0 || strcmp(token, "super") == 0)) // this, super
{
color = Gfx::FONT_HIGHLIGHT_THIS;
}