SCM

SCM Repository

[inlinedocs] Diff of /pkg/inlinedocs/R/parsers.R
ViewVC logotype

Diff of /pkg/inlinedocs/R/parsers.R

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 89, Mon May 3 13:01:06 2010 UTC revision 93, Mon May 3 14:18:47 2010 UTC
# Line 12  Line 12 
12    function(objs,docs,...){    function(objs,docs,...){
13      objs <- objs[sapply(objs,subfun)]      objs <- objs[sapply(objs,subfun)]
14      L <- list()      L <- list()
15      for(N in names(objs)){      for(N in names(docs)){
16        o <- objs[[N]]        o <- objs[[N]]
17        L[[N]] <- FUN(src=attr(o,"source"),        L[[N]] <- FUN(src=attr(o,"source"),
18                      name=N,objs=objs,o=o,docs=docs,doc=docs[[N]],...)                      name=N,objs=objs,o=o,docs=docs,doc=docs[[N]],...)
# Line 180  Line 180 
180  }  }
181    
182  ### List of parsers to use by default with package.skeleton.dx.  ### List of parsers to use by default with package.skeleton.dx.
183  default.parsers <- c(sapply(forall.parsers,function(L)L[[1]](L[[2]])),  default.parsers <- c(extract.docs.file=extract.docs.file,
184                       extract.docs.file=extract.docs.file)                       sapply(forall.parsers,function(L)L[[1]](L[[2]])))
185    
186  extract.docs.fun <- function # Extract documentation from a function  extract.docs.fun <- function # Extract documentation from a function
187  ### Given source code of a function, return a list describing inline  ### Given source code of a function, return a list describing inline
# Line 577  Line 577 
577  ### Using the same conventions as for functions, definitions of S4 classes  ### Using the same conventions as for functions, definitions of S4 classes
578  ### in the form \code{setClass("classname",\dots)} are also located and  ### in the form \code{setClass("classname",\dots)} are also located and
579  ### scanned for inline comments.  ### scanned for inline comments.
580  (doc.link)  (doc.link
581  ### DocLink object as created by \code{\link{extract.file.parse}}.  ### DocLink object as created by \code{\link{extract.file.parse}}.
582  ### Note that \code{source} statements are \emph{ignored} when scanning for  ### Note that \code{source} statements are \emph{ignored} when scanning for
583  ### class definitions.  ### class definitions.
584  {   ){
585    chunk.source <- doc.link@code    chunk.source <- doc.link@code
586    ##details<<    ##details<<
587    ## Extraction of S4 class documentation is currently limited to expressions    ## Extraction of S4 class documentation is currently limited to expressions

Legend:
Removed from v.89  
changed lines
  Added in v.93

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business University of Wisconsin - Madison Powered By FusionForge