summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCinder <cinder.roxley@phoenixviewer.com>2014-06-08 18:28:10 -0600
committerCinder <cinder.roxley@phoenixviewer.com>2014-06-08 18:28:10 -0600
commitb06e63acedbbbc0dafe24a04e866fcb4363601e8 (patch)
tree82128d561f12eb46285461132b2f9a66504fc1e2
parent6a6508f0fdcf5964018289315d7b6e6a62696a7e (diff)
Fix lsl constant highlighting and sort the if-else chain to parse a little quicker
-rwxr-xr-xindra/llui/llkeywords.cpp30
1 files changed, 18 insertions, 12 deletions
diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp
index 95bdfa6fb3..75773d7dfd 100755
--- a/indra/llui/llkeywords.cpp
+++ b/indra/llui/llkeywords.cpp
@@ -173,37 +173,43 @@ 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")
+ if (key_in == "functions")
{
- color_group = "SyntaxLslConstant";
+ color_group = "SyntaxLslFunction";
}
else if (key_in == "controls")
{
color_group = "SyntaxLslControlFlow";
}
- else if (key_in == "misc-flow-label")
+ else if (key_in == "events")
{
- color_group = "SyntaxLslControlFlow";
+ color_group = "SyntaxLslEvent";
}
- else if (key_in =="deprecated")
+ else if (key_in == "types")
{
- color_group = "SyntaxLslDeprecated";
+ color_group = "SyntaxLslDataType";
}
- else if (key_in == "events")
+ else if (key_in == "misc-flow-label")
{
- color_group = "SyntaxLslEvent";
+ color_group = "SyntaxLslControlFlow";
}
- else if (key_in == "functions")
+ else if (key_in =="deprecated")
{
- color_group = "SyntaxLslFunction";
+ color_group = "SyntaxLslDeprecated";
}
else if (key_in =="god-mode")
{
color_group = "SyntaxLslGodMode";
}
- else if (key_in == "types")
+ else if (key_in == "constants"
+ || key_in == "constants-integer"
+ || key_in == "constants-float"
+ || key_in == "constants-string"
+ || key_in == "constants-key"
+ || key_in == "constants-rotation"
+ || key_in == "constants-vector")
{
- color_group = "SyntaxLslDataType";
+ color_group = "SyntaxLslConstant";
}
else
{