diff options
author | Cinder <cinder.roxley@phoenixviewer.com> | 2014-06-04 12:52:27 -0600 |
---|---|---|
committer | Cinder <cinder.roxley@phoenixviewer.com> | 2014-06-04 12:52:27 -0600 |
commit | 4170ae1027b1c8e5f63b0e6c4c9f919d8d3b66c0 (patch) | |
tree | 3a8976d682698aff6150b4fe360601a7ba63dbe9 /indra/llui/llkeywords.cpp | |
parent | 7e8d4ca3b1d96b5573aab99015f431147e6c6965 (diff) |
STORM-2025: Part 2 - After consulting with Oz, remove subcategories of constants and fix highlighting
Diffstat (limited to 'indra/llui/llkeywords.cpp')
-rwxr-xr-x | indra/llui/llkeywords.cpp | 44 |
1 files changed, 6 insertions, 38 deletions
diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index 8b5fb54877..9be15d8f1d 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -173,29 +173,9 @@ std::string LLKeywords::getAttribute(const std::string& key) LLColor4 LLKeywords::getColorGroup(const std::string& key_in) { std::string color_group = "ScriptText"; - if (key_in == "constants-float") + if (key_in == "constants") { - color_group = "SyntaxLslConstantFloat"; - } - else if (key_in == "constants-integer") - { - color_group = "SyntaxLslConstantInteger"; - } - else if (key_in == "constants-key") - { - color_group = "SyntaxLslConstantKey"; - } - else if (key_in == "constants-rotation") - { - color_group = "SyntaxLslConstantRotation"; - } - else if (key_in == "constants-string") - { - color_group = "SyntaxLslConstantString"; - } - else if (key_in == "constants-vector") - { - color_group = "SyntaxLslConstantVector"; + color_group = "SyntaxLslConstant"; } else if (key_in == "controls") { @@ -229,18 +209,6 @@ LLColor4 LLKeywords::getColorGroup(const std::string& key_in) { color_group = "SyntaxLslSection"; } - else if (key_in == "misc-double_quotation_marks") - { - color_group = "SyntaxLslStringLiteral"; - } - else if (key_in == "misc-comments_1_sided") - { - color_group = "SyntaxLslComment"; - } - else if (key_in == "misc-comments_2_sided") - { - color_group = "SyntaxLslComment"; - } else { LL_WARNS("SyntaxLSL") << "Color key '" << key_in << "' not recognized." << LL_ENDL; @@ -265,9 +233,9 @@ void LLKeywords::processTokens() // Add 'standard' stuff: Quotes, Comments, Strings, Labels, etc. before processing the LLSD std::string delimiter; addToken(LLKeywordToken::TT_LABEL, "@", getColorGroup("misc-flow-label"), "Label\nTarget for jump statement", delimiter ); - addToken(LLKeywordToken::TT_ONE_SIDED_DELIMITER, "//", getColorGroup("misc-comments_1_sided"), "Comment (single-line)\nNon-functional commentary or disabled code", delimiter ); - addToken(LLKeywordToken::TT_TWO_SIDED_DELIMITER, "/*", getColorGroup("misc-comments_2_sided"), "Comment (multi-line)\nNon-functional commentary or disabled code", "*/" ); - addToken(LLKeywordToken::TT_DOUBLE_QUOTATION_MARKS, "\"", getColorGroup("misc-double_quotation_marks"), "String literal", "\"" ); + addToken(LLKeywordToken::TT_ONE_SIDED_DELIMITER, "//", LLUIColorTable::instance().getColor("SyntaxLslComment"), "Comment (single-line)\nNon-functional commentary or disabled code", delimiter ); + addToken(LLKeywordToken::TT_TWO_SIDED_DELIMITER, "/*", LLUIColorTable::instance().getColor("SyntaxLslComment"), "Comment (multi-line)\nNon-functional commentary or disabled code", "*/" ); + addToken(LLKeywordToken::TT_DOUBLE_QUOTATION_MARKS, "\"", LLUIColorTable::instance().getColor("SyntaxLslStringLiteral"), "String literal", "\"" ); LLSD::map_iterator itr = mSyntax.beginMap(); for ( ; itr != mSyntax.endMap(); ++itr) @@ -401,7 +369,7 @@ void LLKeywords::processTokensGroup(const LLSD& tokens, const std::string& group else if (tokens.isArray()) // Currently nothing should need this, but it's here for completeness { LL_INFOS("SyntaxLSL") << "Curious, shouldn't be an array here; adding all using color " << color << LL_ENDL; - for (int count = 0; count < tokens.size(); ++count) + for (S32 count = 0; count < tokens.size(); ++count) { addToken(token_type, tokens[count], color, ""); } |