collapse_namespace: Collapse Namespace

Description Usage Arguments Details Examples

View source: R/collapse_namespace.R

Description

If node is a Namespace (a call to :: or :::), this function returns the Symbol the Namespace affects and stores associated namespace information in the namespace field of that Symbol. If node is not a Namespace, this function returns node unchanged.

Usage

1

Arguments

node

(ASTNode) The node to collapse.

...

Unused arguments.

Details

This function is intended as a replace function for replace_nodes().

Examples

1
2
code = quote_ast(rstatic::collapse_one_namespace)
replace_nodes(code, collapse_namespace)

nick-ulle/ast documentation built on July 17, 2018, 4:16 a.m.