Description Usage Arguments Value Author(s) Examples
This function and its methods allow us to query the value associated with a particular node in the translation unit. Often these are literals or constants.
1 |
node |
the translation unit node |
defaultValue |
if no value is available, return this value |
symbolic |
never used. The idea was (I think) to allow the value be returned symbolically as an expression if it were more than a literal, e.g. x + 1 or PI + 1 |
An object!
Duncan Temple Lang
1 2 3 4 5 6 7 8 9 10 11 12 | tu = parseTU(system.file("examples", "value.cc.001t.tu", package = "RGCCTranslationUnit"))
getValue(tu[[23]]) # 3.1415
getValue(tu[[20]]) # pi - an identifier_node
getValue(tu[[22]]) # y - variable declaration
getValue(tu[[27]]) # -1
getValue(tu[[3]]) # C routine name. foo
getValue(tu[[39]]) # 'foo'
getValue(tu[[67]]) # 'foo bar chicken '
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.