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 312, Fri Jan 13 09:22:02 2012 UTC revision 324, Wed Feb 1 17:16:32 2012 UTC
# Line 847  Line 847 
847    invisible(docs)    invisible(docs)
848  }  }
849    
850    pr=function(string,env)
851    {
852        cat(string,"=",eval(as.symbol(string),envir=env),"\n")
853    }
854  apply.parsers <- function  apply.parsers <- function
855  ### Parse code to r objs, then run all the parsers and return the  ### Parse code to r objs, then run all the parsers and return the
856  ### documentation list.  ### documentation list.
# Line 874  Line 878 
878    ## package when we try to process S4 classes defined in code    ## package when we try to process S4 classes defined in code
879    e$.packageName <- "inlinedocs.processor"    e$.packageName <- "inlinedocs.processor"
880    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({  
881        eval(i, e)        eval(i, e)
     ##},error=function(e){  
       ##print(e)  
     ##})  
882    }    }
883    objs <- sapply(ls(e),get,e,simplify=FALSE)    objs <- sapply(ls(e),get,e,simplify=FALSE)
884    
# Line 899  Line 896 
896      p <- parsers[[i]]      p <- parsers[[i]]
897      ## This is the argument list that each parser receives:      ## This is the argument list that each parser receives:
898      L <- p(code=code,objs=objs,docs=docs,env=e,...)      L <- p(code=code,objs=objs,docs=docs,env=e,...)
899        #print(paste(L,"\n"))
900      docs <- combine(docs,L)      docs <- combine(docs,L)
901    }    }
902    ## post-process to collapse all character vectors    ## post-process to collapse all character vectors
# Line 909  Line 907 
907      }      }
908    }    }
909    if(verbose)cat("\n")    if(verbose)cat("\n")
910    docs    return(docs)
911  ### A list of extracted documentation from code.  ### A list of extracted documentation from code.
912  }  }
913    

Legend:
Removed from v.312  
changed lines
  Added in v.324

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