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

Function count_modifier_annotations

internal/cbm/extract_defs.c:1715–1725  ·  view source on GitHub ↗

Extract decorator names from preceding decorator/annotation nodes Count annotations inside a Java/Kotlin/C# "modifiers" node.

Source from the content-addressed store, hash-verified

1713// Extract decorator names from preceding decorator/annotation nodes
1714// Count annotations inside a Java/Kotlin/C# "modifiers" node.
1715static int count_modifier_annotations(TSNode modifiers, const CBMLangSpec *spec) {
1716 int count = 0;
1717 uint32_t mc = ts_node_child_count(modifiers);
1718 for (uint32_t mi = 0; mi < mc; mi++) {
1719 TSNode mchild = ts_node_child(modifiers, mi);
1720 if (cbm_kind_in_set(mchild, spec->decorator_node_types)) {
1721 count++;
1722 }
1723 }
1724 return count;
1725}
1726
1727// Find the wrapper child that holds annotations/attributes for languages where
1728// they are nested under an intermediate node rather than being a prev-sibling:

Callers 1

extract_decoratorsFunction · 0.85

Calls 1

cbm_kind_in_setFunction · 0.85

Tested by

no test coverage detected