* Finds an ancestor of the input node that is a valid type for extraction, skipping subexpressions.
(node)
| 159693 | * Finds an ancestor of the input node that is a valid type for extraction, skipping subexpressions. |
| 159694 | */ |
| 159695 | function getValidParentNodeOfEmptySpan(node) { |
| 159696 | while (node.parent) { |
| 159697 | if (isValidExpressionOrStatement(node) && !isValidExpressionOrStatement(node.parent)) { |
| 159698 | return node; |
| 159699 | } |
| 159700 | node = node.parent; |
| 159701 | } |
| 159702 | return undefined; |
| 159703 | } |
| 159704 | /** |
| 159705 | * Gets an expression of valid extraction type from a valid statement or expression. |
| 159706 | */ |
no test coverage detected