We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 801734b commit 9dfc3e7Copy full SHA for 9dfc3e7
R/utils-get_code_dependency.R
@@ -148,10 +148,11 @@ fix_shifted_comments <- function(calls) {
148
#' Fixes edge case of `:=` assignment operator being treated as assignment.
149
#' @keywords internal
150
#' @noRd
151
-remove_dt_assign <- function(calls) {
+remove_custom_assign <- function(calls, exclude = c(":=")) {
152
checkmate::assert_list(calls)
153
+ checkmate::assert_character(exclude)
154
lapply(calls, function(call) {
- call <- subset(call, !(token == "LEFT_ASSIGN" & text == ":="))
155
+ call[!(call$token == "LEFT_ASSIGN" & call$text %in% exclude), ]
156
})
157
}
158
0 commit comments