diff options
| author | oirfeodent <unknown> | 2017-10-15 23:34:03 -0700 |
|---|---|---|
| committer | oirfeodent <unknown> | 2017-10-15 23:34:03 -0700 |
| commit | b086b4d30fee49c09184b2145e3a222925ac3fc8 (patch) | |
| tree | fc01e9562b50129d8df2e42e7f38488565d373b2 | |
| parent | 78c428e40329717e68b4d02d0c1ec6cbb01428cc (diff) | |
| download | scintilla-mirror-b086b4d30fee49c09184b2145e3a222925ac3fc8.tar.gz | |
Apply patch set #6396 to LongTerm3 Branch.
New pre_processor added recently to baan.
Baan lexer and folder support #context_on / #context_off preprocessor feature.
| -rw-r--r-- | lexers/LexBaan.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lexers/LexBaan.cxx b/lexers/LexBaan.cxx index 8922df1ad..f6b90a63e 100644 --- a/lexers/LexBaan.cxx +++ b/lexers/LexBaan.cxx @@ -509,7 +509,8 @@ void SCI_METHOD LexerBaan::Lex(Sci_PositionU startPos, Sci_Position length, int char word[1000]; int wordlen = 0; - std::string preProcessorTags[11] = { "#define", "#elif", "#else", "#endif", + std::string preProcessorTags[13] = { "#context_off", "#context_on", + "#define", "#elif", "#else", "#endif", "#ident", "#if", "#ifdef", "#ifndef", "#include", "#pragma", "#undef" }; LexAccessor styler(pAccess); @@ -690,7 +691,7 @@ void SCI_METHOD LexerBaan::Lex(Sci_PositionU startPos, Sci_Position length, int word[wordlen++] = sc.ch; word[wordlen++] = '\0'; } - if (!wordInArray(word, preProcessorTags, 11)) + if (!wordInArray(word, preProcessorTags, 13)) // Colorise only preprocessor built in Baan. sc.ChangeState(SCE_BAAN_IDENTIFIER); if (strcmp(word, "#pragma") == 0 || strcmp(word, "#include") == 0) { @@ -802,9 +803,10 @@ void SCI_METHOD LexerBaan::Fold(Sci_PositionU startPos, Sci_Position length, int else if (style == SCE_BAAN_PREPROCESSOR) { // folds #ifdef/#if/#ifndef - they are not part of the IsPreProcLine folding. if (ch == '#') { - if (styler.Match(i, "#ifdef") || styler.Match(i, "#if") || styler.Match(i, "#ifndef")) + if (styler.Match(i, "#ifdef") || styler.Match(i, "#if") || styler.Match(i, "#ifndef") + || styler.Match(i, "#context_on")) levelCurrent++; - else if (styler.Match(i, "#endif")) + else if (styler.Match(i, "#endif") || styler.Match(i, "#context_off")) levelCurrent--; } } |
