a version of source() which keeps comments ?

Duncan Murdoch dmurdoch@pair.com
Thu, 20 Jun 2002 08:16:31 -0400

On 20 Jun 2002 13:21:00 +0200, you wrote:
>(This kind of stuff has long been on my might-do list of projects,
>along with (re)fixing the comment issue and providing better
>information on parse/eval errors. I'd better not feel possessive about
>the ideas...)

If this were done, it would be nice to do it in a way that would allow
better debugging hooks sometime in the future.  Specifically:

 - the error mechanism should know the filename and line number that
was being parsed when the error occurred, and should report them.

 - as functions are being defined the filename and line numbers
corresponding to (the start of) each statement should be saveable, so
a debugger could work on the source file, instead of on the deparsed

 - it should be possible to set a (conditional?) breakpoint on a line
number in a file.

I'm not saying that we should hold off on getting source() right until
we can do all of the above, just that if possible those things should
be kept in mind as source is being fixed.

Duncan Murdoch
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch