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 308, Fri Oct 21 12:08:39 2011 UTC revision 332, Mon Mar 12 12:12:10 2012 UTC
# Line 874  Line 874 
874    ## package when we try to process S4 classes defined in code    ## package when we try to process S4 classes defined in code
875    e$.packageName <- "inlinedocs.processor"    e$.packageName <- "inlinedocs.processor"
876    for (i in exprs){    for (i in exprs){
     ## TDH 2011-04-07 Disable this tryCatch since it makes it harder  
     ##to debug errors/warnings in the evaluated code  
   
     ##tryCatch({  
877        eval(i, e)        eval(i, e)
     ##},error=function(e){  
       ##print(e)  
     ##})  
878    }    }
879    objs <- sapply(ls(e),get,e,simplify=FALSE)    objs <- sapply(ls(e),get,e,simplify=FALSE)
880    
881    docs <- list()    docs <- list()
882    
883    ## apply parsers in sequence to code and objs    ## apply parsers in sequence to code and objs
884      if(verbose)cat("Applying parsers:\n")
885    for(i in seq_along(parsers)){    for(i in seq_along(parsers)){
886      N <- names(parsers[i])      N <- names(parsers[i])
887      if(verbose){      if(verbose){
888        if(is.character(N) && N!=""){        if(is.character(N) && N!=""){
889          cat(N," ",sep="")          cat(N,"\n",sep="")
890        }else cat('. ')        }else cat('.\n')
891      }      }
892      p <- parsers[[i]]      p <- parsers[[i]]
893      ## This is the argument list that each parser receives:      ## This is the argument list that each parser receives:
894      L <- p(code=code,objs=objs,docs=docs,env=e,...)      L <- p(code=code,objs=objs,docs=docs,env=e,...)
895        #print(paste(L,"\n"))
896      docs <- combine(docs,L)      docs <- combine(docs,L)
897    }    }
898    ## post-process to collapse all character vectors    ## post-process to collapse all character vectors
# Line 908  Line 903 
903      }      }
904    }    }
905    if(verbose)cat("\n")    if(verbose)cat("\n")
906    docs    return(docs)
907  ### A list of extracted documentation from code.  ### A list of extracted documentation from code.
908  }  }
909    

Legend:
Removed from v.308  
changed lines
  Added in v.332

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