aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/LexCPP.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2000-08-22 14:02:17 +0000
committernyamatongwe <unknown>2000-08-22 14:02:17 +0000
commit23664a1c4481659558753466678f00fca81737dd (patch)
treeae5006e09bee63417cbfab0a26cdd1ec6f5e65d6 /src/LexCPP.cxx
parent77c12d71d49849b769eaf1874c1a9a32ba496ceb (diff)
downloadscintilla-mirror-23664a1c4481659558753466678f00fca81737dd.tar.gz
Added C# support to LexCPP with verbatime string literals and @ quoted
keywords handled correctly.
Diffstat (limited to 'src/LexCPP.cxx')
-rw-r--r--src/LexCPP.cxx19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/LexCPP.cxx b/src/LexCPP.cxx
index 4f70e9bd3..b6358ab33 100644
--- a/src/LexCPP.cxx
+++ b/src/LexCPP.cxx
@@ -94,7 +94,13 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo
}
if (state == SCE_C_DEFAULT) {
- if (iswordstart(ch)) {
+ if (ch == '@' && chNext == '\"') {
+ styler.ColourTo(i-1, state);
+ state = SCE_C_VERBATIM;
+ i++;
+ ch = chNext;
+ chNext = styler.SafeGetCharAt(i + 1);
+ } else if (iswordstart(ch) || (ch == '@')) {
styler.ColourTo(i-1, state);
if (lastWordWasUUID) {
state = SCE_C_UUID;
@@ -220,6 +226,17 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo
styler.ColourTo(i, state);
state = SCE_C_DEFAULT;
}
+ } else if (state == SCE_C_VERBATIM) {
+ if (ch == '\"') {
+ if (chNext == '\"') {
+ i++;
+ ch = chNext;
+ chNext = styler.SafeGetCharAt(i + 1);
+ } else {
+ styler.ColourTo(i, state);
+ state = SCE_C_DEFAULT;
+ }
+ }
} else if (state == SCE_C_UUID) {
if (ch == '\r' || ch == '\n' || ch == ')') {
styler.ColourTo(i-1, state);