aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2001-09-18 09:42:35 +0000
committernyamatongwe <devnull@localhost>2001-09-18 09:42:35 +0000
commitaa780b6acc5add54aa49746e587506fb19283376 (patch)
tree3890c2714ecb1c9bb4f4fc56f2a5fa9b21d36ec3 /src
parent6869f9297e8f2c4b3a24982088e2bce6379264da (diff)
downloadscintilla-mirror-aa780b6acc5add54aa49746e587506fb19283376.tar.gz
Added some comments.
Diffstat (limited to 'src')
-rw-r--r--src/LexCPP.cxx5
1 files changed, 5 insertions, 0 deletions
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.