You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The C++ parser introduced two main entry points, roxygen2:::preparse_file(<file>) and roxygen2:::preparse_block(<block>). The goal was for this to be a (near) drop-in replacement for parse.preref, so that those functions could potentially be used in that situation.
E.g.
lines<-"#' @param foo A parameter.\n#' @param bar Another parameter.\n"roxygen2:::parse.preref(lines)
roxygen2:::preparse_block(lines)
I think early on you indicated that you wanted the preparse_block to do as little as possible, hence the contents of the @param tag aren't actually split up. That said, I'm open to amending the implementation of the preparse functions to generate output that's useful.
Activity
hadley commentedon Oct 5, 2015
What needs to be done here?
kevinushey commentedon Oct 6, 2015
The C++ parser introduced two main entry points,
roxygen2:::preparse_file(<file>)androxygen2:::preparse_block(<block>). The goal was for this to be a (near) drop-in replacement forparse.preref, so that those functions could potentially be used in that situation.E.g.
Comparing output,
I think early on you indicated that you wanted the
preparse_blockto do as little as possible, hence the contents of the@paramtag aren't actually split up. That said, I'm open to amending the implementation of the preparse functions to generate output that's useful.hadley commentedon Oct 6, 2015
It seems to be a bit too accepting currently:
This should return NULL because there's no roxygen there
hadley commentedon Oct 6, 2015
Revised parse.file will need to look something like this:
Would be nice if
preparse_block()could take a srcref directly.