resolveBody (kotlin.ts:219): first ERROR child whose child(0) is `{` (fun-interface parent body — unreachable post-defer, kept for contract), else first function_body | class_body | enum_class_body.
(&self, node: Node<'t>)
| 441 | /// (fun-interface parent body — unreachable post-defer, kept for |
| 442 | /// contract), else first function_body | class_body | enum_class_body. |
| 443 | fn resolve_body(&self, node: Node<'t>) -> Option<Node<'t>> { |
| 444 | for child in node.named_children(&mut node.walk()) { |
| 445 | if child.kind() == "ERROR" { |
| 446 | if let Some(first) = child.child(0) { |
| 447 | if first.kind() == "{" { |
| 448 | return Some(child); |
| 449 | } |
| 450 | } |
| 451 | } |
| 452 | if matches!(child.kind(), "function_body" | "class_body" | "enum_class_body") { |
| 453 | return Some(child); |
| 454 | } |
| 455 | } |
| 456 | None |
| 457 | } |
| 458 | |
| 459 | // --- createNode ------------------------------------------------------------ |
| 460 |
no test coverage detected