[colobot] 47/377: Syntax highlighting for "super" keyword, closes #680
Didier Raboud
odyx at moszumanska.debian.org
Wed Mar 30 13:33:56 UTC 2016
This is an automated email from the git hooks/post-receive script.
odyx pushed a commit to branch debian/master
in repository colobot.
commit 2ed1494574c05b4b0ec11d5a75177b632579aaad
Author: krzys-h <krzys_h at interia.pl>
Date: Sat Nov 21 14:00:38 2015 +0100
Syntax highlighting for "super" keyword, closes #680
---
src/CBot/CBotString.cpp | 1 -
src/CBot/resource.h | 3 +--
src/script/script.cpp | 2 +-
3 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/CBot/CBotString.cpp b/src/CBot/CBotString.cpp
index 52e63a3..24085ba 100644
--- a/src/CBot/CBotString.cpp
+++ b/src/CBot/CBotString.cpp
@@ -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"}
};
diff --git a/src/CBot/resource.h b/src/CBot/resource.h
index 4e5bf55..3b0a1a8 100644
--- a/src/CBot/resource.h
+++ b/src/CBot/resource.h
@@ -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!
diff --git a/src/script/script.cpp b/src/script/script.cpp
index c44746b..9bfb1da 100644
--- a/src/script/script.cpp
+++ b/src/script/script.cpp
@@ -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;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git
More information about the Pkg-games-commits
mailing list