Description Usage Arguments Value Author(s) References See Also
These functions attempt to search the given node
in a sensible manner to find the relevant sub-node
as indicated by the name of the function.
Fror example, as.parm.decl
will
search a GCC::Node::function_decl
and find the first
GCC::Node::parm_decl
node, if it exists.
These are meant as convenience functions to find map from a high-level object to the first node of the target type so that we can then iterate over the nodes, starting at that one.
1 2 3 4 5 6 | as.field.decl(x, follow = TRUE, acceptableTypes =
c("GCC::Node::field_decl", "GCC::Node::var_decl",
"GCC::Node::const_decl"))
as.record.type(x, stopOnFail = TRUE)
as.parm.decl(x)
as.type.decl(x)
|
x |
a reference to a Perl GCC::Node object obtained from parsing the translation unit. |
stopOnFail |
a logical value indicating whether to generate an
error if the node could not be mapped to a record_type
or simply return |
follow |
(logical) controls whether to jump from the given node to one of its elements to find the definition of the field. |
acceptableTypes |
a character vector giving the names of the classes that are legitimate nodes for a field. |
A reference to a Perl GCC::Node object or an error.
Duncan Temple Lang <duncan@wald.ucdavis.edu>
http://www.omegahat.org/RGccTranslationUnit
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.