(node: ParseNode, position: DiagnosticTextPosition,
lines: TextRangeCollection<TextRange>)
| 18 | export class ParseTreeUtils { |
| 19 | // Returns the deepest node that contains the specified position. |
| 20 | static findNodeByPosition(node: ParseNode, position: DiagnosticTextPosition, |
| 21 | lines: TextRangeCollection<TextRange>): ParseNode | undefined { |
| 22 | |
| 23 | let offset = convertPositionToOffset(position, lines); |
| 24 | if (offset === undefined) { |
| 25 | return undefined; |
| 26 | } |
| 27 | |
| 28 | return ParseTreeUtils.findNodeByOffset(node, offset); |
| 29 | } |
| 30 | |
| 31 | // Returns the deepest node that contains the specified offset. |
| 32 | static findNodeByOffset(node: ParseNode, offset: number): ParseNode | undefined { |
nothing calls this directly
no test coverage detected