Rlang-QQ-0.0.0.2: rsrc/Tree.R
rlangQQ_show <- function(x) paste("'",gsub("'","\\\\'", x),"'", sep='')
rlangQQ_toTree <- function(e)
if (is.symbol(e)) paste('Node', rlangQQ_show(e), '[]') else {
paste('Node',
rlangQQ_show(e[[1]]),
if (length(e) < 2) '[]' else
paste('[', paste(sapply(2:length(e), function(i) rlangQQ_toTree(e[[i]])), collapse=', '), ']') )
}