From dmurdoch@pair.com  Thu Jun 20 13:16:31 2002
From: dmurdoch@pair.com (Duncan Murdoch)
Date: Thu, 20 Jun 2002 08:16:31 -0400
Subject: a version of source() which keeps comments ?
In-Reply-To: <x2660eryar.fsf@biostat.ku.dk>
References: <15633.43725.738497.292166@gargle.gargle.HOWL> <x2660eryar.fsf@biostat.ku.dk>
Message-ID: <gbh3huoam6f5g5kir9jt73a72q6t9fru61@4ax.com>

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
version.

 - 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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


a version of source() which keeps comments ?
Duncan Murdoch