getDataStructures: Find the nodes in a translation unit corresponding to data...

Description Usage Arguments Author(s)

Description

This function searches the nodes in a parsed translation unit object in R and finds the nodes that define data types in C/C++. These nodes include struct and union types, typedef declarations. They do not (currently) include enumerations or C++ classes (?). One can change the type of nodes considered via the types parameter.

One can fetch all the declarations or restrict to one or more source files by specifying their (partial) name.

Usage

1
getDataStructures(p, files = character(), types = c("GCC::Node::type_decl", "GCC::Node::record_type"), includeMissingSource = TRUE)

Arguments

p

the translation object returned by parseTU.

files

a character vector giving the names (or partial names) of files of interest. This is used as part of a filter that compares the source attribute of a matching node to elements of this vector. If they "match", the node is included in the return. The concept of match uses pmatch by default

types

a character vector specifying the

includeMissingSource

a logical value that controls whether nodes which have no source attribute are included or excluded in the resulting list of nodes

Author(s)

Duncan Temple Lang


omegahat/RGCCTranslationUnit documentation built on May 24, 2019, 1:53 p.m.