From 6699732d9730e98751aaaf9d43a1901e1b29b572 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 18 Sep 2001 09:42:35 +0000 Subject: Added some comments. --- src/LexCPP.cxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/LexCPP.cxx b/src/LexCPP.cxx index 632eeab36..917ac55c8 100644 --- a/src/LexCPP.cxx +++ b/src/LexCPP.cxx @@ -72,6 +72,8 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo StyleContext sc(startPos, length, initStyle, styler); for (; sc.More(); sc.Forward()) { + + // Handle line continuation generically. if (sc.ch == '\\') { if (sc.Match("\\\n")) { sc.Forward(); @@ -86,6 +88,7 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo } } + // Determine if the current state should terminate. if (sc.state == SCE_C_OPERATOR) { sc.SetState(SCE_C_DEFAULT); } else if (sc.state == SCE_C_NUMBER) { @@ -176,6 +179,7 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo } } + // Determine if a new state should be entered. if (sc.state == SCE_C_DEFAULT) { if (sc.Match('@', '\"')) { sc.SetState(SCE_C_VERBATIM); @@ -226,6 +230,7 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo sc.SetState(SCE_C_OPERATOR); } } + if (sc.atLineEnd) { // Reset states to begining of colourise so no surprises // if different sets of lines lexed. -- cgit v1.2.3