[Roxygen-devel] roxygen3

Hadley Wickham hadley at rice.edu
Tue Aug 28 17:29:33 CEST 2012


In that case, take a look at rocblock-parse.R (particularly
parse_text) and let me know what you come up with.

Hadley

On Tue, Aug 28, 2012 at 10:26 AM, Andrew Redd <amredd at gmail.com> wrote:
> I would be happy to contribute an extractor function to get the relevant
> comments.  We would have a dependency on parser or R>2.16 if we use Duncan's
> version that made it into the core-R. But we have all the machinery to
> extract the information.  Perhaps if we could form a standard for organizing
> the information so that the roccers could handle it.
>
> -Andrew
>
>
>
>
> On 08/28/2012 09:17 AM, Hadley Wickham wrote:
>>
>> Hi Andrew,
>>
>> The comments are still attached only to top-level expressions, so it
>> still won't work.  I'm thinking about how to change that to deal with
>> (e.g.) reference classes, so it's possible I'll figure it out, but I
>> wouldn't hold your breath.
>>
>> Hadley
>>
>> On Tue, Aug 28, 2012 at 10:13 AM, Andrew Redd <amredd at gmail.com> wrote:
>>>
>>> Hadley,
>>> Great news.  Will we be able to do the Doxygen style commenting of
>>> function
>>> parameters that I have discussed with you earlier?  Will that be possible
>>> or
>>> should I still pursue doing that within lint?
>>>
>>> Thanks,
>>> Andrew Redd
>>>
>>>
>>> On 08/27/2012 05:53 PM, Hadley Wickham wrote:
>>>>
>>>> Hi all,
>>>>
>>>> I thought I should mention I've started working on roxygen3 at
>>>> https://github.com/hadley/roxygen3.  It's a ground up rewrite of
>>>> roxygen2, aiming to produce the same results as roxygen3, but without
>>>> a completely different backend.  Currently the roxygen2 code is hard
>>>> to extend - the idea of roclets was good, but I think they were too
>>>> big - you want to be able to work at the tag level so it's easier to
>>>> add new features.
>>>>
>>>> The new roccers in roxygen3 look something like this:
>>>>
>>>> parse_dev <- function(roc, ...) {
>>>>     if (is.null(roc$dev)) return()
>>>>     list(
>>>>       title = str_c("[DEV] ", roc$title),
>>>>       description = c("This function is useful only for developers",
>>>>         roc$description),
>>>>       dev = NULL)
>>>> }
>>>>
>>>> add_roccer("dev", roc_parser(one = parse_dev))
>>>> base_prereqs[["dev"]] <- c("_intro", "title", "details")
>>>>
>>>> That defines @dev which adds a note to the title and the description
>>>> that the function is more suitable for developers than end-users.
>>>>
>>>> The interface is likely to change a lot, and I doubt the package
>>>> currently installs (although it does work with devtools::load_all),
>>>> but if you're interested please take a look. I'm hoping a stronger
>>>> foundation will make it easier to keep on top of the bugs and to
>>>> flexibly implement new features.
>>>>
>>>> Hadley
>>>>
>>>
>>
>>
>
> _______________________________________________
> Roxygen-devel mailing list
> Roxygen-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/roxygen-devel



-- 
Assistant Professor
Department of Statistics / Rice University
http://had.co.nz/


More information about the Roxygen-devel mailing list