Extract decorator names from preceding decorator/annotation nodes Count annotations inside a Java/Kotlin/C# "modifiers" node.
| 1860 | // Extract decorator names from preceding decorator/annotation nodes |
| 1861 | // Count annotations inside a Java/Kotlin/C# "modifiers" node. |
| 1862 | static int count_modifier_annotations(TSNode modifiers, const CBMLangSpec *spec) { |
| 1863 | int count = 0; |
| 1864 | uint32_t mc = ts_node_child_count(modifiers); |
| 1865 | for (uint32_t mi = 0; mi < mc; mi++) { |
| 1866 | TSNode mchild = ts_node_child(modifiers, mi); |
| 1867 | if (cbm_kind_in_set(mchild, spec->decorator_node_types)) { |
| 1868 | count++; |
| 1869 | } |
| 1870 | } |
| 1871 | return count; |
| 1872 | } |
| 1873 | |
| 1874 | // Find every wrapper child that holds annotations/attributes for languages |
| 1875 | // where they are nested under an intermediate node rather than being a |
no test coverage detected