From bc31d3a1534c13069700f128317b738976978b6f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 21 Aug 2022 09:14:11 +0000 Subject: [PATCH] pre-commit --- R/testing.R | 24 ++++++++++++------------ R/visit.R | 2 +- man/visit.Rd | 4 +--- man/visit_one.Rd | 23 ----------------------- 4 files changed, 14 insertions(+), 39 deletions(-) delete mode 100644 man/visit_one.Rd diff --git a/R/testing.R b/R/testing.R index 1668cd09c..191141881 100644 --- a/R/testing.R +++ b/R/testing.R @@ -164,16 +164,16 @@ NULL style_empty <- function(text, base_indention = 0) { transformers <- list( # transformer functions - initialize = list( + initialize = list( default_style_guide_attributes = default_style_guide_attributes ), - line_break = NULL, - space = NULL, - token = NULL, + line_break = NULL, + space = NULL, + token = NULL, # transformer options use_raw_indention = FALSE, - reindention = specify_reindention(), - indent_character = " ", + reindention = specify_reindention(), + indent_character = " ", NULL ) transformed_text <- parse_transform_serialize_r(text, @@ -188,18 +188,18 @@ style_empty <- function(text, base_indention = 0) { style_op <- function(text, base_indention = 0) { transformers <- list( # transformer functions - initialize = list( + initialize = list( default_style_guide_attributes = default_style_guide_attributes ), - line_break = NULL, - space = list( + line_break = NULL, + space = list( indent_op = partial(indent_op, indent_by = 2) ), - token = NULL, + token = NULL, # transformer options use_raw_indention = FALSE, - reindention = specify_reindention(), - indent_character = " ", + reindention = specify_reindention(), + indent_character = " ", NULL ) diff --git a/R/visit.R b/R/visit.R index 157822b28..d4ca38166 100644 --- a/R/visit.R +++ b/R/visit.R @@ -109,7 +109,7 @@ make_visit_one <- function(funs) { body <- rlang::call2("{", !!!all_calls) env <- rlang::as_environment(funs, rlang::base_env()) - rlang::new_function(rlang::pairlist2(pd_flat =), body, env) + rlang::new_function(rlang::pairlist2(pd_flat = ), body, env) } #' Propagate context to terminals diff --git a/man/visit.Rd b/man/visit.Rd index f2a757fc9..8c760bf7b 100644 --- a/man/visit.Rd +++ b/man/visit.Rd @@ -18,8 +18,6 @@ post_visit_one(pd_nested, fun) } \arguments{ \item{pd_nested}{A nested parse table.} - -\item{funs}{A list of transformer functions.} } \description{ Apply a list of functions to each level in a nested parse table. @@ -31,7 +29,7 @@ to the innermost level of nesting first and then going outwards). } \seealso{ Other visitors: -\code{\link{visit_one}()} +\code{\link{make_visit_one}()} } \concept{visitors} \keyword{internal} diff --git a/man/visit_one.Rd b/man/visit_one.Rd deleted file mode 100644 index 7a3bdce6b..000000000 --- a/man/visit_one.Rd +++ /dev/null @@ -1,23 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/visit.R -\name{visit_one} -\alias{visit_one} -\title{Transform a flat parse table with a list of transformers} -\usage{ -visit_one(pd_flat, funs) -} -\arguments{ -\item{pd_flat}{A flat parse table.} - -\item{funs}{A list of transformer functions.} -} -\description{ -Uses \code{\link[=Reduce]{Reduce()}} to apply each function of \code{funs} sequentially to -\code{pd_flat}. -} -\seealso{ -Other visitors: -\code{\link{visit}} -} -\concept{visitors} -\keyword{internal}