The named child right after the first `token` child of `node`, if any.
(node: Node<'t>, token: &str)
| 158 | |
| 159 | /// The named child right after the first `token` child of `node`, if any. |
| 160 | fn named_child_after<'t>(node: Node<'t>, token: &str) -> Option<Node<'t>> { |
| 161 | let mut seen = false; |
| 162 | for c in node.children(&mut node.walk()) { |
| 163 | if !c.is_named() { |
| 164 | if c.kind() == token { |
| 165 | seen = true; |
| 166 | } |
| 167 | continue; |
| 168 | } |
| 169 | if seen { |
| 170 | return Some(c); |
| 171 | } |
| 172 | } |
| 173 | None |
| 174 | } |
| 175 | |
| 176 | /// The code a class, object or enum header holds, in source order (TS |
| 177 | /// `kotlinClassHeaderCode`): each constructor parameter's default value |
no test coverage detected