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 118, Fri Jun 18 16:32:29 2010 UTC revision 128, Wed Sep 22 09:24:39 2010 UTC
# Line 140  Line 140 
140           list(examples = paste(ex, collapse = "\n"), value = value)           list(examples = paste(ex, collapse = "\n"), value = value)
141         }),         }),
142         ## PhG: here is what I propose for examples code in the 'ex' attribute         ## PhG: here is what I propose for examples code in the 'ex' attribute
143         examples.in.attr = list(forfun, function (name, o, ...) {         examples.in.attr = list(forall, function (name, o, ...) {
144           ex <- attr(o, "ex")           ex <- attr(o, "ex")
145           if (!is.null(ex)) {           if (!is.null(ex)) {
146             ## Special case for code contained in a function             ## Special case for code contained in a function
# Line 161  Line 161 
161             }             }
162             list(examples = paste(ex, collapse = "\n"))             list(examples = paste(ex, collapse = "\n"))
163           } else list()           } else list()
164         }))         })
165           )
166    
167  ### List of parser functions that operate on single objects. This list  ### List of parser functions that operate on single objects. This list
168  ### is useful for testing these functions, ie  ### is useful for testing these functions.
 ### lonely$parsefun(attr(extract.docs.file,"source"),"extract.docs.file")  
169  lonely <- sapply(forall.parsers,function(L)L[[2]])  lonely <- sapply(forall.parsers,function(L)L[[2]])
170    attr(lonely,"ex") <- function(){
171      lonely$parsefun(attr(extract.docs.file,"source"),"extract.docs.file")
172    }
173    
174  extra.code.docs <- function # Extract documentation from code chunks  extra.code.docs <- function # Extract documentation from code chunks
175  ### Parse R code to extract inline documentation from comments around  ### Parse R code to extract inline documentation from comments around

Legend:
Removed from v.118  
changed lines
  Added in v.128

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