Extract decorator names from preceding decorator/annotation nodes Count annotations inside a Java/Kotlin/C# "modifiers" node.
| 3605 | // Extract decorator names from preceding decorator/annotation nodes |
| 3606 | // Count annotations inside a Java/Kotlin/C# "modifiers" node. |
| 3607 | static int count_modifier_annotations(TSNode modifiers, const CBMLangSpec *spec) { |
| 3608 | int count = 0; |
| 3609 | uint32_t mc = ts_node_child_count(modifiers); |
| 3610 | for (uint32_t mi = 0; mi < mc; mi++) { |
| 3611 | TSNode mchild = ts_node_child(modifiers, mi); |
| 3612 | if (cbm_kind_in_set(mchild, spec->decorator_node_types)) { |
| 3613 | count++; |
| 3614 | } |
| 3615 | } |
| 3616 | return count; |
| 3617 | } |
| 3618 | |
| 3619 | // Find every wrapper child that holds annotations/attributes for languages |
| 3620 | // where they are nested under an intermediate node rather than being a |
no test coverage detected