-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Labels
featurea feature request or enhancementa feature request or enhancement
Description
I was using rlang::blast(), and trying to understand how it works.
lazyeval::ast_() shows the actual call:
blast <- function(expr, env = caller_env()) {
eval_bare(enexpr(expr), env)
}
exp <- quo(a + b)
f <- function(x) {
lazyeval::ast_(sys.call())
invisible()
}
blast(f(!!exp))
#> ┗ ()
#> ┗ `f
#> ┗ ()
#> ┗ `~
#> ┗ ()
#> ┗ `+
#> ┗ `a
#> ┗ `b However lobstr::ast(!!x) unwraps the quosures so you don't see the actual call:
g <- function(x) {
lobstr::ast(!!sys.call())
invisible()
}
blast(g(!!exp))
#> █─g
#> └─█─`+`
#> ├─a
#> └─b Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featurea feature request or enhancementa feature request or enhancement