MCPcopy Create free account
hub / github.com/Effect-TS/effect / skipDirectiveComments

Function skipDirectiveComments

packages/tools/jsdocs/src/Jsdocs.ts:874–883  ·  view source on GitHub ↗
(source: string, end: number)

Source from the content-addressed store, hash-verified

872}
873
874function skipDirectiveComments(source: string, end: number): number {
875 while (end > 0) {
876 const lineStart = source.lastIndexOf("\n", end - 1) + 1
877 if (!isSkippableDirectiveComment(source.slice(lineStart, end))) {
878 return end
879 }
880 end = skipWhitespace(source, lineStart)
881 }
882 return end
883}
884
885/**
886 * Finds the JSDoc block immediately preceding an AST node.

Callers 1

findLeadingJSDocFunction · 0.85

Calls 2

skipWhitespaceFunction · 0.85

Tested by

no test coverage detected