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

Function classifyFoldPointESCRIPT

scintilla/lexers/LexEScript.cxx:151–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149
150
151static int classifyFoldPointESCRIPT(const char* s, const char* prevWord) {
152 int lev = 0;
153 if (strcmp(prevWord, "end") == 0) return lev;
154 if ((strcmp(prevWord, "else") == 0 && strcmp(s, "if") == 0) || strcmp(s, "elseif") == 0)
155 return -1;
156
157 if (strcmp(s, "for") == 0 || strcmp(s, "foreach") == 0
158 || strcmp(s, "program") == 0 || strcmp(s, "function") == 0
159 || strcmp(s, "while") == 0 || strcmp(s, "case") == 0
160 || strcmp(s, "if") == 0 ) {
161 lev = 1;
162 } else if ( strcmp(s, "endfor") == 0 || strcmp(s, "endforeach") == 0
163 || strcmp(s, "endprogram") == 0 || strcmp(s, "endfunction") == 0
164 || strcmp(s, "endwhile") == 0 || strcmp(s, "endcase") == 0
165 || strcmp(s, "endif") == 0 ) {
166 lev = -1;
167 }
168
169 return lev;
170}
171
172
173static bool IsStreamCommentStyle(int style) {

Callers 1

FoldESCRIPTDocFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected