[Roxygen-commits] r42 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Jun 19 03:31:25 CEST 2008


Author: pcd
Date: 2008-06-19 03:31:24 +0200 (Thu, 19 Jun 2008)
New Revision: 42

Modified:
   pkg/R/parse.R
Log:
return, reference, author; pass through unknown keys


Modified: pkg/R/parse.R
===================================================================
--- pkg/R/parse.R	2008-06-19 01:18:19 UTC (rev 41)
+++ pkg/R/parse.R	2008-06-19 01:31:24 UTC (rev 42)
@@ -57,8 +57,6 @@
 parse.default <- function(key, ...)
   as.list(structure(args.to.string(...), names=key))
 
-parse.preref <- Curry(parse.default, key='unknown')
-
 ## Possibly NA; in which case, the Roclets can do something more
 ## sophisticated with the srcref.
 parse.export <- Curry(parse.default, key='export')
@@ -88,8 +86,12 @@
 
 parse.importMethodsFrom <- Curry(parse.value, key='importMethodsFrom')
 
-parse.return <- Curry(parse.value, key='importMethodsFrom')
+parse.return <- Curry(parse.value, key='return')
 
+parse.reference <- Curry(parse.value, key='reference')
+
+parse.author <- Curry(parse.value, key='author')
+
 parse.name.description <- function(key, name, ...) {
   if (any(is.na(name),
           is.empty(...)))
@@ -143,10 +145,10 @@
 
 parser.default <- function(key, default) {
   f <- sprintf('parse.%s', key)
-  if (length(ls(1, pattern=f)) > 0) f else default
+  if (length(ls(1, pattern=f)) > 0) f else Curry(default, key=key)
 }
 
-parser.preref <- Curry(parser.default, default=parse.preref)
+parser.preref <- Curry(parser.default, default=parse.default)
 
 parser.srcref <- Curry(parser.default, default=parse.srcref)
 



More information about the Roxygen-commits mailing list