diff options
| -rw-r--r-- | include/SciLexer.h | 1 | ||||
| -rw-r--r-- | include/Scintilla.iface | 1 | ||||
| -rw-r--r-- | src/LexCPP.cxx | 19 | 
3 files changed, 20 insertions, 1 deletions
| diff --git a/include/SciLexer.h b/include/SciLexer.h index 950f0cf48..cb52493c2 100644 --- a/include/SciLexer.h +++ b/include/SciLexer.h @@ -56,6 +56,7 @@  #define SCE_C_OPERATOR 10  #define SCE_C_IDENTIFIER 11  #define SCE_C_STRINGEOL 12 +#define SCE_C_VERBATIM 13  // Lexical states for SCLEX_HTML, SCLEX_XML  #define SCE_H_DEFAULT 0 diff --git a/include/Scintilla.iface b/include/Scintilla.iface index 37c6baf61..c691ad386 100644 --- a/include/Scintilla.iface +++ b/include/Scintilla.iface @@ -1097,6 +1097,7 @@ val SCE_C_PREPROCESSOR=9  val SCE_C_OPERATOR=10  val SCE_C_IDENTIFIER=11  val SCE_C_STRINGEOL=12 +val SCE_C_VERBATIM=13  val SCE_H_DEFAULT=0  val SCE_H_TAG=1  val SCE_H_TAGUNKNOWN=2 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); | 
