Kaydet (Commit) d6278f33 authored tarafından Colomban Wendling's avatar Colomban Wendling

Make hightlighting of triple-quoted verbatim an option

Backport from Scintilla HG (3602:5536ed81a85b).

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5696 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 20bab74f
2011-04-08 Colomban Wendling <colomban(at)geany(dot)org>
* scintilla/lexers/LexCPP.cxx:
Make hightlighting of triple-quoted verbatim an option (Backport
from Scintilla HG 3602:5536ed81a85b).
2011-04-05 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/templates.c:
......
......@@ -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,
......@@ -758,7 +763,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))) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment