From f2749ccb2d9dbf953733900f02aa0baa6e695cd7 Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 8 Jul 2014 10:53:03 +1000 Subject: Feature [feature-requests:#1053]. Add a block comment state. --- lexers/LexKix.cxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lexers') 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 // 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 #include @@ -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 == '\'') { -- cgit v1.2.3