children: Extract or Replace All Children of an RStatic Object

Description Usage Arguments Value See Also Examples

View source: R/child.R

Description

This function extracts or replaces all children of the given node.

Usage

1
2
3
children(node)

children(node) <- value

Arguments

node

(ASTNode) The node from which to extract or replace the children.

value

(list) A named list of objects to replace the children with. Names should match field names of node.

Value

A list of the child nodes.

See Also

child to extract or replace a single, specific descendant slightly more efficiently.

Examples

1
2
3
4
code = quote_ast(x <- 3)
children(code)

children(code) = list(read = Integer$new(42), write = Symbol$new("y"))

nick-ulle/ast documentation built on Oct. 18, 2019, 4:37 a.m.