Description Usage Arguments Value Author(s) See Also Examples
This function searches a translation object in R for nodes that correspond to variable declarations. This returns the raw nodes. These can then be resolved to get complete descriptions of the variables and their data types.
1 | getVariables(dcls, addNames = TRUE, ...)
|
dcls |
the translation unit object as returned by |
addNames |
a logical value indicating whether to compute the names of the variables and put them on the resulting list |
... |
additional parameters for methods |
A list whose elements are objects of class GCC::Node::var_decl
.
Duncan Temple Lang
1 2 3 4 5 | tu = parseTU(system.file("examples", "struct.c.t00.tu", package = "RGCCTranslationUnit"))
v = getVariables(tu)
names(v)
vars = lapply(v, resolveType, tu)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.