summaryrefslogtreecommitdiff
path: root/indra/llui/llkeywords.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2025-02-12 17:18:31 +0200
committerGitHub <noreply@github.com>2025-02-12 17:18:31 +0200
commit23ac8f603ea2e590b47598edf0fd6824f168fc0b (patch)
treec3d9eb897785b59e30fd53adb8b511767f158881 /indra/llui/llkeywords.cpp
parent5029f0322f264e17f7509952f7bf9812db17a9ec (diff)
parentad7dee8aa08bb6207f95a50c8d1eeb55e8e0d81e (diff)
Merge pull request #3535 from secondlife/marchcat/lua_editor
Lua editor: initial PR to start the project viewer
Diffstat (limited to 'indra/llui/llkeywords.cpp')
-rw-r--r--indra/llui/llkeywords.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp
index 7bf43c22c1..bc2247e7e9 100644
--- a/indra/llui/llkeywords.cpp
+++ b/indra/llui/llkeywords.cpp
@@ -239,6 +239,10 @@ void LLKeywords::processTokens()
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", "\"" );
+ // Lua-style comments
+ addToken(LLKeywordToken::TT_ONE_SIDED_DELIMITER, "--", LLUIColorTable::instance().getColor("SyntaxLslComment"), "Comment (Lua-style single-line)\nNon-functional commentary or disabled code", delimiter);
+ addToken(LLKeywordToken::TT_TWO_SIDED_DELIMITER, "--[[", LLUIColorTable::instance().getColor("SyntaxLslComment"), "Comment (Lua-style multi-line)\nNon-functional commentary or disabled code", "]]");
+
LLSD::map_iterator itr = mSyntax.beginMap();
for ( ; itr != mSyntax.endMap(); ++itr)
{
@@ -627,7 +631,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
if( *cur )
{
- cur += cur_delimiter->getLengthHead();
+ cur += cur_delimiter->getLengthTail();
seg_end = seg_start + between_delimiters + cur_delimiter->getLengthHead() + cur_delimiter->getLengthTail();
}
else