(rs_position: any[], targetDocument: TextDocument)
| 387 | } |
| 388 | |
| 389 | function parsePosition(rs_position: any[], targetDocument: TextDocument) { |
| 390 | if (rs_position.length !== 2) { |
| 391 | throw ('an rstudioapi position must be an array of 2 numbers'); |
| 392 | } |
| 393 | return ( |
| 394 | targetDocument.validatePosition( |
| 395 | new Position(toVSCCoord(rs_position[0]), toVSCCoord(rs_position[1])) |
| 396 | )); |
| 397 | } |
| 398 | |
| 399 | function parseRange(rs_range: any, targetDocument: TextDocument) { |
| 400 | if (rs_range.start.length !== 2 || rs_range.end.length !== 2) { |
no test coverage detected