aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2011-07-02 13:39:57 +1000
committernyamatongwe <unknown>2011-07-02 13:39:57 +1000
commitc552a3adc68f97747922c10cf8b0b81cae3d31bb (patch)
treeee9fde0e37aad1948d919249cff37a33f45d220f
parent55041945468cd75dcf4e9c8fab36782200a54ceb (diff)
downloadscintilla-mirror-c552a3adc68f97747922c10cf8b0b81cae3d31bb.tar.gz
Recognise COBOL comments '*' in column 7 or '*>'. Bug #3014850.
From Gerrit.
-rw-r--r--doc/ScintillaHistory.html1
-rw-r--r--lexers/LexCOBOL.cxx8
2 files changed, 9 insertions, 0 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index 250cfd232..c4c67ec9f 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -379,6 +379,7 @@
<td>Jaime Gimeno</td>
<td>Thomas Linder Puls</td>
<td>Artyom Zuikov</td>
+ <td>Gerrit</td>
</tr>
</table>
<p>
diff --git a/lexers/LexCOBOL.cxx b/lexers/LexCOBOL.cxx
index a9a8f5519..b3bc011d6 100644
--- a/lexers/LexCOBOL.cxx
+++ b/lexers/LexCOBOL.cxx
@@ -208,6 +208,14 @@ static void ColouriseCOBOLDoc(unsigned int startPos, int length, int initStyle,
if (isCOBOLwordstart(ch) || (ch == '$' && isascii(chNext) && isalpha(chNext))) {
ColourTo(styler, i-1, state);
state = SCE_C_IDENTIFIER;
+ } else if (column == 6 && ch == '*') {
+ // Cobol comment line: asterisk in column 7.
+ ColourTo(styler, i-1, state);
+ state = SCE_C_COMMENTLINE;
+ } else if (ch == '*' && chNext == '>') {
+ // Cobol inline comment: asterisk, followed by greater than.
+ ColourTo(styler, i-1, state);
+ state = SCE_C_COMMENTLINE;
} else if (column == 0 && ch == '*' && chNext != '*') {
ColourTo(styler, i-1, state);
state = SCE_C_COMMENTLINE;