MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / UpdatePreprocessorFoldLevel

Function UpdatePreprocessorFoldLevel

scintilla/lexers/LexOScript.cxx:418–432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

FoldOScriptDocFunction · 0.85

Calls 1

GetForwardWordLoweredFunction · 0.85

Tested by

no test coverage detected