From ec74f16fe5b6d3e9d9840d020aa4ab98b791c82b Mon Sep 17 00:00:00 2001 From: Thomas Mailund Date: Wed, 7 Feb 2018 20:54:04 +0100 Subject: [PATCH] Trying to set up remote rlang... --- DESCRIPTION | 3 ++- man/make_returns_explicit_call.Rd | 20 ++++++++++++++++++++ man/transform_recursive_calls.Rd | 23 +++++++++++++++++++++++ man/translate_recursive_call_into_next.Rd | 21 +++++++++++++++++++++ 4 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 man/make_returns_explicit_call.Rd create mode 100644 man/transform_recursive_calls.Rd create mode 100644 man/translate_recursive_call_into_next.Rd diff --git a/DESCRIPTION b/DESCRIPTION index 74a0408..c7142f7 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -11,10 +11,11 @@ LazyData: true ByteCompile: true Depends: R (>= 3.1), - rlang (>= 0.1.6), + rlang, glue Suggests: covr, testthat, microbenchmark RoxygenNote: 6.0.1 +Remotes: tidyverse/rlang diff --git a/man/make_returns_explicit_call.Rd b/man/make_returns_explicit_call.Rd new file mode 100644 index 0000000..65612d0 --- /dev/null +++ b/man/make_returns_explicit_call.Rd @@ -0,0 +1,20 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/loop-transformation.R +\name{make_returns_explicit_call} +\alias{make_returns_explicit_call} +\title{Make exit points into explicit calls to return.} +\usage{ +make_returns_explicit_call(call_expr, in_function_parameter) +} +\arguments{ +\item{call_expr}{The call to modify.} + +\item{in_function_parameter}{Is the expression part of a parameter to a function call?} +} +\value{ +A modified expression. +} +\description{ +This function dispatches on a call object to set the context of recursive +expression modifications. +} diff --git a/man/transform_recursive_calls.Rd b/man/transform_recursive_calls.Rd new file mode 100644 index 0000000..c8ddd40 --- /dev/null +++ b/man/transform_recursive_calls.Rd @@ -0,0 +1,23 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/loop-transformation.R +\name{transform_recursive_calls} +\alias{transform_recursive_calls} +\title{Translate all return() expressions into +a block that assigns the parameters to local variables.} +\usage{ +transform_recursive_calls(expr, fun_name, fun) +} +\arguments{ +\item{expr}{The expression to rewrite} + +\item{fun_name}{The name of the recursive function we are rewriting} + +\item{fun}{The actual function -- we use this for the call to `match.call`.} +} +\value{ +The rewritten expression +} +\description{ +Translate all return() expressions into +a block that assigns the parameters to local variables. +} diff --git a/man/translate_recursive_call_into_next.Rd b/man/translate_recursive_call_into_next.Rd new file mode 100644 index 0000000..89999aa --- /dev/null +++ b/man/translate_recursive_call_into_next.Rd @@ -0,0 +1,21 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/loop-transformation.R +\name{translate_recursive_call_into_next} +\alias{translate_recursive_call_into_next} +\title{Translate a return() expressions into +a block that assigns the parameters to local variables and call `continue`.} +\usage{ +translate_recursive_call_into_next(recursive_call, fun) +} +\arguments{ +\item{recursive_call}{The call object where we get the parameters} + +\item{fun}{The actual function -- we use this for the call to `match.call`.} +} +\value{ +The rewritten expression +} +\description{ +Translate a return() expressions into +a block that assigns the parameters to local variables and call `continue`. +}