diff --git a/DESCRIPTION b/DESCRIPTION index 551b41b65..8e1a25bb5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -34,6 +34,7 @@ Imports: rprojroot (>= 1.1), tibble (>= 1.4.2), tools, + vctrs (>= 0.4.1), withr (>= 1.0.0), Suggests: data.tree (>= 0.1.6), diff --git a/NAMESPACE b/NAMESPACE index 0b706d5ae..6a3d591e2 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -17,7 +17,6 @@ export(style_text) export(tidyverse_math_token_spacing) export(tidyverse_reindention) export(tidyverse_style) -import(tibble) importFrom(magrittr,"%>%") importFrom(magrittr,or) importFrom(magrittr,set_names) @@ -43,6 +42,7 @@ importFrom(rlang,is_installed) importFrom(rlang,seq2) importFrom(rlang,warn) importFrom(rlang,with_handlers) +importFrom(tibble,tribble) importFrom(utils,capture.output) importFrom(utils,tail) importFrom(utils,write.table) diff --git a/R/compat-dplyr.R b/R/compat-dplyr.R index 7e81e656b..ab5b15abe 100644 --- a/R/compat-dplyr.R +++ b/R/compat-dplyr.R @@ -26,7 +26,7 @@ arrange_pos_id <- function(data) { bind_rows <- function(x, y = NULL, ...) { if (is.null(x) && is.null(y)) { - return(new_tibble(list())) + return(new_styler_df(list())) } if (is.null(x)) { if (inherits(y, "data.frame")) { @@ -62,7 +62,7 @@ left_join <- function(x, y, by) { res <- merge(x, y, by.x = by_x, by.y = by_y, all.x = TRUE, sort = FALSE) %>% arrange_pos_id() - res <- new_tibble(res) + res <- new_styler_df(res) # dplyr::left_join set unknown list columns to NULL, merge sets them # to NA if (exists("child", res) && anyNA(res$child)) { diff --git a/R/compat-tidyr.R b/R/compat-tidyr.R index d8fed83a0..ae672a3fa 100644 --- a/R/compat-tidyr.R +++ b/R/compat-tidyr.R @@ -6,5 +6,5 @@ nest_ <- function(data, key_col, nest_cols = character()) { res <- list() res[[key_column]] <- key_levels res[[key_col]] <- split(data[, nest_cols], key_factor) - new_tibble(res) + new_styler_df(res) } diff --git a/R/nest.R b/R/nest.R index f43cdb2e9..cb77b4a35 100644 --- a/R/nest.R +++ b/R/nest.R @@ -249,7 +249,7 @@ add_terminal_token_after <- function(pd_flat) { filter(terminal) %>% arrange_pos_id() - rhs <- new_tibble( + rhs <- new_styler_df( list( pos_id = terminals$pos_id, token_after = lead(terminals$token, default = "") @@ -266,7 +266,7 @@ add_terminal_token_before <- function(pd_flat) { filter(terminal) %>% arrange_pos_id() - rhs <- new_tibble( + rhs <- new_styler_df( list( id = terminals$id, token_before = lag(terminals$token, default = "") diff --git a/R/nested-to-tree.R b/R/nested-to-tree.R index 8495233ed..eb5489030 100644 --- a/R/nested-to-tree.R +++ b/R/nested-to-tree.R @@ -16,6 +16,7 @@ create_tree_from_pd_with_default_style_attributes <- function(pd, structure_only = FALSE) { pd %>% create_node_from_nested_root(structure_only) %>% + # don't use `styler_df()` here; `vctrs::data_frame()` only accepts a vector, not a object as.data.frame() } diff --git a/R/parse.R b/R/parse.R index b6d628486..2d09809ca 100644 --- a/R/parse.R +++ b/R/parse.R @@ -94,7 +94,7 @@ get_parse_data <- function(text, include_text = TRUE, ...) { # avoid https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=16041 parse_safely(text, keep.source = TRUE) parsed <- parse_safely(text, keep.source = TRUE) - pd <- as_tibble( + pd <- styler_df( utils::getParseData(parsed, includeText = include_text), .name_repair = "minimal" ) @@ -163,7 +163,7 @@ ensure_correct_txt <- function(pd, text) { by.y = "id", suffixes = c("", "parent") ) %>% - as_tibble(.name_repair = "minimal") + styler_df(.name_repair = "minimal") if (!lines_and_cols_match(new_text)) { abort(paste( diff --git a/R/style-guides.R b/R/style-guides.R index cabb55ec2..10f8fffb8 100644 --- a/R/style-guides.R +++ b/R/style-guides.R @@ -315,7 +315,7 @@ tidyverse_style <- function(scope = "tokens", #' } #' set_line_break_before_curly_opening_style <- function() { #' create_style_guide( -#' line_break = tibble::lst(set_line_break_before_curly_opening), +#' line_break = list(set_line_break_before_curly_opening), #' style_guide_name = "some-style-guide", #' style_guide_version = "some-version" #' ) diff --git a/R/stylerignore.R b/R/stylerignore.R index 6dd6c3969..5a0a14ca3 100644 --- a/R/stylerignore.R +++ b/R/stylerignore.R @@ -123,8 +123,8 @@ apply_stylerignore <- function(flattened_pd) { env_current$stylerignore[, colnames_required_apply_stylerignore], by.x = "pos_id", by.y = "first_pos_id_in_segment", all.x = TRUE, sort = FALSE - ) %>% - as_tibble() + ) + flattened_pd %>% stylerignore_consolidate_col("lag_newlines") %>% stylerignore_consolidate_col("lag_spaces") %>% diff --git a/R/token-create.R b/R/token-create.R index edd7dba52..f10692dd3 100644 --- a/R/token-create.R +++ b/R/token-create.R @@ -39,7 +39,7 @@ create_tokens <- function(tokens, block = NA, is_cached = FALSE) { len_text <- length(texts) - new_tibble( + new_styler_df( list( token = tokens, text = texts, diff --git a/R/token-define.R b/R/token-define.R index 6460ee2cf..b0385b7db 100644 --- a/R/token-define.R +++ b/R/token-define.R @@ -1,4 +1,4 @@ -token <- tribble( +token <- tibble::tribble( ~text, ~class, ~token, "&", "logical", "AND", "&&", "logical", "AND2", diff --git a/R/transform-files.R b/R/transform-files.R index ced4cd854..7339839a2 100644 --- a/R/transform-files.R +++ b/R/transform-files.R @@ -30,7 +30,7 @@ transform_files <- function(files, ) communicate_summary(changed, max_char) communicate_warning(changed, transformers) - new_tibble(list(file = files, changed = changed)) + new_styler_df(list(file = files, changed = changed)) } #' Transform a file and output a customized message diff --git a/R/ui-caching.R b/R/ui-caching.R index 6242d4447..19a5877c6 100644 --- a/R/ui-caching.R +++ b/R/ui-caching.R @@ -75,15 +75,16 @@ cache_info <- function(cache_name = NULL, format = "both") { rlang::arg_match(format, c("tabular", "lucid", "both")) path_cache <- cache_find_path(cache_name) files <- list.files(path_cache, full.names = TRUE) - file_info <- file.info(files) %>% - as_tibble() - tbl <- tibble( + file_info <- file.info(files) + + tbl <- styler_df( n = nrow(file_info), size = sum(file_info$size), last_modified = suppressWarnings(max(file_info$mtime)), created = file.info(path_cache)$ctime, location = path_cache, - activated = cache_is_activated(cache_name) + activated = cache_is_activated(cache_name), + stringsAsFactors = FALSE ) if (any(c("lucid", "both") == format)) { cat( diff --git a/R/ui-styling.R b/R/ui-styling.R index 25f03aafc..45ebe87ab 100644 --- a/R/ui-styling.R +++ b/R/ui-styling.R @@ -1,5 +1,5 @@ #' @keywords api -#' @import tibble +#' @importFrom tibble tribble #' @importFrom magrittr %>% NULL diff --git a/R/utils.R b/R/utils.R index 59ae30fe3..28575949d 100644 --- a/R/utils.R +++ b/R/utils.R @@ -4,6 +4,19 @@ line_col_names <- function() { c("line1", "line2", "col1", "col2") } +#' Wrapper functions to encapsulate data frame creation +#' @keywords internal +#' @noRd +styler_df <- function(..., .size = NULL, .name_repair = "minimal") { + vctrs::data_frame(..., .size = .size, .name_repair = .name_repair) +} + +#' @keywords internal +#' @noRd +new_styler_df <- function(x) { + vctrs::new_data_frame(x) +} + #' Ensure there is one (and only one) blank line at the end of a vector #' @examples #' styler:::ensure_last_n_empty("") @@ -85,7 +98,7 @@ option_read <- function(x, default = NULL, error_if_not_found = TRUE) { } } - +#' @keywords internal unwhich <- function(x, length) { x_ <- rep(FALSE, length) x_[x] <- TRUE diff --git a/inst/WORDLIST b/inst/WORDLIST index d68d4b358..cbb5ee766 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -271,6 +271,7 @@ upsetjs usethis utf Uwe +vctrs VignetteBuilder Visit'em walthert diff --git a/man/create_style_guide.Rd b/man/create_style_guide.Rd index c6ea21c43..4f6a03cf8 100644 --- a/man/create_style_guide.Rd +++ b/man/create_style_guide.Rd @@ -87,7 +87,7 @@ set_line_break_before_curly_opening <- function(pd_flat) { } set_line_break_before_curly_opening_style <- function() { create_style_guide( - line_break = tibble::lst(set_line_break_before_curly_opening), + line_break = list(set_line_break_before_curly_opening), style_guide_name = "some-style-guide", style_guide_version = "some-version" ) diff --git a/tests/testthat/_snaps/cache-with-r-cache.md b/tests/testthat/_snaps/cache-with-r-cache.md index 5a3a672dc..0afcab499 100644 --- a/tests/testthat/_snaps/cache-with-r-cache.md +++ b/tests/testthat/_snaps/cache-with-r-cache.md @@ -3,28 +3,22 @@ Code cache_info[, c("n", "size", "last_modified", "activated")] Output - # A tibble: 1 x 4 - n size last_modified activated - - 1 0 0 -Inf -Inf FALSE + n size last_modified activated + 1 0 0 -Inf FALSE --- Code cache_info[, c("n", "size", "activated")] Output - # A tibble: 1 x 3 - n size activated - - 1 1 0 TRUE + n size activated + 1 1 0 TRUE --- Code cache_info[, c("n", "size", "activated")] Output - # A tibble: 1 x 3 - n size activated - - 1 2 0 TRUE + n size activated + 1 2 0 TRUE diff --git a/tests/testthat/roxygen-examples-complete/12-dontshow-dontrun-donttest-in.R b/tests/testthat/roxygen-examples-complete/12-dontshow-dontrun-donttest-in.R index bf0285cd8..d52ce0b89 100644 --- a/tests/testthat/roxygen-examples-complete/12-dontshow-dontrun-donttest-in.R +++ b/tests/testthat/roxygen-examples-complete/12-dontshow-dontrun-donttest-in.R @@ -16,7 +16,7 @@ #' } #' } #' set_line_break_before_curly_opening_style <- function() { -#' create_style_guide(line_break = tibble::lst(set_line_break_before_curly_opening)) +#' create_style_guide(line_break = list(set_line_break_before_curly_opening)) #' } #' @examples #' \dontrun{ @@ -32,9 +32,9 @@ create_style_guide <- function(initialize = default_style_guide_attributes, indention = NULL, use_raw_indention = FALSE, reindention = tidyverse_reindention()) { - lst( + list( # transformer functions - initialize = lst(initialize), + initialize = list(initialize), line_break, space, token, @@ -63,7 +63,7 @@ create_style_guide <- function(initialize = default_style_guide_attributes, #' } #' } #' set_line_break_before_curly_opening_style <- function() { -#' create_style_guide(line_break= tibble::lst(set_line_break_before_curly_opening)) +#' create_style_guide(line_break= list(set_line_break_before_curly_opening)) #' } #' @examples #' \donttest{style_text("a <- function(x) { x } @@ -78,9 +78,9 @@ create_style_guide <- function(initialize = default_style_guide_attributes, indention = NULL, use_raw_indention = FALSE, reindention = tidyverse_reindention()) { - lst( + list( #transformer functions - initialize = lst(initialize), + initialize = list(initialize), line_break, space, token, diff --git a/tests/testthat/roxygen-examples-complete/12-dontshow-dontrun-donttest-in_tree b/tests/testthat/roxygen-examples-complete/12-dontshow-dontrun-donttest-in_tree index a22014f22..2abe159d9 100644 --- a/tests/testthat/roxygen-examples-complete/12-dontshow-dontrun-donttest-in_tree +++ b/tests/testthat/roxygen-examples-complete/12-dontshow-dontrun-donttest-in_tree @@ -1,239 +1,235 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' Cr [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' @p [1/0] {3} - ¦--COMMENT: #' [1/0] {4} - ¦--COMMENT: #' @e [1/0] {5} - ¦--COMMENT: #' se [1/0] {6} - ¦--COMMENT: #' [1/0] {7} - ¦--COMMENT: #' [1/0] {8} - ¦--COMMENT: #' [1/0] {9} - ¦--COMMENT: #' } [1/0] {10} - ¦--COMMENT: #' @e [1/0] {11} - ¦--COMMENT: #' \d [1/0] {12} - ¦--COMMENT: #' { [1/0] {13} - ¦--COMMENT: #' [1/0] {14} - ¦--COMMENT: #' } [1/0] {15} - ¦--COMMENT: #' } [1/0] {16} - ¦--COMMENT: #' se [1/0] {17} - ¦--COMMENT: #' [1/0] {18} - ¦--COMMENT: #' } [1/0] {19} - ¦--COMMENT: #' @e [1/0] {20} - ¦--COMMENT: #' \d [1/0] {21} - ¦--COMMENT: #' st [1/0] {22} - ¦--COMMENT: #' ", [1/0] {23} - ¦--COMMENT: #' } [1/0] {24} - ¦--COMMENT: #' @i [1/0] {25} - ¦--COMMENT: #' @e [1/0] {26} - ¦--expr: creat [1/0] {27} - ¦ ¦--expr: creat [0/1] {29} - ¦ ¦ °--SYMBOL: creat [0/0] {28} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {30} - ¦ °--expr: funct [0/0] {31} - ¦ ¦--FUNCTION: funct [0/0] {32} - ¦ ¦--'(': ( [0/0] {33} - ¦ ¦--SYMBOL_FORMALS: initi [0/1] {34} - ¦ ¦--EQ_FORMALS: = [0/1] {35} - ¦ ¦--expr: defau [0/0] {37} - ¦ ¦ °--SYMBOL: defau [0/0] {36} - ¦ ¦--',': , [0/31] {38} - ¦ ¦--SYMBOL_FORMALS: line_ [1/1] {39} - ¦ ¦--EQ_FORMALS: = [0/1] {40} - ¦ ¦--expr: NULL [0/0] {42} - ¦ ¦ °--NULL_CONST: NULL [0/0] {41} - ¦ ¦--',': , [0/31] {43} - ¦ ¦--SYMBOL_FORMALS: space [1/1] {44} - ¦ ¦--EQ_FORMALS: = [0/1] {45} - ¦ ¦--expr: NULL [0/0] {47} - ¦ ¦ °--NULL_CONST: NULL [0/0] {46} - ¦ ¦--',': , [0/31] {48} - ¦ ¦--SYMBOL_FORMALS: token [1/1] {49} - ¦ ¦--EQ_FORMALS: = [0/1] {50} - ¦ ¦--expr: NULL [0/0] {52} - ¦ ¦ °--NULL_CONST: NULL [0/0] {51} - ¦ ¦--',': , [0/31] {53} - ¦ ¦--SYMBOL_FORMALS: inden [1/1] {54} - ¦ ¦--EQ_FORMALS: = [0/1] {55} - ¦ ¦--expr: NULL [0/0] {57} - ¦ ¦ °--NULL_CONST: NULL [0/0] {56} - ¦ ¦--',': , [0/31] {58} - ¦ ¦--SYMBOL_FORMALS: use_r [1/1] {59} - ¦ ¦--EQ_FORMALS: = [0/1] {60} - ¦ ¦--expr: FALSE [0/0] {62} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {61} - ¦ ¦--',': , [0/31] {63} - ¦ ¦--SYMBOL_FORMALS: reind [1/1] {64} - ¦ ¦--EQ_FORMALS: = [0/1] {65} - ¦ ¦--expr: tidyv [0/0] {66} - ¦ ¦ ¦--expr: tidyv [0/0] {68} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: tidyv [0/0] {67} - ¦ ¦ ¦--'(': ( [0/0] {69} - ¦ ¦ °--')': ) [0/0] {70} - ¦ ¦--')': ) [0/1] {71} +ROOT (token: short_text [lag_newlines/spaces] {pos_id}) + ¦--COMMENT: #' Cr [0/0] {1} + ¦--COMMENT: #' [1/0] {2} + ¦--COMMENT: #' @p [1/0] {3} + ¦--COMMENT: #' [1/0] {4} + ¦--COMMENT: #' @e [1/0] {5} + ¦--COMMENT: #' se [1/0] {6} + ¦--COMMENT: #' [1/0] {7} + ¦--COMMENT: #' [1/0] {8} + ¦--COMMENT: #' [1/0] {9} + ¦--COMMENT: #' } [1/0] {10} + ¦--COMMENT: #' @e [1/0] {11} + ¦--COMMENT: #' \d [1/0] {12} + ¦--COMMENT: #' { [1/0] {13} + ¦--COMMENT: #' [1/0] {14} + ¦--COMMENT: #' } [1/0] {15} + ¦--COMMENT: #' } [1/0] {16} + ¦--COMMENT: #' se [1/0] {17} + ¦--COMMENT: #' [1/0] {18} + ¦--COMMENT: #' } [1/0] {19} + ¦--COMMENT: #' @e [1/0] {20} + ¦--COMMENT: #' \d [1/0] {21} + ¦--COMMENT: #' st [1/0] {22} + ¦--COMMENT: #' ", [1/0] {23} + ¦--COMMENT: #' } [1/0] {24} + ¦--COMMENT: #' @i [1/0] {25} + ¦--COMMENT: #' @e [1/0] {26} + ¦--expr: creat [1/0] {27} + ¦ ¦--expr: creat [0/1] {29} + ¦ ¦ °--SYMBOL: creat [0/0] {28} + ¦ ¦--LEFT_ASSIGN: <- [0/1] {30} + ¦ °--expr: funct [0/0] {31} + ¦ ¦--FUNCTION: funct [0/0] {32} + ¦ ¦--'(': ( [0/0] {33} + ¦ ¦--SYMBOL_FORMALS: initi [0/1] {34} + ¦ ¦--EQ_FORMALS: = [0/1] {35} + ¦ ¦--expr: defau [0/0] {37} + ¦ ¦ °--SYMBOL: defau [0/0] {36} + ¦ ¦--',': , [0/31] {38} + ¦ ¦--SYMBOL_FORMALS: line_ [1/1] {39} + ¦ ¦--EQ_FORMALS: = [0/1] {40} + ¦ ¦--expr: NULL [0/0] {42} + ¦ ¦ °--NULL_CONST: NULL [0/0] {41} + ¦ ¦--',': , [0/31] {43} + ¦ ¦--SYMBOL_FORMALS: space [1/1] {44} + ¦ ¦--EQ_FORMALS: = [0/1] {45} + ¦ ¦--expr: NULL [0/0] {47} + ¦ ¦ °--NULL_CONST: NULL [0/0] {46} + ¦ ¦--',': , [0/31] {48} + ¦ ¦--SYMBOL_FORMALS: token [1/1] {49} + ¦ ¦--EQ_FORMALS: = [0/1] {50} + ¦ ¦--expr: NULL [0/0] {52} + ¦ ¦ °--NULL_CONST: NULL [0/0] {51} + ¦ ¦--',': , [0/31] {53} + ¦ ¦--SYMBOL_FORMALS: inden [1/1] {54} + ¦ ¦--EQ_FORMALS: = [0/1] {55} + ¦ ¦--expr: NULL [0/0] {57} + ¦ ¦ °--NULL_CONST: NULL [0/0] {56} + ¦ ¦--',': , [0/31] {58} + ¦ ¦--SYMBOL_FORMALS: use_r [1/1] {59} + ¦ ¦--EQ_FORMALS: = [0/1] {60} + ¦ ¦--expr: FALSE [0/0] {62} + ¦ ¦ °--NUM_CONST: FALSE [0/0] {61} + ¦ ¦--',': , [0/31] {63} + ¦ ¦--SYMBOL_FORMALS: reind [1/1] {64} + ¦ ¦--EQ_FORMALS: = [0/1] {65} + ¦ ¦--expr: tidyv [0/0] {66} + ¦ ¦ ¦--expr: tidyv [0/0] {68} + ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: tidyv [0/0] {67} + ¦ ¦ ¦--'(': ( [0/0] {69} + ¦ ¦ °--')': ) [0/0] {70} + ¦ ¦--')': ) [0/1] {71} ¦ °--expr: { - l [0/0] {72} - ¦ ¦--'{': { [0/2] {73} - ¦ ¦--expr: lst( - [1/0] {74} - ¦ ¦ ¦--expr: lst( - [0/1] {75} - ¦ ¦ ¦ ¦--expr: lst [0/0] {77} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: lst [0/0] {76} - ¦ ¦ ¦ ¦--'(': ( [0/4] {78} - ¦ ¦ ¦ ¦--COMMENT: # tra [1/4] {79} - ¦ ¦ ¦ ¦--SYMBOL_SUB: initi [1/1] {80} - ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {81} - ¦ ¦ ¦ ¦--expr: lst(i [0/0] {82} - ¦ ¦ ¦ ¦ ¦--expr: lst [0/0] {84} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: lst [0/0] {83} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {85} - ¦ ¦ ¦ ¦ ¦--expr: initi [0/0] {87} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL: initi [0/0] {86} - ¦ ¦ ¦ ¦ °--')': ) [0/0] {88} - ¦ ¦ ¦ ¦--',': , [0/4] {89} - ¦ ¦ ¦ ¦--expr: line_ [1/0] {91} - ¦ ¦ ¦ ¦ °--SYMBOL: line_ [0/0] {90} - ¦ ¦ ¦ ¦--',': , [0/4] {92} - ¦ ¦ ¦ ¦--expr: space [1/0] {94} - ¦ ¦ ¦ ¦ °--SYMBOL: space [0/0] {93} - ¦ ¦ ¦ ¦--',': , [0/4] {95} - ¦ ¦ ¦ ¦--expr: token [1/0] {97} - ¦ ¦ ¦ ¦ °--SYMBOL: token [0/0] {96} - ¦ ¦ ¦ ¦--',': , [0/4] {98} - ¦ ¦ ¦ ¦--expr: inden [1/0] {100} - ¦ ¦ ¦ ¦ °--SYMBOL: inden [0/0] {99} - ¦ ¦ ¦ ¦--',': , [0/4] {101} - ¦ ¦ ¦ ¦--COMMENT: # tra [1/4] {102} - ¦ ¦ ¦ ¦--expr: use_r [1/0] {104} - ¦ ¦ ¦ ¦ °--SYMBOL: use_r [0/0] {103} - ¦ ¦ ¦ ¦--',': , [0/4] {105} - ¦ ¦ ¦ ¦--expr: reind [1/2] {107} - ¦ ¦ ¦ ¦ °--SYMBOL: reind [0/0] {106} - ¦ ¦ ¦ °--')': ) [1/0] {108} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {109} - ¦ ¦ °--expr: map(c [1/0] {110} - ¦ ¦ ¦--expr: map [0/0] {112} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: map [0/0] {111} - ¦ ¦ ¦--'(': ( [0/0] {113} - ¦ ¦ ¦--expr: compa [0/0] {115} - ¦ ¦ ¦ °--SYMBOL: compa [0/0] {114} - ¦ ¦ °--')': ) [0/0] {116} - ¦ °--'}': } [1/0] {117} - ¦--COMMENT: #' Cr [3/0] {118} - ¦--COMMENT: #' [1/0] {119} - ¦--COMMENT: #' @p [1/0] {120} - ¦--COMMENT: #' [1/0] {121} - ¦--COMMENT: #' @e [1/0] {122} - ¦--COMMENT: #' se [1/0] {123} - ¦--COMMENT: #' [1/0] {124} - ¦--COMMENT: #' [1/0] {125} - ¦--COMMENT: #' [1/0] {126} - ¦--COMMENT: #' } [1/0] {127} - ¦--COMMENT: #' @e [1/0] {128} - ¦--COMMENT: #' \d [1/0] {129} - ¦--COMMENT: #' {x [1/0] {130} - ¦--COMMENT: #' } [1/0] {131} - ¦--COMMENT: #' } [1/0] {132} - ¦--COMMENT: #' se [1/0] {133} - ¦--COMMENT: #' cr [1/0] {134} - ¦--COMMENT: #' } [1/0] {135} - ¦--COMMENT: #' @e [1/0] {136} - ¦--COMMENT: #' \d [1/0] {137} - ¦--COMMENT: #' ", [1/0] {138} - ¦--COMMENT: #' } [1/0] {139} - ¦--COMMENT: #' @i [1/0] {140} - ¦--COMMENT: #' @e [1/0] {141} - °--expr: creat [1/0] {142} - ¦--expr: creat [0/1] {144} - ¦ °--SYMBOL: creat [0/0] {143} - ¦--LEFT_ASSIGN: <- [0/1] {145} - °--expr: funct [0/0] {146} - ¦--FUNCTION: funct [0/0] {147} - ¦--'(': ( [0/0] {148} - ¦--SYMBOL_FORMALS: initi [0/1] {149} - ¦--EQ_FORMALS: = [0/1] {150} - ¦--expr: defau [0/0] {152} - ¦ °--SYMBOL: defau [0/0] {151} - ¦--',': , [0/31] {153} - ¦--SYMBOL_FORMALS: line_ [1/1] {154} - ¦--EQ_FORMALS: = [0/1] {155} - ¦--expr: NULL [0/0] {157} - ¦ °--NULL_CONST: NULL [0/0] {156} - ¦--',': , [0/31] {158} - ¦--SYMBOL_FORMALS: space [1/1] {159} - ¦--EQ_FORMALS: = [0/1] {160} - ¦--expr: NULL [0/0] {162} - ¦ °--NULL_CONST: NULL [0/0] {161} - ¦--',': , [0/31] {163} - ¦--SYMBOL_FORMALS: token [1/1] {164} - ¦--EQ_FORMALS: = [0/1] {165} - ¦--expr: NULL [0/0] {167} - ¦ °--NULL_CONST: NULL [0/0] {166} - ¦--',': , [0/31] {168} - ¦--SYMBOL_FORMALS: inden [1/1] {169} - ¦--EQ_FORMALS: = [0/1] {170} - ¦--expr: NULL [0/0] {172} - ¦ °--NULL_CONST: NULL [0/0] {171} - ¦--',': , [0/31] {173} - ¦--SYMBOL_FORMALS: use_r [1/1] {174} - ¦--EQ_FORMALS: = [0/1] {175} - ¦--expr: FALSE [0/0] {177} - ¦ °--NUM_CONST: FALSE [0/0] {176} - ¦--',': , [0/31] {178} - ¦--SYMBOL_FORMALS: reind [1/1] {179} - ¦--EQ_FORMALS: = [0/1] {180} - ¦--expr: tidyv [0/0] {181} - ¦ ¦--expr: tidyv [0/0] {183} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: tidyv [0/0] {182} - ¦ ¦--'(': ( [0/0] {184} - ¦ °--')': ) [0/0] {185} - ¦--')': ) [0/1] {186} + l [0/0] {72} + ¦ ¦--'{': { [0/2] {73} + ¦ ¦--expr: list( [1/0] {74} + ¦ ¦ ¦--expr: list( [0/1] {75} + ¦ ¦ ¦ ¦--expr: list [0/0] {77} + ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: list [0/0] {76} + ¦ ¦ ¦ ¦--'(': ( [0/4] {78} + ¦ ¦ ¦ ¦--COMMENT: # tra [1/4] {79} + ¦ ¦ ¦ ¦--SYMBOL_SUB: initi [1/1] {80} + ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {81} + ¦ ¦ ¦ ¦--expr: list( [0/0] {82} + ¦ ¦ ¦ ¦ ¦--expr: list [0/0] {84} + ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: list [0/0] {83} + ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {85} + ¦ ¦ ¦ ¦ ¦--expr: initi [0/0] {87} + ¦ ¦ ¦ ¦ ¦ °--SYMBOL: initi [0/0] {86} + ¦ ¦ ¦ ¦ °--')': ) [0/0] {88} + ¦ ¦ ¦ ¦--',': , [0/4] {89} + ¦ ¦ ¦ ¦--expr: line_ [1/0] {91} + ¦ ¦ ¦ ¦ °--SYMBOL: line_ [0/0] {90} + ¦ ¦ ¦ ¦--',': , [0/4] {92} + ¦ ¦ ¦ ¦--expr: space [1/0] {94} + ¦ ¦ ¦ ¦ °--SYMBOL: space [0/0] {93} + ¦ ¦ ¦ ¦--',': , [0/4] {95} + ¦ ¦ ¦ ¦--expr: token [1/0] {97} + ¦ ¦ ¦ ¦ °--SYMBOL: token [0/0] {96} + ¦ ¦ ¦ ¦--',': , [0/4] {98} + ¦ ¦ ¦ ¦--expr: inden [1/0] {100} + ¦ ¦ ¦ ¦ °--SYMBOL: inden [0/0] {99} + ¦ ¦ ¦ ¦--',': , [0/4] {101} + ¦ ¦ ¦ ¦--COMMENT: # tra [1/4] {102} + ¦ ¦ ¦ ¦--expr: use_r [1/0] {104} + ¦ ¦ ¦ ¦ °--SYMBOL: use_r [0/0] {103} + ¦ ¦ ¦ ¦--',': , [0/4] {105} + ¦ ¦ ¦ ¦--expr: reind [1/2] {107} + ¦ ¦ ¦ ¦ °--SYMBOL: reind [0/0] {106} + ¦ ¦ ¦ °--')': ) [1/0] {108} + ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {109} + ¦ ¦ °--expr: map(c [1/0] {110} + ¦ ¦ ¦--expr: map [0/0] {112} + ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: map [0/0] {111} + ¦ ¦ ¦--'(': ( [0/0] {113} + ¦ ¦ ¦--expr: compa [0/0] {115} + ¦ ¦ ¦ °--SYMBOL: compa [0/0] {114} + ¦ ¦ °--')': ) [0/0] {116} + ¦ °--'}': } [1/0] {117} + ¦--COMMENT: #' Cr [3/0] {118} + ¦--COMMENT: #' [1/0] {119} + ¦--COMMENT: #' @p [1/0] {120} + ¦--COMMENT: #' [1/0] {121} + ¦--COMMENT: #' @e [1/0] {122} + ¦--COMMENT: #' se [1/0] {123} + ¦--COMMENT: #' [1/0] {124} + ¦--COMMENT: #' [1/0] {125} + ¦--COMMENT: #' [1/0] {126} + ¦--COMMENT: #' } [1/0] {127} + ¦--COMMENT: #' @e [1/0] {128} + ¦--COMMENT: #' \d [1/0] {129} + ¦--COMMENT: #' {x [1/0] {130} + ¦--COMMENT: #' } [1/0] {131} + ¦--COMMENT: #' } [1/0] {132} + ¦--COMMENT: #' se [1/0] {133} + ¦--COMMENT: #' cr [1/0] {134} + ¦--COMMENT: #' } [1/0] {135} + ¦--COMMENT: #' @e [1/0] {136} + ¦--COMMENT: #' \d [1/0] {137} + ¦--COMMENT: #' ", [1/0] {138} + ¦--COMMENT: #' } [1/0] {139} + ¦--COMMENT: #' @i [1/0] {140} + ¦--COMMENT: #' @e [1/0] {141} + °--expr: creat [1/0] {142} + ¦--expr: creat [0/1] {144} + ¦ °--SYMBOL: creat [0/0] {143} + ¦--LEFT_ASSIGN: <- [0/1] {145} + °--expr: funct [0/0] {146} + ¦--FUNCTION: funct [0/0] {147} + ¦--'(': ( [0/0] {148} + ¦--SYMBOL_FORMALS: initi [0/1] {149} + ¦--EQ_FORMALS: = [0/1] {150} + ¦--expr: defau [0/0] {152} + ¦ °--SYMBOL: defau [0/0] {151} + ¦--',': , [0/31] {153} + ¦--SYMBOL_FORMALS: line_ [1/1] {154} + ¦--EQ_FORMALS: = [0/1] {155} + ¦--expr: NULL [0/0] {157} + ¦ °--NULL_CONST: NULL [0/0] {156} + ¦--',': , [0/31] {158} + ¦--SYMBOL_FORMALS: space [1/1] {159} + ¦--EQ_FORMALS: = [0/1] {160} + ¦--expr: NULL [0/0] {162} + ¦ °--NULL_CONST: NULL [0/0] {161} + ¦--',': , [0/31] {163} + ¦--SYMBOL_FORMALS: token [1/1] {164} + ¦--EQ_FORMALS: = [0/1] {165} + ¦--expr: NULL [0/0] {167} + ¦ °--NULL_CONST: NULL [0/0] {166} + ¦--',': , [0/31] {168} + ¦--SYMBOL_FORMALS: inden [1/1] {169} + ¦--EQ_FORMALS: = [0/1] {170} + ¦--expr: NULL [0/0] {172} + ¦ °--NULL_CONST: NULL [0/0] {171} + ¦--',': , [0/31] {173} + ¦--SYMBOL_FORMALS: use_r [1/1] {174} + ¦--EQ_FORMALS: = [0/1] {175} + ¦--expr: FALSE [0/0] {177} + ¦ °--NUM_CONST: FALSE [0/0] {176} + ¦--',': , [0/31] {178} + ¦--SYMBOL_FORMALS: reind [1/1] {179} + ¦--EQ_FORMALS: = [0/1] {180} + ¦--expr: tidyv [0/0] {181} + ¦ ¦--expr: tidyv [0/0] {183} + ¦ ¦ °--SYMBOL_FUNCTION_CALL: tidyv [0/0] {182} + ¦ ¦--'(': ( [0/0] {184} + ¦ °--')': ) [0/0] {185} + ¦--')': ) [0/1] {186} °--expr: { - l [0/0] {187} - ¦--'{': { [0/2] {188} - ¦--expr: lst( - [1/0] {189} - ¦ ¦--expr: lst( - [0/0] {190} - ¦ ¦ ¦--expr: lst [0/0] {192} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: lst [0/0] {191} - ¦ ¦ ¦--'(': ( [0/4] {193} - ¦ ¦ ¦--COMMENT: #tran [1/4] {194} - ¦ ¦ ¦--SYMBOL_SUB: initi [1/1] {195} - ¦ ¦ ¦--EQ_SUB: = [0/1] {196} - ¦ ¦ ¦--expr: lst(i [0/0] {197} - ¦ ¦ ¦ ¦--expr: lst [0/0] {199} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: lst [0/0] {198} - ¦ ¦ ¦ ¦--'(': ( [0/0] {200} - ¦ ¦ ¦ ¦--expr: initi [0/0] {202} - ¦ ¦ ¦ ¦ °--SYMBOL: initi [0/0] {201} - ¦ ¦ ¦ °--')': ) [0/0] {203} - ¦ ¦ ¦--',': , [0/4] {204} - ¦ ¦ ¦--expr: line_ [1/0] {206} - ¦ ¦ ¦ °--SYMBOL: line_ [0/0] {205} - ¦ ¦ ¦--',': , [0/4] {207} - ¦ ¦ ¦--expr: space [1/0] {209} - ¦ ¦ ¦ °--SYMBOL: space [0/0] {208} - ¦ ¦ ¦--',': , [0/4] {210} - ¦ ¦ ¦--expr: token [1/0] {212} - ¦ ¦ ¦ °--SYMBOL: token [0/0] {211} - ¦ ¦ ¦--',': , [0/4] {213} - ¦ ¦ ¦--expr: inden [1/0] {215} - ¦ ¦ ¦ °--SYMBOL: inden [0/0] {214} - ¦ ¦ ¦--',': , [0/4] {216} - ¦ ¦ ¦--COMMENT: # tra [1/4] {217} - ¦ ¦ ¦--expr: use_r [1/0] {219} - ¦ ¦ ¦ °--SYMBOL: use_r [0/0] {218} - ¦ ¦ ¦--',': , [0/4] {220} - ¦ ¦ ¦--expr: reind [1/2] {222} - ¦ ¦ ¦ °--SYMBOL: reind [0/0] {221} - ¦ ¦ °--')': ) [1/0] {223} - ¦ ¦--SPECIAL-PIPE: %>% [0/4] {224} - ¦ °--expr: map(c [1/0] {225} - ¦ ¦--expr: map [0/0] {227} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: map [0/0] {226} - ¦ ¦--'(': ( [0/0] {228} - ¦ ¦--expr: compa [0/0] {230} - ¦ ¦ °--SYMBOL: compa [0/0] {229} - ¦ °--')': ) [0/0] {231} - °--'}': } [1/0] {232} + l [0/0] {187} + ¦--'{': { [0/2] {188} + ¦--expr: list( [1/0] {189} + ¦ ¦--expr: list( [0/0] {190} + ¦ ¦ ¦--expr: list [0/0] {192} + ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: list [0/0] {191} + ¦ ¦ ¦--'(': ( [0/4] {193} + ¦ ¦ ¦--COMMENT: #tran [1/4] {194} + ¦ ¦ ¦--SYMBOL_SUB: initi [1/1] {195} + ¦ ¦ ¦--EQ_SUB: = [0/1] {196} + ¦ ¦ ¦--expr: list( [0/0] {197} + ¦ ¦ ¦ ¦--expr: list [0/0] {199} + ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: list [0/0] {198} + ¦ ¦ ¦ ¦--'(': ( [0/0] {200} + ¦ ¦ ¦ ¦--expr: initi [0/0] {202} + ¦ ¦ ¦ ¦ °--SYMBOL: initi [0/0] {201} + ¦ ¦ ¦ °--')': ) [0/0] {203} + ¦ ¦ ¦--',': , [0/4] {204} + ¦ ¦ ¦--expr: line_ [1/0] {206} + ¦ ¦ ¦ °--SYMBOL: line_ [0/0] {205} + ¦ ¦ ¦--',': , [0/4] {207} + ¦ ¦ ¦--expr: space [1/0] {209} + ¦ ¦ ¦ °--SYMBOL: space [0/0] {208} + ¦ ¦ ¦--',': , [0/4] {210} + ¦ ¦ ¦--expr: token [1/0] {212} + ¦ ¦ ¦ °--SYMBOL: token [0/0] {211} + ¦ ¦ ¦--',': , [0/4] {213} + ¦ ¦ ¦--expr: inden [1/0] {215} + ¦ ¦ ¦ °--SYMBOL: inden [0/0] {214} + ¦ ¦ ¦--',': , [0/4] {216} + ¦ ¦ ¦--COMMENT: # tra [1/4] {217} + ¦ ¦ ¦--expr: use_r [1/0] {219} + ¦ ¦ ¦ °--SYMBOL: use_r [0/0] {218} + ¦ ¦ ¦--',': , [0/4] {220} + ¦ ¦ ¦--expr: reind [1/2] {222} + ¦ ¦ ¦ °--SYMBOL: reind [0/0] {221} + ¦ ¦ °--')': ) [1/0] {223} + ¦ ¦--SPECIAL-PIPE: %>% [0/4] {224} + ¦ °--expr: map(c [1/0] {225} + ¦ ¦--expr: map [0/0] {227} + ¦ ¦ °--SYMBOL_FUNCTION_CALL: map [0/0] {226} + ¦ ¦--'(': ( [0/0] {228} + ¦ ¦--expr: compa [0/0] {230} + ¦ ¦ °--SYMBOL: compa [0/0] {229} + ¦ °--')': ) [0/0] {231} + °--'}': } [1/0] {232} diff --git a/tests/testthat/roxygen-examples-complete/12-dontshow-dontrun-donttest-out.R b/tests/testthat/roxygen-examples-complete/12-dontshow-dontrun-donttest-out.R index b32856187..aa7d52b67 100644 --- a/tests/testthat/roxygen-examples-complete/12-dontshow-dontrun-donttest-out.R +++ b/tests/testthat/roxygen-examples-complete/12-dontshow-dontrun-donttest-out.R @@ -16,7 +16,7 @@ #' } #' } #' set_line_break_before_curly_opening_style <- function() { -#' create_style_guide(line_break = tibble::lst(set_line_break_before_curly_opening)) +#' create_style_guide(line_break = list(set_line_break_before_curly_opening)) #' } #' @examples #' \dontrun{ @@ -32,9 +32,9 @@ create_style_guide <- function(initialize = default_style_guide_attributes, indention = NULL, use_raw_indention = FALSE, reindention = tidyverse_reindention()) { - lst( + list( # transformer functions - initialize = lst(initialize), + initialize = list(initialize), line_break, space, token, @@ -64,7 +64,7 @@ create_style_guide <- function(initialize = default_style_guide_attributes, #' } #' } #' set_line_break_before_curly_opening_style <- function() { -#' create_style_guide(line_break = tibble::lst(set_line_break_before_curly_opening)) +#' create_style_guide(line_break = list(set_line_break_before_curly_opening)) #' } #' @examples #' \donttest{ @@ -80,9 +80,9 @@ create_style_guide <- function(initialize = default_style_guide_attributes, indention = NULL, use_raw_indention = FALSE, reindention = tidyverse_reindention()) { - lst( + list( # transformer functions - initialize = lst(initialize), + initialize = list(initialize), line_break, space, token, diff --git a/tests/testthat/roxygen-examples-complete/12-fun-decs-in-examples-in.R b/tests/testthat/roxygen-examples-complete/12-fun-decs-in-examples-in.R index 225435fdc..aa4c21362 100644 --- a/tests/testthat/roxygen-examples-complete/12-fun-decs-in-examples-in.R +++ b/tests/testthat/roxygen-examples-complete/12-fun-decs-in-examples-in.R @@ -10,7 +10,7 @@ #' pd_flat #' } #' set_line_break_before_curly_opening_style <- function() { -#' create_style_guide(line_break = tibble::lst(set_line_break_before_curly_opening)) +#' create_style_guide(line_break = list(set_line_break_before_curly_opening)) #' } #' style_text("a <- function(x) { x } #' ", style = set_line_break_before_curly_opening_style) @@ -30,9 +30,9 @@ create_style_guide <- function(initialize = default_style_guide_attributes, indention = NULL, use_raw_indention = FALSE, reindention = tidyverse_reindention()) { - lst( + list( # transformer functions - initialize = lst(initialize), + initialize = list(initialize), line_break, space, token, diff --git a/tests/testthat/roxygen-examples-complete/12-fun-decs-in-examples-in_tree b/tests/testthat/roxygen-examples-complete/12-fun-decs-in-examples-in_tree index 930abc1cd..bd1f31905 100644 --- a/tests/testthat/roxygen-examples-complete/12-fun-decs-in-examples-in_tree +++ b/tests/testthat/roxygen-examples-complete/12-fun-decs-in-examples-in_tree @@ -1,151 +1,149 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' Cr [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' @p [1/0] {3} - ¦--COMMENT: #' [1/0] {4} - ¦--COMMENT: #' @e [1/0] {5} - ¦--COMMENT: #' se [1/0] {6} - ¦--COMMENT: #' [1/0] {7} - ¦--COMMENT: #' [1/0] {8} - ¦--COMMENT: #' [1/0] {9} - ¦--COMMENT: #' } [1/0] {10} - ¦--COMMENT: #' se [1/0] {11} - ¦--COMMENT: #' [1/0] {12} - ¦--COMMENT: #' } [1/0] {13} - ¦--COMMENT: #' st [1/0] {14} - ¦--COMMENT: #' ", [1/0] {15} - ¦--COMMENT: #' \d [1/0] {16} - ¦--COMMENT: #' se [1/0] {17} - ¦--COMMENT: #' [1/0] {18} - ¦--COMMENT: #' [1/0] {19} - ¦--COMMENT: #' [1/0] {20} - ¦--COMMENT: #' } [1/0] {21} - ¦--COMMENT: #' } [1/0] {22} - ¦--COMMENT: #' @i [1/0] {23} - ¦--COMMENT: #' @e [1/0] {24} - ¦--expr: creat [1/0] {25} - ¦ ¦--expr: creat [0/1] {27} - ¦ ¦ °--SYMBOL: creat [0/0] {26} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {28} - ¦ °--expr: funct [0/0] {29} - ¦ ¦--FUNCTION: funct [0/0] {30} - ¦ ¦--'(': ( [0/0] {31} - ¦ ¦--SYMBOL_FORMALS: initi [0/1] {32} - ¦ ¦--EQ_FORMALS: = [0/1] {33} - ¦ ¦--expr: defau [0/0] {35} - ¦ ¦ °--SYMBOL: defau [0/0] {34} - ¦ ¦--',': , [0/31] {36} - ¦ ¦--SYMBOL_FORMALS: line_ [1/1] {37} - ¦ ¦--EQ_FORMALS: = [0/1] {38} - ¦ ¦--expr: NULL [0/0] {40} - ¦ ¦ °--NULL_CONST: NULL [0/0] {39} - ¦ ¦--',': , [0/31] {41} - ¦ ¦--SYMBOL_FORMALS: space [1/1] {42} - ¦ ¦--EQ_FORMALS: = [0/1] {43} - ¦ ¦--expr: NULL [0/0] {45} - ¦ ¦ °--NULL_CONST: NULL [0/0] {44} - ¦ ¦--',': , [0/31] {46} - ¦ ¦--SYMBOL_FORMALS: token [1/1] {47} - ¦ ¦--EQ_FORMALS: = [0/1] {48} - ¦ ¦--expr: NULL [0/0] {50} - ¦ ¦ °--NULL_CONST: NULL [0/0] {49} - ¦ ¦--',': , [0/31] {51} - ¦ ¦--SYMBOL_FORMALS: inden [1/1] {52} - ¦ ¦--EQ_FORMALS: = [0/1] {53} - ¦ ¦--expr: NULL [0/0] {55} - ¦ ¦ °--NULL_CONST: NULL [0/0] {54} - ¦ ¦--',': , [0/31] {56} - ¦ ¦--SYMBOL_FORMALS: use_r [1/1] {57} - ¦ ¦--EQ_FORMALS: = [0/1] {58} - ¦ ¦--expr: FALSE [0/0] {60} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {59} - ¦ ¦--',': , [0/31] {61} - ¦ ¦--SYMBOL_FORMALS: reind [1/1] {62} - ¦ ¦--EQ_FORMALS: = [0/1] {63} - ¦ ¦--expr: tidyv [0/0] {64} - ¦ ¦ ¦--expr: tidyv [0/0] {66} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: tidyv [0/0] {65} - ¦ ¦ ¦--'(': ( [0/0] {67} - ¦ ¦ °--')': ) [0/0] {68} - ¦ ¦--')': ) [0/1] {69} +ROOT (token: short_text [lag_newlines/spaces] {pos_id}) + ¦--COMMENT: #' Cr [0/0] {1} + ¦--COMMENT: #' [1/0] {2} + ¦--COMMENT: #' @p [1/0] {3} + ¦--COMMENT: #' [1/0] {4} + ¦--COMMENT: #' @e [1/0] {5} + ¦--COMMENT: #' se [1/0] {6} + ¦--COMMENT: #' [1/0] {7} + ¦--COMMENT: #' [1/0] {8} + ¦--COMMENT: #' [1/0] {9} + ¦--COMMENT: #' } [1/0] {10} + ¦--COMMENT: #' se [1/0] {11} + ¦--COMMENT: #' [1/0] {12} + ¦--COMMENT: #' } [1/0] {13} + ¦--COMMENT: #' st [1/0] {14} + ¦--COMMENT: #' ", [1/0] {15} + ¦--COMMENT: #' \d [1/0] {16} + ¦--COMMENT: #' se [1/0] {17} + ¦--COMMENT: #' [1/0] {18} + ¦--COMMENT: #' [1/0] {19} + ¦--COMMENT: #' [1/0] {20} + ¦--COMMENT: #' } [1/0] {21} + ¦--COMMENT: #' } [1/0] {22} + ¦--COMMENT: #' @i [1/0] {23} + ¦--COMMENT: #' @e [1/0] {24} + ¦--expr: creat [1/0] {25} + ¦ ¦--expr: creat [0/1] {27} + ¦ ¦ °--SYMBOL: creat [0/0] {26} + ¦ ¦--LEFT_ASSIGN: <- [0/1] {28} + ¦ °--expr: funct [0/0] {29} + ¦ ¦--FUNCTION: funct [0/0] {30} + ¦ ¦--'(': ( [0/0] {31} + ¦ ¦--SYMBOL_FORMALS: initi [0/1] {32} + ¦ ¦--EQ_FORMALS: = [0/1] {33} + ¦ ¦--expr: defau [0/0] {35} + ¦ ¦ °--SYMBOL: defau [0/0] {34} + ¦ ¦--',': , [0/31] {36} + ¦ ¦--SYMBOL_FORMALS: line_ [1/1] {37} + ¦ ¦--EQ_FORMALS: = [0/1] {38} + ¦ ¦--expr: NULL [0/0] {40} + ¦ ¦ °--NULL_CONST: NULL [0/0] {39} + ¦ ¦--',': , [0/31] {41} + ¦ ¦--SYMBOL_FORMALS: space [1/1] {42} + ¦ ¦--EQ_FORMALS: = [0/1] {43} + ¦ ¦--expr: NULL [0/0] {45} + ¦ ¦ °--NULL_CONST: NULL [0/0] {44} + ¦ ¦--',': , [0/31] {46} + ¦ ¦--SYMBOL_FORMALS: token [1/1] {47} + ¦ ¦--EQ_FORMALS: = [0/1] {48} + ¦ ¦--expr: NULL [0/0] {50} + ¦ ¦ °--NULL_CONST: NULL [0/0] {49} + ¦ ¦--',': , [0/31] {51} + ¦ ¦--SYMBOL_FORMALS: inden [1/1] {52} + ¦ ¦--EQ_FORMALS: = [0/1] {53} + ¦ ¦--expr: NULL [0/0] {55} + ¦ ¦ °--NULL_CONST: NULL [0/0] {54} + ¦ ¦--',': , [0/31] {56} + ¦ ¦--SYMBOL_FORMALS: use_r [1/1] {57} + ¦ ¦--EQ_FORMALS: = [0/1] {58} + ¦ ¦--expr: FALSE [0/0] {60} + ¦ ¦ °--NUM_CONST: FALSE [0/0] {59} + ¦ ¦--',': , [0/31] {61} + ¦ ¦--SYMBOL_FORMALS: reind [1/1] {62} + ¦ ¦--EQ_FORMALS: = [0/1] {63} + ¦ ¦--expr: tidyv [0/0] {64} + ¦ ¦ ¦--expr: tidyv [0/0] {66} + ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: tidyv [0/0] {65} + ¦ ¦ ¦--'(': ( [0/0] {67} + ¦ ¦ °--')': ) [0/0] {68} + ¦ ¦--')': ) [0/1] {69} ¦ °--expr: { - l [0/0] {70} - ¦ ¦--'{': { [0/2] {71} - ¦ ¦--expr: lst( - [1/0] {72} - ¦ ¦ ¦--expr: lst( - [0/1] {73} - ¦ ¦ ¦ ¦--expr: lst [0/0] {75} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: lst [0/0] {74} - ¦ ¦ ¦ ¦--'(': ( [0/4] {76} - ¦ ¦ ¦ ¦--COMMENT: # tra [1/4] {77} - ¦ ¦ ¦ ¦--SYMBOL_SUB: initi [1/1] {78} - ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {79} - ¦ ¦ ¦ ¦--expr: lst(i [0/0] {80} - ¦ ¦ ¦ ¦ ¦--expr: lst [0/0] {82} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: lst [0/0] {81} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {83} - ¦ ¦ ¦ ¦ ¦--expr: initi [0/0] {85} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL: initi [0/0] {84} - ¦ ¦ ¦ ¦ °--')': ) [0/0] {86} - ¦ ¦ ¦ ¦--',': , [0/4] {87} - ¦ ¦ ¦ ¦--expr: line_ [1/0] {89} - ¦ ¦ ¦ ¦ °--SYMBOL: line_ [0/0] {88} - ¦ ¦ ¦ ¦--',': , [0/4] {90} - ¦ ¦ ¦ ¦--expr: space [1/0] {92} - ¦ ¦ ¦ ¦ °--SYMBOL: space [0/0] {91} - ¦ ¦ ¦ ¦--',': , [0/4] {93} - ¦ ¦ ¦ ¦--expr: token [1/0] {95} - ¦ ¦ ¦ ¦ °--SYMBOL: token [0/0] {94} - ¦ ¦ ¦ ¦--',': , [0/4] {96} - ¦ ¦ ¦ ¦--expr: inden [1/0] {98} - ¦ ¦ ¦ ¦ °--SYMBOL: inden [0/0] {97} - ¦ ¦ ¦ ¦--',': , [0/4] {99} - ¦ ¦ ¦ ¦--COMMENT: # tra [1/4] {100} - ¦ ¦ ¦ ¦--expr: use_r [1/0] {102} - ¦ ¦ ¦ ¦ °--SYMBOL: use_r [0/0] {101} - ¦ ¦ ¦ ¦--',': , [0/4] {103} - ¦ ¦ ¦ ¦--expr: reind [1/2] {105} - ¦ ¦ ¦ ¦ °--SYMBOL: reind [0/0] {104} - ¦ ¦ ¦ °--')': ) [1/0] {106} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {107} - ¦ ¦ °--expr: map(c [1/0] {108} - ¦ ¦ ¦--expr: map [0/0] {110} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: map [0/0] {109} - ¦ ¦ ¦--'(': ( [0/0] {111} - ¦ ¦ ¦--expr: compa [0/0] {113} - ¦ ¦ ¦ °--SYMBOL: compa [0/0] {112} - ¦ ¦ °--')': ) [0/0] {114} - ¦ °--'}': } [1/0] {115} - ¦--COMMENT: #' An [2/0] {116} - ¦--COMMENT: #' @e [1/0] {117} - ¦--COMMENT: #' \d [1/0] {118} - ¦--COMMENT: #' op [1/0] {119} - ¦--COMMENT: #' } [1/0] {120} - ¦--COMMENT: #' \d [1/0] {121} - ¦--COMMENT: #' op [1/0] {122} - ¦--COMMENT: #' } [1/0] {123} - ¦--COMMENT: #' \d [1/0] {124} - ¦--COMMENT: #' op [1/0] {125} - ¦--COMMENT: #' } [1/0] {126} - ¦--COMMENT: #' \d [1/0] {127} - ¦--COMMENT: #' op [1/0] {128} - ¦--COMMENT: #' } [1/0] {129} - ¦--COMMENT: #' \d [1/0] {130} - ¦--COMMENT: #' op [1/0] {131} - ¦--COMMENT: #' } [1/0] {132} - ¦--COMMENT: #' \d [1/0] {133} - ¦--COMMENT: #' op [1/0] {134} - ¦--COMMENT: #' } [1/0] {135} - ¦--COMMENT: #' op [1/0] {136} - ¦--COMMENT: #' \d [1/0] {137} - ¦--COMMENT: #' op [1/0] {138} - ¦--COMMENT: #' } [1/0] {139} - ¦--COMMENT: #' \d [1/0] {140} - ¦--COMMENT: #' op [1/0] {141} - ¦--COMMENT: #' } [1/0] {142} - ¦--COMMENT: #' \d [1/0] {143} - ¦--COMMENT: #' op [1/0] {144} - ¦--COMMENT: #' } [1/0] {145} - °--expr: NULL [1/0] {147} - °--NULL_CONST: NULL [0/0] {146} + l [0/0] {70} + ¦ ¦--'{': { [0/2] {71} + ¦ ¦--expr: list( [1/0] {72} + ¦ ¦ ¦--expr: list( [0/1] {73} + ¦ ¦ ¦ ¦--expr: list [0/0] {75} + ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: list [0/0] {74} + ¦ ¦ ¦ ¦--'(': ( [0/4] {76} + ¦ ¦ ¦ ¦--COMMENT: # tra [1/4] {77} + ¦ ¦ ¦ ¦--SYMBOL_SUB: initi [1/1] {78} + ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {79} + ¦ ¦ ¦ ¦--expr: list( [0/0] {80} + ¦ ¦ ¦ ¦ ¦--expr: list [0/0] {82} + ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: list [0/0] {81} + ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {83} + ¦ ¦ ¦ ¦ ¦--expr: initi [0/0] {85} + ¦ ¦ ¦ ¦ ¦ °--SYMBOL: initi [0/0] {84} + ¦ ¦ ¦ ¦ °--')': ) [0/0] {86} + ¦ ¦ ¦ ¦--',': , [0/4] {87} + ¦ ¦ ¦ ¦--expr: line_ [1/0] {89} + ¦ ¦ ¦ ¦ °--SYMBOL: line_ [0/0] {88} + ¦ ¦ ¦ ¦--',': , [0/4] {90} + ¦ ¦ ¦ ¦--expr: space [1/0] {92} + ¦ ¦ ¦ ¦ °--SYMBOL: space [0/0] {91} + ¦ ¦ ¦ ¦--',': , [0/4] {93} + ¦ ¦ ¦ ¦--expr: token [1/0] {95} + ¦ ¦ ¦ ¦ °--SYMBOL: token [0/0] {94} + ¦ ¦ ¦ ¦--',': , [0/4] {96} + ¦ ¦ ¦ ¦--expr: inden [1/0] {98} + ¦ ¦ ¦ ¦ °--SYMBOL: inden [0/0] {97} + ¦ ¦ ¦ ¦--',': , [0/4] {99} + ¦ ¦ ¦ ¦--COMMENT: # tra [1/4] {100} + ¦ ¦ ¦ ¦--expr: use_r [1/0] {102} + ¦ ¦ ¦ ¦ °--SYMBOL: use_r [0/0] {101} + ¦ ¦ ¦ ¦--',': , [0/4] {103} + ¦ ¦ ¦ ¦--expr: reind [1/2] {105} + ¦ ¦ ¦ ¦ °--SYMBOL: reind [0/0] {104} + ¦ ¦ ¦ °--')': ) [1/0] {106} + ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {107} + ¦ ¦ °--expr: map(c [1/0] {108} + ¦ ¦ ¦--expr: map [0/0] {110} + ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: map [0/0] {109} + ¦ ¦ ¦--'(': ( [0/0] {111} + ¦ ¦ ¦--expr: compa [0/0] {113} + ¦ ¦ ¦ °--SYMBOL: compa [0/0] {112} + ¦ ¦ °--')': ) [0/0] {114} + ¦ °--'}': } [1/0] {115} + ¦--COMMENT: #' An [2/0] {116} + ¦--COMMENT: #' @e [1/0] {117} + ¦--COMMENT: #' \d [1/0] {118} + ¦--COMMENT: #' op [1/0] {119} + ¦--COMMENT: #' } [1/0] {120} + ¦--COMMENT: #' \d [1/0] {121} + ¦--COMMENT: #' op [1/0] {122} + ¦--COMMENT: #' } [1/0] {123} + ¦--COMMENT: #' \d [1/0] {124} + ¦--COMMENT: #' op [1/0] {125} + ¦--COMMENT: #' } [1/0] {126} + ¦--COMMENT: #' \d [1/0] {127} + ¦--COMMENT: #' op [1/0] {128} + ¦--COMMENT: #' } [1/0] {129} + ¦--COMMENT: #' \d [1/0] {130} + ¦--COMMENT: #' op [1/0] {131} + ¦--COMMENT: #' } [1/0] {132} + ¦--COMMENT: #' \d [1/0] {133} + ¦--COMMENT: #' op [1/0] {134} + ¦--COMMENT: #' } [1/0] {135} + ¦--COMMENT: #' op [1/0] {136} + ¦--COMMENT: #' \d [1/0] {137} + ¦--COMMENT: #' op [1/0] {138} + ¦--COMMENT: #' } [1/0] {139} + ¦--COMMENT: #' \d [1/0] {140} + ¦--COMMENT: #' op [1/0] {141} + ¦--COMMENT: #' } [1/0] {142} + ¦--COMMENT: #' \d [1/0] {143} + ¦--COMMENT: #' op [1/0] {144} + ¦--COMMENT: #' } [1/0] {145} + °--expr: NULL [1/0] {147} + °--NULL_CONST: NULL [0/0] {146} diff --git a/tests/testthat/roxygen-examples-complete/12-fun-decs-in-examples-out.R b/tests/testthat/roxygen-examples-complete/12-fun-decs-in-examples-out.R index 8f0e2e533..8fd77f3af 100644 --- a/tests/testthat/roxygen-examples-complete/12-fun-decs-in-examples-out.R +++ b/tests/testthat/roxygen-examples-complete/12-fun-decs-in-examples-out.R @@ -10,7 +10,7 @@ #' pd_flat #' } #' set_line_break_before_curly_opening_style <- function() { -#' create_style_guide(line_break = tibble::lst(set_line_break_before_curly_opening)) +#' create_style_guide(line_break = list(set_line_break_before_curly_opening)) #' } #' style_text("a <- function(x) { x } #' ", style = set_line_break_before_curly_opening_style) @@ -30,9 +30,9 @@ create_style_guide <- function(initialize = default_style_guide_attributes, indention = NULL, use_raw_indention = FALSE, reindention = tidyverse_reindention()) { - lst( + list( # transformer functions - initialize = lst(initialize), + initialize = list(initialize), line_break, space, token, diff --git a/tests/testthat/roxygen-examples-complete/13-empty-lines-in.R b/tests/testthat/roxygen-examples-complete/13-empty-lines-in.R index e6b0fbeba..e1ab00834 100644 --- a/tests/testthat/roxygen-examples-complete/13-empty-lines-in.R +++ b/tests/testthat/roxygen-examples-complete/13-empty-lines-in.R @@ -33,9 +33,9 @@ create_style_guide <- function(initialize = default_style_guide_attributes, indention = NULL, use_raw_indention = FALSE, reindention = tidyverse_reindention()) { - lst( + list( # transformer functions - initialize = lst(initialize), + initialize = list(initialize), line_break, space, token, diff --git a/tests/testthat/roxygen-examples-complete/13-empty-lines-in_tree b/tests/testthat/roxygen-examples-complete/13-empty-lines-in_tree index 5d58f178d..b511569eb 100644 --- a/tests/testthat/roxygen-examples-complete/13-empty-lines-in_tree +++ b/tests/testthat/roxygen-examples-complete/13-empty-lines-in_tree @@ -1,122 +1,120 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' Cr [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' @p [1/0] {3} - ¦--COMMENT: #' [1/0] {4} - ¦--COMMENT: #' @e [1/0] {5} - ¦--COMMENT: #' # [1/0] {6} - ¦--COMMENT: #' [1/0] {7} - ¦--COMMENT: #' [1/0] {8} - ¦--COMMENT: #' # [1/0] {9} - ¦--COMMENT: #' [1/0] {10} - ¦--COMMENT: #' [1/0] {11} - ¦--COMMENT: #' [1/0] {12} - ¦--COMMENT: #' [1/0] {13} - ¦--COMMENT: #' # [1/0] {14} - ¦--COMMENT: #' a [1/0] {15} - ¦--COMMENT: #' # [1/0] {16} - ¦--COMMENT: #' \d [1/0] {17} - ¦--COMMENT: #' x [1/0] {18} - ¦--COMMENT: #' [1/0] {19} - ¦--COMMENT: #' y [1/0] {20} - ¦--COMMENT: #' [1/0] {21} - ¦--COMMENT: #' # [1/0] {22} - ¦--COMMENT: #' [1/0] {23} - ¦--COMMENT: #' a [1/0] {24} - ¦--COMMENT: #' } [1/0] {25} - ¦--COMMENT: #' @i [1/0] {26} - ¦--COMMENT: #' @e [1/0] {27} - °--expr: creat [1/0] {28} - ¦--expr: creat [0/1] {30} - ¦ °--SYMBOL: creat [0/0] {29} - ¦--LEFT_ASSIGN: <- [0/1] {31} - °--expr: funct [0/0] {32} - ¦--FUNCTION: funct [0/0] {33} - ¦--'(': ( [0/0] {34} - ¦--SYMBOL_FORMALS: initi [0/1] {35} - ¦--EQ_FORMALS: = [0/1] {36} - ¦--expr: defau [0/0] {38} - ¦ °--SYMBOL: defau [0/0] {37} - ¦--',': , [0/31] {39} - ¦--SYMBOL_FORMALS: line_ [1/1] {40} - ¦--EQ_FORMALS: = [0/1] {41} - ¦--expr: NULL [0/0] {43} - ¦ °--NULL_CONST: NULL [0/0] {42} - ¦--',': , [0/31] {44} - ¦--SYMBOL_FORMALS: space [1/1] {45} - ¦--EQ_FORMALS: = [0/1] {46} - ¦--expr: NULL [0/0] {48} - ¦ °--NULL_CONST: NULL [0/0] {47} - ¦--',': , [0/31] {49} - ¦--SYMBOL_FORMALS: token [1/1] {50} - ¦--EQ_FORMALS: = [0/1] {51} - ¦--expr: NULL [0/0] {53} - ¦ °--NULL_CONST: NULL [0/0] {52} - ¦--',': , [0/31] {54} - ¦--SYMBOL_FORMALS: inden [1/1] {55} - ¦--EQ_FORMALS: = [0/1] {56} - ¦--expr: NULL [0/0] {58} - ¦ °--NULL_CONST: NULL [0/0] {57} - ¦--',': , [0/31] {59} - ¦--SYMBOL_FORMALS: use_r [1/1] {60} - ¦--EQ_FORMALS: = [0/1] {61} - ¦--expr: FALSE [0/0] {63} - ¦ °--NUM_CONST: FALSE [0/0] {62} - ¦--',': , [0/31] {64} - ¦--SYMBOL_FORMALS: reind [1/1] {65} - ¦--EQ_FORMALS: = [0/1] {66} - ¦--expr: tidyv [0/0] {67} - ¦ ¦--expr: tidyv [0/0] {69} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: tidyv [0/0] {68} - ¦ ¦--'(': ( [0/0] {70} - ¦ °--')': ) [0/0] {71} - ¦--')': ) [0/1] {72} +ROOT (token: short_text [lag_newlines/spaces] {pos_id}) + ¦--COMMENT: #' Cr [0/0] {1} + ¦--COMMENT: #' [1/0] {2} + ¦--COMMENT: #' @p [1/0] {3} + ¦--COMMENT: #' [1/0] {4} + ¦--COMMENT: #' @e [1/0] {5} + ¦--COMMENT: #' # [1/0] {6} + ¦--COMMENT: #' [1/0] {7} + ¦--COMMENT: #' [1/0] {8} + ¦--COMMENT: #' # [1/0] {9} + ¦--COMMENT: #' [1/0] {10} + ¦--COMMENT: #' [1/0] {11} + ¦--COMMENT: #' [1/0] {12} + ¦--COMMENT: #' [1/0] {13} + ¦--COMMENT: #' # [1/0] {14} + ¦--COMMENT: #' a [1/0] {15} + ¦--COMMENT: #' # [1/0] {16} + ¦--COMMENT: #' \d [1/0] {17} + ¦--COMMENT: #' x [1/0] {18} + ¦--COMMENT: #' [1/0] {19} + ¦--COMMENT: #' y [1/0] {20} + ¦--COMMENT: #' [1/0] {21} + ¦--COMMENT: #' # [1/0] {22} + ¦--COMMENT: #' [1/0] {23} + ¦--COMMENT: #' a [1/0] {24} + ¦--COMMENT: #' } [1/0] {25} + ¦--COMMENT: #' @i [1/0] {26} + ¦--COMMENT: #' @e [1/0] {27} + °--expr: creat [1/0] {28} + ¦--expr: creat [0/1] {30} + ¦ °--SYMBOL: creat [0/0] {29} + ¦--LEFT_ASSIGN: <- [0/1] {31} + °--expr: funct [0/0] {32} + ¦--FUNCTION: funct [0/0] {33} + ¦--'(': ( [0/0] {34} + ¦--SYMBOL_FORMALS: initi [0/1] {35} + ¦--EQ_FORMALS: = [0/1] {36} + ¦--expr: defau [0/0] {38} + ¦ °--SYMBOL: defau [0/0] {37} + ¦--',': , [0/31] {39} + ¦--SYMBOL_FORMALS: line_ [1/1] {40} + ¦--EQ_FORMALS: = [0/1] {41} + ¦--expr: NULL [0/0] {43} + ¦ °--NULL_CONST: NULL [0/0] {42} + ¦--',': , [0/31] {44} + ¦--SYMBOL_FORMALS: space [1/1] {45} + ¦--EQ_FORMALS: = [0/1] {46} + ¦--expr: NULL [0/0] {48} + ¦ °--NULL_CONST: NULL [0/0] {47} + ¦--',': , [0/31] {49} + ¦--SYMBOL_FORMALS: token [1/1] {50} + ¦--EQ_FORMALS: = [0/1] {51} + ¦--expr: NULL [0/0] {53} + ¦ °--NULL_CONST: NULL [0/0] {52} + ¦--',': , [0/31] {54} + ¦--SYMBOL_FORMALS: inden [1/1] {55} + ¦--EQ_FORMALS: = [0/1] {56} + ¦--expr: NULL [0/0] {58} + ¦ °--NULL_CONST: NULL [0/0] {57} + ¦--',': , [0/31] {59} + ¦--SYMBOL_FORMALS: use_r [1/1] {60} + ¦--EQ_FORMALS: = [0/1] {61} + ¦--expr: FALSE [0/0] {63} + ¦ °--NUM_CONST: FALSE [0/0] {62} + ¦--',': , [0/31] {64} + ¦--SYMBOL_FORMALS: reind [1/1] {65} + ¦--EQ_FORMALS: = [0/1] {66} + ¦--expr: tidyv [0/0] {67} + ¦ ¦--expr: tidyv [0/0] {69} + ¦ ¦ °--SYMBOL_FUNCTION_CALL: tidyv [0/0] {68} + ¦ ¦--'(': ( [0/0] {70} + ¦ °--')': ) [0/0] {71} + ¦--')': ) [0/1] {72} °--expr: { - l [0/0] {73} - ¦--'{': { [0/2] {74} - ¦--expr: lst( - [1/0] {75} - ¦ ¦--expr: lst( - [0/1] {76} - ¦ ¦ ¦--expr: lst [0/0] {78} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: lst [0/0] {77} - ¦ ¦ ¦--'(': ( [0/4] {79} - ¦ ¦ ¦--COMMENT: # tra [1/4] {80} - ¦ ¦ ¦--SYMBOL_SUB: initi [1/1] {81} - ¦ ¦ ¦--EQ_SUB: = [0/1] {82} - ¦ ¦ ¦--expr: lst(i [0/0] {83} - ¦ ¦ ¦ ¦--expr: lst [0/0] {85} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: lst [0/0] {84} - ¦ ¦ ¦ ¦--'(': ( [0/0] {86} - ¦ ¦ ¦ ¦--expr: initi [0/0] {88} - ¦ ¦ ¦ ¦ °--SYMBOL: initi [0/0] {87} - ¦ ¦ ¦ °--')': ) [0/0] {89} - ¦ ¦ ¦--',': , [0/4] {90} - ¦ ¦ ¦--expr: line_ [1/0] {92} - ¦ ¦ ¦ °--SYMBOL: line_ [0/0] {91} - ¦ ¦ ¦--',': , [0/4] {93} - ¦ ¦ ¦--expr: space [1/0] {95} - ¦ ¦ ¦ °--SYMBOL: space [0/0] {94} - ¦ ¦ ¦--',': , [0/4] {96} - ¦ ¦ ¦--expr: token [1/0] {98} - ¦ ¦ ¦ °--SYMBOL: token [0/0] {97} - ¦ ¦ ¦--',': , [0/4] {99} - ¦ ¦ ¦--expr: inden [1/0] {101} - ¦ ¦ ¦ °--SYMBOL: inden [0/0] {100} - ¦ ¦ ¦--',': , [0/4] {102} - ¦ ¦ ¦--COMMENT: # tra [1/4] {103} - ¦ ¦ ¦--expr: use_r [1/0] {105} - ¦ ¦ ¦ °--SYMBOL: use_r [0/0] {104} - ¦ ¦ ¦--',': , [0/4] {106} - ¦ ¦ ¦--expr: reind [1/2] {108} - ¦ ¦ ¦ °--SYMBOL: reind [0/0] {107} - ¦ ¦ °--')': ) [1/0] {109} - ¦ ¦--SPECIAL-PIPE: %>% [0/4] {110} - ¦ °--expr: map(c [1/0] {111} - ¦ ¦--expr: map [0/0] {113} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: map [0/0] {112} - ¦ ¦--'(': ( [0/0] {114} - ¦ ¦--expr: compa [0/0] {116} - ¦ ¦ °--SYMBOL: compa [0/0] {115} - ¦ °--')': ) [0/0] {117} - °--'}': } [1/0] {118} + l [0/0] {73} + ¦--'{': { [0/2] {74} + ¦--expr: list( [1/0] {75} + ¦ ¦--expr: list( [0/1] {76} + ¦ ¦ ¦--expr: list [0/0] {78} + ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: list [0/0] {77} + ¦ ¦ ¦--'(': ( [0/4] {79} + ¦ ¦ ¦--COMMENT: # tra [1/4] {80} + ¦ ¦ ¦--SYMBOL_SUB: initi [1/1] {81} + ¦ ¦ ¦--EQ_SUB: = [0/1] {82} + ¦ ¦ ¦--expr: list( [0/0] {83} + ¦ ¦ ¦ ¦--expr: list [0/0] {85} + ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: list [0/0] {84} + ¦ ¦ ¦ ¦--'(': ( [0/0] {86} + ¦ ¦ ¦ ¦--expr: initi [0/0] {88} + ¦ ¦ ¦ ¦ °--SYMBOL: initi [0/0] {87} + ¦ ¦ ¦ °--')': ) [0/0] {89} + ¦ ¦ ¦--',': , [0/4] {90} + ¦ ¦ ¦--expr: line_ [1/0] {92} + ¦ ¦ ¦ °--SYMBOL: line_ [0/0] {91} + ¦ ¦ ¦--',': , [0/4] {93} + ¦ ¦ ¦--expr: space [1/0] {95} + ¦ ¦ ¦ °--SYMBOL: space [0/0] {94} + ¦ ¦ ¦--',': , [0/4] {96} + ¦ ¦ ¦--expr: token [1/0] {98} + ¦ ¦ ¦ °--SYMBOL: token [0/0] {97} + ¦ ¦ ¦--',': , [0/4] {99} + ¦ ¦ ¦--expr: inden [1/0] {101} + ¦ ¦ ¦ °--SYMBOL: inden [0/0] {100} + ¦ ¦ ¦--',': , [0/4] {102} + ¦ ¦ ¦--COMMENT: # tra [1/4] {103} + ¦ ¦ ¦--expr: use_r [1/0] {105} + ¦ ¦ ¦ °--SYMBOL: use_r [0/0] {104} + ¦ ¦ ¦--',': , [0/4] {106} + ¦ ¦ ¦--expr: reind [1/2] {108} + ¦ ¦ ¦ °--SYMBOL: reind [0/0] {107} + ¦ ¦ °--')': ) [1/0] {109} + ¦ ¦--SPECIAL-PIPE: %>% [0/4] {110} + ¦ °--expr: map(c [1/0] {111} + ¦ ¦--expr: map [0/0] {113} + ¦ ¦ °--SYMBOL_FUNCTION_CALL: map [0/0] {112} + ¦ ¦--'(': ( [0/0] {114} + ¦ ¦--expr: compa [0/0] {116} + ¦ ¦ °--SYMBOL: compa [0/0] {115} + ¦ °--')': ) [0/0] {117} + °--'}': } [1/0] {118} diff --git a/tests/testthat/roxygen-examples-complete/13-empty-lines-out.R b/tests/testthat/roxygen-examples-complete/13-empty-lines-out.R index e6b0fbeba..e1ab00834 100644 --- a/tests/testthat/roxygen-examples-complete/13-empty-lines-out.R +++ b/tests/testthat/roxygen-examples-complete/13-empty-lines-out.R @@ -33,9 +33,9 @@ create_style_guide <- function(initialize = default_style_guide_attributes, indention = NULL, use_raw_indention = FALSE, reindention = tidyverse_reindention()) { - lst( + list( # transformer functions - initialize = lst(initialize), + initialize = list(initialize), line_break, space, token, diff --git a/tests/testthat/test-cache-with-r-cache.R b/tests/testthat/test-cache-with-r-cache.R index a65d0372b..3d5399157 100644 --- a/tests/testthat/test-cache-with-r-cache.R +++ b/tests/testthat/test-cache-with-r-cache.R @@ -3,7 +3,7 @@ test_that("Cache management works", { expect_false(cache_info(format = "tabular")$activated) local_test_setup(cache = TRUE) # at fresh startup - expect_s3_class(cache_info(format = "tabular"), "tbl_df") + expect_s3_class(cache_info(format = "tabular"), "data.frame") expect_error(capture.output(cache_info()), NA) expect_equal(basename(cache_activate()), styler_version) expect_equal(basename(cache_activate("xyz")), "xyz") diff --git a/tests/testthat/test-transformers-drop.R b/tests/testthat/test-transformers-drop.R index 18ce38eaf..bad49dab1 100644 --- a/tests/testthat/test-transformers-drop.R +++ b/tests/testthat/test-transformers-drop.R @@ -8,7 +8,7 @@ remove_space_after_excl_ <- function(pd_flat) { } t <- create_style_guide( - space = lst(remove_space_after_excl_), + space = list(remove_space_after_excl_), transformers_drop = specify_transformers_drop( spaces = list(remove_space_after_excl_ = c("'!'")) ), @@ -17,17 +17,17 @@ t <- create_style_guide( ) t_no_drop <- create_style_guide( - space = lst(remove_space_after_excl_), + space = list(remove_space_after_excl_), transformers_drop = NULL, ) t_empty_drop1 <- create_style_guide( - space = lst(remove_space_after_excl_), + space = list(remove_space_after_excl_), transformers_drop = list(space = list()), ) t_empty_drop2 <- create_style_guide( - space = lst(remove_space_after_excl_), + space = list(remove_space_after_excl_), transformers_drop = list(), ) @@ -142,7 +142,7 @@ test_that("can handle old style guide without transformer object", { test_that("can handle default", { t_no_drop <- create_style_guide( - space = lst(remove_space_after_excl_), + space = list(remove_space_after_excl_), style_guide_name = "styler::t@https://github.com/r-lib", style_guide_version = as.character(packageVersion("styler")) ) diff --git a/vignettes/customizing_styler.Rmd b/vignettes/customizing_styler.Rmd index ccf5d519c..5a681c435 100644 --- a/vignettes/customizing_styler.Rmd +++ b/vignettes/customizing_styler.Rmd @@ -71,7 +71,7 @@ Now let's do the whole styling of a string with just this one transformer introd ```{r} space_after_opening_style <- function(are_you_sure) { create_style_guide( - space = tibble::lst(remove_space_after_opening_paren = + space = list(remove_space_after_opening_paren = if (are_you_sure) styler:::remove_space_after_opening_paren), style_guide_name = "styler::space_after_opening_style@https://github.com/r-lib/styler", style_guide_version = read.dcf(here::here("DESCRIPTION"))[, "Version"] @@ -198,7 +198,7 @@ Almost done. Now, the last thing we need to do is to use `create_style_guide()` ```{r} set_line_break_before_curly_opening_style <- function() { create_style_guide( - line_break = lst(set_line_break_before_curly_opening), + line_break = list(set_line_break_before_curly_opening), style_guide_name = "styler::set_line_break_before_curly_opening_style@https://github.com/r-lib/styler", style_guide_version = read.dcf(here::here("DESCRIPTION"))[, "Version"] ) diff --git a/vignettes/detect-alignment.Rmd b/vignettes/detect-alignment.Rmd index 6f6f27caa..937d2921e 100644 --- a/vignettes/detect-alignment.Rmd +++ b/vignettes/detect-alignment.Rmd @@ -147,7 +147,7 @@ call( y = "hhjkjkbew", x = 3 ) -tribble( +tibble::tribble( ~x, ~y, "another", 1:3, "b", 1211234