Skip to content

Commit

Permalink
Remove lintr dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-dray committed Apr 27, 2024
1 parent 1e638d5 commit 1aff56f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
5 changes: 2 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: r2eng
Version: 0.0.0.9005
Version: 0.0.0.9006
Type: Package
Title: Translate R Code To An English Sentence
Description: Take an R expression and convert it to English by matching
Expand All @@ -13,12 +13,11 @@ URL: https://github.com/matt-dray/r2eng/
BugReports: https://github.com/matt-dray/r2eng/issues
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.1.1
RoxygenNote: 7.2.3
Language: en-GB
Depends:
R (>= 2.10)
Imports:
lintr (>= 2.0.1),
purrr (>= 0.3.4),
rlang (>= 0.4.7),
utils
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# r2eng 0.0.0.9006

* Removed {lintr} dependency.

# r2eng 0.0.0.9005

* BREAKING:
Expand Down
8 changes: 3 additions & 5 deletions R/translate.R
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,9 @@ print.r2eng <- function(x, ...) {
}

.convert_expr_tree <- function(expression) {
tmp <- tempfile()
writeLines(expression, tmp)
trees <- lintr::get_source_expressions(tmp)
unlink(tmp)
return(trees$expressions[[1]]$parsed_content[,c("token", "text")])
parsed <- parse(text = expression, keep.source = TRUE)
parse_data <- utils::getParseData(parsed)
parse_data[, c("token", "text")]
}


Expand Down
4 changes: 1 addition & 3 deletions man/r2eng-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1aff56f

Please sign in to comment.