The elements of a property or constant declaration. */
| 666 | |
| 667 | /* The elements of a property or constant declaration. */ |
| 668 | static void php_elements(php_walk_t *w, TSNode decl, const char *elem, char kind) { |
| 669 | int n = 0; |
| 670 | TSNode *kids = php_children(w, decl, &n); |
| 671 | for (int i = 0; i < n; i++) { |
| 672 | if (!php_kind(kids[i], elem)) { |
| 673 | continue; |
| 674 | } |
| 675 | TSNode name = ts_node_child_by_field_name(kids[i], TS_FIELD("name")); |
| 676 | if (ts_node_is_null(name)) { |
| 677 | name = ts_node_named_child(kids[i], 0); |
| 678 | } |
| 679 | if (php_kind(name, "name") || php_kind(name, "variable_name")) { |
| 680 | php_member(w, kind, name); |
| 681 | } |
| 682 | } |
| 683 | } |
| 684 | |
| 685 | static void php_type_body(php_walk_t *w, TSNode body) { |
| 686 | int n = 0; |
no test coverage detected