search for: parsed_src

Displaying 1 result from an estimated 1 matches for "parsed_src".

Did you mean: parse_sec
2011 May 12
1
Recursively parsing srcrefs
...ns to modify other functions while preserving the original source. I've tried to make a bit of demo of what I want to do below, and I think I may uncovered a bug in parse. f <- function(x = T) { # This is a comment if (x) return(4) if (emergency_status()) return(T) } parsed_src <- parse(text = attr(f, "source")) src_ref <- attr(parsed_src, "srcref")[[1]] f_one <- parse(text = "{ # This is a comment if (x) return(4) if (emergency_status()) return(T) }") attr(f_one, "srcref")[[1]] f_inside <- parse...