| 1620 | const JAVA_EXITS = new Set(['return_statement', 'throw_statement', 'break_statement', 'continue_statement', 'yield_statement']); |
| 1621 | |
| 1622 | function javaAlwaysExits(node: SyntaxNode | null): boolean { |
| 1623 | if (!node) return false; |
| 1624 | if (JAVA_EXITS.has(node.type)) return true; |
| 1625 | if (node.type === 'block') return javaAlwaysExits(lastNamed(node)); |
| 1626 | return false; |
| 1627 | } |
| 1628 | |
| 1629 | /** `case A:` / `case A ->` / `default` labels of a Java switch group or rule, as one condition text. */ |
| 1630 | function javaCaseText(labels: SyntaxNode[], subject: string): string { |