MCPcopy Create free account
hub / github.com/REditorSupport/vscode-R / parsePosition

Function parsePosition

src/rstudioapi.ts:389–397  ·  view source on GitHub ↗
(rs_position: any[], targetDocument: TextDocument)

Source from the content-addressed store, hash-verified

387}
388
389function 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
399function parseRange(rs_range: any, targetDocument: TextDocument) {
400 if (rs_range.start.length !== 2 || rs_range.end.length !== 2) {

Callers 3

insertOrModifyTextFunction · 0.85
navigateToFileFunction · 0.85
documentNewFunction · 0.85

Calls 1

toVSCCoordFunction · 0.85

Tested by

no test coverage detected