getGlobalVariables | R Documentation |
getGlobalVariables
finds the global variables in a source file
or translation unit.
findGlobals
finds the use of non-local variables in a
translation unit, routine or expression.
getGlobalVariables(tu, fileFilter = character(), visitor = genGlobalVariablesCollector(), ...)
findGlobals(tu, fileFilter = character(), merge = TRUE, ignoreConst = TRUE,
visitor = genRoutineVariableRefsCollector(merge, ignoreConst), ...)
tu |
either the name of a source file or an already parsed translation unit object |
fileFilter |
a character vector. This is used to identify the files/directories of interest and to identify the cursors we want in the results. This can be a single string that is a regular expression. Alternatively, it can be a vector of directory or file names. For a vector of values, we check which correspond to actual file or directory names. For these, we filter the cursors based on whether they are in the specified file names, within files in the specified directories. For elements that are not files or directories, we use these as regular expressions. This mechanism allows us to include cursors by explicit file name, explicit directory, or by regular expression. |
visitor |
a function or S4/reference class object used as the
visitor function passed to |
... |
arguments passed |
merge |
a logical value. If |
ignoreConst |
a logical value. If |
A list of the global variables.
getRoutines
,
getCppClasses
,
getDataStructures
,
getEnums
,
getInclusions
f = system.file("exampleCode", "globalUse.c", package = "RCIndex")
getGlobalVariables(f)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.