MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / tm_skip_block_comment

Function tm_skip_block_comment

src/mcp/test_impact.c:327–343  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

325}
326
327static void tm_skip_block_comment(tm_lex_t *lx) {
328 lx->p += 2;
329 while (lx->p < lx->end) {
330 if (*lx->p == '*' && lx->p + 1 < lx->end && lx->p[1] == '/') {
331 lx->p += 2;
332 return;
333 }
334 if (*lx->p == '*' && tm_splice_len(lx->p + 1, lx->end)) {
335 tm_lex_uncertain(lx); /* the splice may close the comment */
336 }
337 if (*lx->p == '\n') {
338 lx->line++;
339 }
340 lx->p++;
341 }
342 tm_lex_uncertain(lx); /* EOF before the closing comment delimiter */
343}
344
345/* A string or character literal. It ends at its closing quote, or at the end
346 * of the line when the quote is missing, so one stray quote costs one line. */

Callers 2

tm_read_directiveFunction · 0.85
tm_nextFunction · 0.85

Calls 2

tm_splice_lenFunction · 0.85
tm_lex_uncertainFunction · 0.85

Tested by

no test coverage detected