Skip to content

Source references from the parser

2 messages · Duncan Murdoch

#
A few days ago Brian Ripley pointed out a bug with the design of this, 
so I've changed it.  See the notes below if you were trying to work with it.
On 11/25/2006 1:51 PM, Duncan Murdoch wrote:
This is the part that changed.  The srcref attribute is no longer 
attached to each statement, because some statements are objects that 
can't have attributes.  Now a list of srcref objects is attached to the 
container of the statements:  the expression() list in the case of 
parse(), or the call to "{" which is how the parser stores a block of code.
As discussed, this facility was added to Sweave, but currently (and 
probably permanently) defaults to not being turned on.
I think the debugger will now only use deparsed output, since the srcref 
is no longer part of the statement.
I haven't done this yet, and I'm not sure I'll have time to get to it 
before 2.5.0.
This hasn't been done either.
That's still true.

Duncan Murdoch
#
On 12/19/2006 11:44 PM, Duncan Murdoch wrote:
I didn't notice an error in the paragraph above until just now:  the 
option isn't "useSource", it's "keep.source".  "useSource" is the name 
of an argument used when deciding how to print something.

  > This is the part that changed.  The srcref attribute is no longer