MCPcopy Create free account
hub / github.com/cxasm/notepad-- / IsCommentLine

Method IsCommentLine

src/qscint/scintilla/lexers/LexSQL.cpp:374–386  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

372 }
373
374 bool IsCommentLine (Sci_Position line, LexAccessor &styler) {
375 Sci_Position pos = styler.LineStart(line);
376 Sci_Position eol_pos = styler.LineStart(line + 1) - 1;
377 for (Sci_Position i = pos; i + 1 < eol_pos; i++) {
378 int style = styler.StyleAt(i);
379 // MySQL needs -- comments to be followed by space or control char
380 if (style == SCE_SQL_COMMENTLINE && styler.Match(i, "--"))
381 return true;
382 else if (!IsASpaceOrTab(styler[i]))
383 return false;
384 }
385 return false;
386 }
387
388 OptionsSQL options;
389 OptionSetSQL osSQL;

Callers

nothing calls this directly

Calls 4

IsASpaceOrTabFunction · 0.85
LineStartMethod · 0.45
StyleAtMethod · 0.45
MatchMethod · 0.45

Tested by

no test coverage detected