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

Function skipAnnotationsAndModifiers

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

Source from the content-addressed store, hash-verified

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