MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / skipAnnotationsAndModifiers

Function skipAnnotationsAndModifiers

src/resolution/frameworks/java.ts:675–689  ·  view source on GitHub ↗
(from: number)

Source from the content-addressed store, hash-verified

673 const modifiers = lang === 'kotlin' ? KOTLIN_FUN_MODIFIERS : JAVA_METHOD_MODIFIERS;
674 // Annotations and modifiers come in any order (`public @ResponseBody String x()`).
675 const skipAnnotationsAndModifiers = (from: number): number => {
676 let i = from;
677 for (;;) {
678 i = skipSpace(s, i);
679 if (s[i] === '@') {
680 const annotation = readAnnotation(s, i, lang);
681 if (!annotation) return -1;
682 i = annotation.end;
683 continue;
684 }
685 const word = readIdentifier(s, i);
686 if (!word || !modifiers.has(word)) return i;
687 i += word.length;
688 }
689 };
690 let i = skipAnnotationsAndModifiers(at);
691 if (i < 0) return null;
692 if (lang === 'kotlin') {

Callers 1

annotatedMethodNameFunction · 0.85

Calls 4

readAnnotationFunction · 0.85
readIdentifierFunction · 0.85
hasMethod · 0.80
skipSpaceFunction · 0.70

Tested by

no test coverage detected