aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2001-09-18 09:42:35 +0000
committernyamatongwe <unknown>2001-09-18 09:42:35 +0000
commit6699732d9730e98751aaaf9d43a1901e1b29b572 (patch)
tree3890c2714ecb1c9bb4f4fc56f2a5fa9b21d36ec3
parentd3f80935283416d18d97d3f3a582ab6f8e303867 (diff)
downloadscintilla-mirror-6699732d9730e98751aaaf9d43a1901e1b29b572.tar.gz
Added some comments.
-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.