Promoted constructor parameters are properties. */
| 651 | |
| 652 | /* Promoted constructor parameters are properties. */ |
| 653 | static void php_promoted(php_walk_t *w, TSNode method) { |
| 654 | TSNode params = ts_node_child_by_field_name(method, TS_FIELD("parameters")); |
| 655 | int n = 0; |
| 656 | TSNode *kids = ts_node_is_null(params) ? NULL : php_children(w, params, &n); |
| 657 | for (int i = 0; i < n; i++) { |
| 658 | if (php_kind(kids[i], "property_promotion_parameter")) { |
| 659 | TSNode name = ts_node_child_by_field_name(kids[i], TS_FIELD("name")); |
| 660 | if (!ts_node_is_null(name)) { |
| 661 | php_member(w, 'p', name); |
| 662 | } |
| 663 | } |
| 664 | } |
| 665 | } |
| 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) { |
no test coverage detected