aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/LexCPP.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/LexCPP.cxx')
-rw-r--r--src/LexCPP.cxx33
1 files changed, 4 insertions, 29 deletions
diff --git a/src/LexCPP.cxx b/src/LexCPP.cxx
index cad24a773..e6182e8d8 100644
--- a/src/LexCPP.cxx
+++ b/src/LexCPP.cxx
@@ -200,13 +200,10 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo
} else if (ch == '\"') {
styler.ColourTo(i, state);
state = SCE_C_DEFAULT;
- i++;
- ch = chNext;
- chNext = styler.SafeGetCharAt(i + 1);
- } else if (chNext == '\r' || chNext == '\n') {
+ } else if (chNext == '\r' || chNext == '\n') {
styler.ColourTo(i-1, SCE_C_STRINGEOL);
state = SCE_C_STRINGEOL;
- }
+ }
} else if (state == SCE_C_CHARACTER) {
if ((ch == '\r' || ch == '\n') && (chPrev != '\\')) {
styler.ColourTo(i-1, SCE_C_STRINGEOL);
@@ -220,37 +217,15 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo
} else if (ch == '\'') {
styler.ColourTo(i, state);
state = SCE_C_DEFAULT;
- i++;
- ch = chNext;
- chNext = styler.SafeGetCharAt(i + 1);
}
} else if (state == SCE_C_UUID) {
if (ch == '\r' || ch == '\n' || ch == ')') {
styler.ColourTo(i-1, state);
+ if (ch == ')')
+ styler.ColourTo(i, SCE_C_OPERATOR);
state = SCE_C_DEFAULT;
}
}
- if (state == SCE_C_DEFAULT) { // One of the above succeeded
- if (ch == '/' && chNext == '*') {
- if (styler.SafeGetCharAt(i + 2) == '*')
- state = SCE_C_COMMENTDOC;
- else
- state = SCE_C_COMMENT;
- } else if (ch == '/' && chNext == '/') {
- state = SCE_C_COMMENTLINE;
- } else if (ch == '\"') {
- state = SCE_C_STRING;
- } else if (ch == '\'') {
- state = SCE_C_CHARACTER;
- } else if (iswordstart(ch)) {
- state = SCE_C_WORD;
- } else if (isoperator(ch)) {
- styler.ColourTo(i, SCE_C_OPERATOR);
- if ((ch == '{') || (ch == '}')) {
- levelCurrent += (ch == '{') ? 1 : -1;
- }
- }
- }
}
chPrev = ch;
}