| 414 | } |
| 415 | |
| 416 | static void UpdatePreprocessorFoldLevel(int &levelCurrent, |
| 417 | Sci_PositionU startPos, Accessor &styler) { |
| 418 | char s[7]; // Size of the longest possible keyword + null. |
| 419 | GetForwardWordLowered(startPos, styler, s, sizeof(s)); |
| 420 | |
| 421 | if (strcmp(s, "ifdef") == 0 || |
| 422 | strcmp(s, "ifndef") == 0) { |
| 423 | levelCurrent++; |
| 424 | } else if (strcmp(s, "endif") == 0) { |
| 425 | levelCurrent--; |
| 426 | if (levelCurrent < SC_FOLDLEVELBASE) { |
| 427 | levelCurrent = SC_FOLDLEVELBASE; |
| 428 | } |
| 429 | } |
| 430 | } |
| 431 | |
| 432 | static void UpdateKeywordFoldLevel(int &levelCurrent, Sci_PositionU lastStart, |
| 433 | Sci_PositionU currentPos, Accessor &styler) { |
no test coverage detected