parse
function, analyse the file to link
preceding "prefix" comments to each active chunk. Those comments form
the default description for that chunk. The analysis also looks for
S4 class "setClass" calls and R.oo setConstructorS3 and setMethodS3
calls in order to link the documentation of those properly.extract.file.parse(code)
source
statements are ignored when scanning
for class definitions.Class and method definitions can take several forms, determined by expression type:
Additionally, the value may be a name of a function defined elsewhere, in which case the documentation should be copied from that other definition. This is handled using the concept of documentation links.
The setMethodS3
calls introduce additional
complexity: they will define an additional S3 generic (which
needs documentation to avoid warnings at package build time)
unless one already exists. This also is handled by "linking"
documentation. A previously unseen generic is linked to the
first defining instances, subsequent definitions of that generic
also link back to the first defining instance.