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

Function IsDocCommentStart

scintilla/lexers/LexOScript.cxx:93–101  ·  view source on GitHub ↗

Checks if the current line starts with the preprocessor directive used usually to introduce documentation comments: #ifdef DOC. This method is supposed to be called if the line has been recognized as a preprocessor directive already.

Source from the content-addressed store, hash-verified

91// supposed to be called if the line has been recognized as a preprocessor
92// directive already.
93static bool IsDocCommentStart(StyleContext &sc) {
94 // Check the line back to its start only if the end looks promising.
95 if (sc.LengthCurrent() == 10 && !IsAlphaNumeric(sc.ch)) {
96 char s[11];
97 sc.GetCurrentLowered(s, sizeof(s));
98 return strcmp(s, "#ifdef doc") == 0;
99 }
100 return false;
101}
102
103// Checks if the current line starts with the preprocessor directive that
104// is complementary to the #ifdef DOC start: #endif. This method is supposed

Callers 1

ColouriseOScriptDocFunction · 0.85

Calls 3

IsAlphaNumericFunction · 0.85
LengthCurrentMethod · 0.80
GetCurrentLoweredMethod · 0.80

Tested by

no test coverage detected