aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexers/LexProgress.cxx
diff options
context:
space:
mode:
authorMatt Gilarde <unknown>2017-03-07 12:05:15 +1100
committerMatt Gilarde <unknown>2017-03-07 12:05:15 +1100
commit996f8a51b5c4138baf95a032e5dc0901c80485f2 (patch)
tree602d7e2509b38c1974ba51e43758b327dc06c0e3 /lexers/LexProgress.cxx
parent069d842392251d56167e08c005d51fa9ccc12147 (diff)
downloadscintilla-mirror-996f8a51b5c4138baf95a032e5dc0901c80485f2.tar.gz
Handle nested comments for adjacent markers like "/*/*" or "*/*/".
Diffstat (limited to 'lexers/LexProgress.cxx')
-rw-r--r--lexers/LexProgress.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/lexers/LexProgress.cxx b/lexers/LexProgress.cxx
index 84956cd34..c82ca93ca 100644
--- a/lexers/LexProgress.cxx
+++ b/lexers/LexProgress.cxx
@@ -277,10 +277,15 @@ void SCI_METHOD LexerABL::Lex(Sci_PositionU startPos, Sci_Position length, int i
// commentNestingLevel is a non-visible state, used to identify the nesting level of a comment
if (checkCommentNestingLevel) {
- if (chPrev == '/' && ch == '*')
+ if (chPrev == '/' && ch == '*') {
commentNestingLevel++;
+ // eat the '/' so we don't miscount a */ if we see /*/*
+ --back;
+ }
if (chPrev == '*' && ch == '/') {
commentNestingLevel--;
+ // eat the '*' so we don't miscount a /* if we see */*/
+ --back;
}
}
--back;