* Includes the final semicolon so that the span covers statements in cases where it would otherwise * only cover the declaration list.
(startNode, endNode, sourceFile)
| 160500 | * only cover the declaration list. |
| 160501 | */ |
| 160502 | function getAdjustedSpanFromNodes(startNode, endNode, sourceFile) { |
| 160503 | var start = startNode.getStart(sourceFile); |
| 160504 | var end = endNode.getEnd(); |
| 160505 | if (sourceFile.text.charCodeAt(end) === 59 /* CharacterCodes.semicolon */) { |
| 160506 | end++; |
| 160507 | } |
| 160508 | return { start: start, length: end - start }; |
| 160509 | } |
| 160510 | function getStatementOrExpressionRange(node) { |
| 160511 | if (ts.isStatement(node)) { |
| 160512 | return [node]; |