diff options
| author | nyamatongwe <unknown> | 2011-04-05 09:31:51 +1000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2011-04-05 09:31:51 +1000 | 
| commit | de6567907167d00f480d3353e62b714b5a6bab19 (patch) | |
| tree | e6a55c7b5d6021290b3df735be113008b8f8dd48 | |
| parent | 0f4acb26a5c0ea7f2d233418ba30900e5e141980 (diff) | |
| download | scintilla-mirror-de6567907167d00f480d3353e62b714b5a6bab19.tar.gz | |
Make highlight of triple-quoted an option. Bug #3239234.
Property name is lexer.cpp.triplequoted.strings.
From Marko Njezic.
| -rw-r--r-- | lexers/LexCPP.cxx | 7 | 
1 files changed, 6 insertions, 1 deletions
diff --git a/lexers/LexCPP.cxx b/lexers/LexCPP.cxx index 0d5f2afb7..65525a679 100644 --- a/lexers/LexCPP.cxx +++ b/lexers/LexCPP.cxx @@ -208,6 +208,7 @@ struct OptionsCPP {  	bool identifiersAllowDollars;  	bool trackPreprocessor;  	bool updatePreprocessor; +	bool triplequotedStrings;  	bool fold;  	bool foldSyntaxBased;  	bool foldComment; @@ -224,6 +225,7 @@ struct OptionsCPP {  		identifiersAllowDollars = true;  		trackPreprocessor = true;  		updatePreprocessor = true; +		triplequotedStrings = false;  		fold = false;  		foldSyntaxBased = true;  		foldComment = false; @@ -263,6 +265,9 @@ struct OptionSetCPP : public OptionSet<OptionsCPP> {  		DefineProperty("lexer.cpp.update.preprocessor", &OptionsCPP::updatePreprocessor,  			"Set to 1 to update preprocessor definitions when #define found."); +		DefineProperty("lexer.cpp.triplequoted.strings", &OptionsCPP::triplequotedStrings, +			"Set to 1 to enable highlighting of triple-quoted strings."); +  		DefineProperty("fold", &OptionsCPP::fold);  		DefineProperty("fold.cpp.syntax.based", &OptionsCPP::foldSyntaxBased, @@ -760,7 +765,7 @@ void SCI_METHOD LexerCPP::Lex(unsigned int startPos, int length, int initStyle,  			if (sc.Match('@', '\"')) {  				sc.SetState(SCE_C_VERBATIM|activitySet);  				sc.Forward(); -			} else if (sc.Match("\"\"\"")) { +			} else if (options.triplequotedStrings && sc.Match("\"\"\"")) {  				sc.SetState(SCE_C_TRIPLEVERBATIM|activitySet);  				sc.Forward(2);  			} else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {  | 
