Skip to content

Commit 84f250a

Browse files
Merge pull request #1250 from r-lib/rm-unused-helpers
2 parents ba3fe63 + c320dc4 commit 84f250a

File tree

4 files changed

+1
-42
lines changed

4 files changed

+1
-42
lines changed

R/utils-cache.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ cache_by_expression <- function(text,
163163
} else {
164164
expressions$stylerignore <- rep(FALSE, length(expressions$text))
165165
}
166-
# TODO base_indention should be set to 0 on write and on read for expressions
166+
# TODO base_indention should be set to 0 on write and on read for expressions
167167
# (only) to make it possible to use the cache for expressions with different
168168
# indention. when not the whole input text is cached, we go trough all
169169
# expressions and check if they are cached, if yes, we take the input (from

R/utils-navigate-nest.R

-17
Original file line numberDiff line numberDiff line change
@@ -83,20 +83,3 @@ next_terminal <- function(pd,
8383
}
8484
}
8585
}
86-
87-
88-
#' Find the index of the last comment in the sequence of comments-only tokens
89-
#' after the token that has position `pos` in `pd`.
90-
#' @param pd A parse table.
91-
#' @param pos The position of the token to start the search from.
92-
#' @keywords internal
93-
extend_if_comment <- function(pd, pos) {
94-
if (pos == nrow(pd)) {
95-
return(pos)
96-
}
97-
if (pd$token[pos + 1L] == "COMMENT") {
98-
extend_if_comment(pd, pos + 1L)
99-
} else {
100-
pos
101-
}
102-
}

man/extend_if_comment.Rd

-19
This file was deleted.

tests/testthat/test-helpers.R

-5
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,3 @@ test_that("can lookup tokens", {
1515
lookup_new_special()
1616
})
1717
})
18-
19-
test_that("can extend non-comment", {
20-
pd <- compute_parse_data_nested(c("if (TRUE) # \n call(34)"))
21-
expect_equal(extend_if_comment(pd$child[[1]], 4), 5)
22-
})

0 commit comments

Comments
 (0)