Skip to content
Permalink
Browse files

fix parser -> R3 in the recent fix

  • Loading branch information...
daroczig committed Jul 27, 2014
1 parent d4ad612 commit 70de2fc7f093e081c92b00be14cfdfd43cbbe233
Showing with 3 additions and 5 deletions.
  1. +3 −5 R/sandbox.R
@@ -76,12 +76,10 @@ sandbox.pretest <- function(src, blacklist = as.character(unlist(commands.blackl
lapply(p, function(c) {

d <- deparse(c)
t <- textConnection(d)
s <- suppressWarnings(tryCatch(parser(t), error = function(e) NULL))
close(t)
if (is.null(nrow(attr(s, 'data'))))
s <- suppressWarnings(tryCatch(parse(text = d), error = function(e) e))
if (inherits(s, 'error'))
stop(paste0('Parsing command (`', d, '`) failed, possible syntax error.'))
l <- attr(s, 'data')
l <- getParseData(s)
f <- which(l$token.desc == 'SYMBOL_FUNCTION_CALL')
calls <- l$text[f]

0 comments on commit 70de2fc

Please sign in to comment.
You can’t perform that action at this time.