aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2014-07-08 10:53:03 +1000
committerNeil <nyamatongwe@gmail.com>2014-07-08 10:53:03 +1000
commit126d13674fa63256b6576e5317791b6f77ebefb3 (patch)
treeddca71b2716c8482667f00e83b5941dff572ed33
parentae8e06d8621069fbb3ae056728bcc48650098928 (diff)
downloadscintilla-mirror-126d13674fa63256b6576e5317791b6f77ebefb3.tar.gz
Feature [feature-requests:#1053]. Add a block comment state.
-rw-r--r--doc/ScintillaHistory.html5
-rw-r--r--include/SciLexer.h1
-rw-r--r--include/Scintilla.iface1
-rw-r--r--lexers/LexKix.cxx7
4 files changed, 14 insertions, 0 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index 7ef54b65d..ecb9f4a0a 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -448,6 +448,7 @@
</tr><tr>
<td>nkmathew</td>
<td>Andreas Tscharner</td>
+ <td>Lee Wilmott</td>
</tr>
</table>
<p>
@@ -467,6 +468,10 @@
Released 3 July 2014.
</li>
<li>
+ KiXtart lexer adds a block comment state.
+ <a href="http://sourceforge.net/p/scintilla/feature-requests/1053/">Feature #1053.</a>
+ </li>
+ <li>
Bug fixed where style data was stale when deleting a rectangular selection.
</li>
<li>
diff --git a/include/SciLexer.h b/include/SciLexer.h
index 54cc8ba7e..297843e29 100644
--- a/include/SciLexer.h
+++ b/include/SciLexer.h
@@ -906,6 +906,7 @@
#define SCE_KIX_KEYWORD 7
#define SCE_KIX_FUNCTIONS 8
#define SCE_KIX_OPERATOR 9
+#define SCE_KIX_COMMENTSTREAM 10
#define SCE_KIX_IDENTIFIER 31
#define SCE_GC_DEFAULT 0
#define SCE_GC_COMMENTLINE 1
diff --git a/include/Scintilla.iface b/include/Scintilla.iface
index 3e5f51b9c..297cea140 100644
--- a/include/Scintilla.iface
+++ b/include/Scintilla.iface
@@ -3567,6 +3567,7 @@ val SCE_KIX_MACRO=6
val SCE_KIX_KEYWORD=7
val SCE_KIX_FUNCTIONS=8
val SCE_KIX_OPERATOR=9
+val SCE_KIX_COMMENTSTREAM=10
val SCE_KIX_IDENTIFIER=31
# Lexical states for SCLEX_GUI4CLI
lex Gui4Cli=SCLEX_GUI4CLI SCE_GC_
diff --git a/lexers/LexKix.cxx b/lexers/LexKix.cxx
index 32af263fd..dc509e4ca 100644
--- a/lexers/LexKix.cxx
+++ b/lexers/LexKix.cxx
@@ -4,6 +4,7 @@
**/
// Copyright 2004 by Manfred Becker <manfred@becker-trdf.de>
// The License.txt file describes the conditions under which this software may be distributed.
+// Edited by Lee Wilmott (24-Jun-2014) added support for block comments
#include <stdlib.h>
#include <string.h>
@@ -54,6 +55,10 @@ static void ColouriseKixDoc(unsigned int startPos, int length, int initStyle,
if (sc.atLineEnd) {
sc.SetState(SCE_KIX_DEFAULT);
}
+ } else if (sc.state == SCE_KIX_COMMENTSTREAM) {
+ if (sc.ch == '/' && sc.chPrev == '*') {
+ sc.ForwardSetState(SCE_KIX_DEFAULT);
+ }
} else if (sc.state == SCE_KIX_STRING1) {
// This is a doubles quotes string
if (sc.ch == '\"') {
@@ -104,6 +109,8 @@ static void ColouriseKixDoc(unsigned int startPos, int length, int initStyle,
if (sc.state == SCE_KIX_DEFAULT) {
if (sc.ch == ';') {
sc.SetState(SCE_KIX_COMMENT);
+ } else if (sc.ch == '/' && sc.chNext == '*') {
+ sc.SetState(SCE_KIX_COMMENTSTREAM);
} else if (sc.ch == '\"') {
sc.SetState(SCE_KIX_STRING1);
} else if (sc.ch == '\'') {