* Finds the rightmost child to the left of `children[exclusiveStartPosition]` which is a non-all-whitespace token or has constituent tokens.
(children, exclusiveStartPosition, sourceFile, parentKind)
| 127624 | * Finds the rightmost child to the left of `children[exclusiveStartPosition]` which is a non-all-whitespace token or has constituent tokens. |
| 127625 | */ |
| 127626 | function findRightmostChildNodeWithTokens(children, exclusiveStartPosition, sourceFile, parentKind) { |
| 127627 | for (var i = exclusiveStartPosition - 1; i >= 0; i--) { |
| 127628 | var child = children[i]; |
| 127629 | if (isWhiteSpaceOnlyJsxText(child)) { |
| 127630 | if (i === 0 && (parentKind === 11 /* SyntaxKind.JsxText */ || parentKind === 279 /* SyntaxKind.JsxSelfClosingElement */)) { |
| 127631 | ts.Debug.fail("`JsxText` tokens should not be the first child of `JsxElement | JsxSelfClosingElement`"); |
| 127632 | } |
| 127633 | } |
| 127634 | else if (nodeHasTokens(children[i], sourceFile)) { |
| 127635 | return children[i]; |
| 127636 | } |
| 127637 | } |
| 127638 | } |
| 127639 | function isInString(sourceFile, position, previousToken) { |
| 127640 | if (previousToken === void 0) { previousToken = findPrecedingToken(position, sourceFile); } |
| 127641 | if (previousToken && ts.isStringTextContainingNode(previousToken)) { |
no test coverage detected