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

Function IsLineComment

scintilla/lexers/LexOScript.cxx:377–391  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

375}
376
377static bool IsLineComment(int line, Accessor &styler) {
378 int pos = styler.LineStart(line);
379 int eolPos = styler.LineStart(line + 1) - 1;
380 for (int i = pos; i < eolPos; i++) {
381 char ch = styler[i];
382 char chNext = styler.SafeGetCharAt(i + 1);
383 int style = styler.StyleAt(i);
384 if (ch == '/' && chNext == '/' && style == SCE_OSCRIPT_LINE_COMMENT) {
385 return true;
386 } else if (!IsASpaceOrTab(ch)) {
387 return false;
388 }
389 }
390 return false;
391}
392
393static inline bool IsPreprocessor(int style) {
394 return style == SCE_OSCRIPT_PREPROCESSOR ||

Callers 1

FoldOScriptDocFunction · 0.85

Calls 4

IsASpaceOrTabFunction · 0.85
SafeGetCharAtMethod · 0.80
LineStartMethod · 0.45
StyleAtMethod · 0.45

Tested by

no test coverage detected