File: codetools.Rd

package info (click to toggle)
codetools 0.2-20-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 228 kB
  • sloc: makefile: 15
file content (72 lines) | stat: -rw-r--r-- 2,157 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
\name{codetools}
\alias{codetools}
\title{Low Level Code Analysis Tools for R}
\usage{
collectLocals(e, collect) 
collectUsage(fun, name = "<anonymous>", ...) 
constantFold(e, env = NULL, fail = NULL) 
findFuncLocals(formals, body) 
findLocals(e, envir = .BaseEnv) 
findLocalsList(elist, envir = .BaseEnv)
flattenAssignment(e) 
getAssignedVar(e) 
isConstantValue(v, w) 
makeCodeWalker(..., handler, call, leaf) 
makeConstantFolder(..., leaf, handler, call, exit, isLocal, foldable,
                   isConstant, signal)
makeLocalsCollector(..., leaf, handler, isLocal, exit, collect) 
makeUsageCollector(fun, ..., name, enterLocal, enterGlobal, enterInternal,
                   startCollectLocals, finishCollectLocals, warn,
                   signal)
walkCode(e, w = makeCodeWalker()) 
}
\alias{collectLocals}
\alias{collectUsage}
\alias{constantFold}
\alias{findFuncLocals}
\alias{findLocals}
\alias{findLocalsList}
\alias{flattenAssignment}
\alias{getAssignedVar}
\alias{isConstantValue}
\alias{makeCodeWalker}
\alias{makeConstantFolder}
\alias{makeLocalsCollector}
\alias{makeUsageCollector}
\alias{walkCode}
\arguments{
  \item{e}{R expression.}
  \item{elist}{list of R expressions.}
  \item{v}{R object.}
  \item{fun}{closure.}
  \item{formals}{formal arguments of a closure.}
  \item{body}{body of a closure.}
  \item{name}{character.}
  \item{env}{character.}
  \item{envir}{environment.}
  \item{w}{code walker.}
  \item{\dots}{extra elements for code walker.}
  \item{collect}{function.}
  \item{fail}{function.}
  \item{handler}{function.}
  \item{call}{function.}
  \item{leaf}{function.}
  \item{isLocal}{function.}
  \item{exit}{function.}
  \item{enterLocal}{function.}
  \item{enterGlobal}{function.}
  \item{enterInternal}{function.}
  \item{startCollectLocals}{function.}
  \item{finishCollectLocals}{function.}
  \item{warn}{function.}
  \item{signal}{function.}
  \item{isConstant}{function.}
  \item{foldable}{function.}
}
\description{
  These functions provide some tools for analysing R code.  Mainly
  intended to support the other tools in this package and byte code
  compilation.
}
\author{Luke Tierney}
\keyword{programming}