Skip to content

Commit

Permalink
fix dot-paren check in pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnMount committed Dec 11, 2018
1 parent 8963e61 commit 91b9bd6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/bpipe.R
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,9 @@ pipe_impl <- function(pipe_left_arg,
(length(as.character(pipe_right_arg[[1]]))==1) &&
(as.character(pipe_right_arg[[1]])=="function")
# special-case .() on RHS
dot_paren <- (is.call(pipe_right_arg) && as.character(pipe_right_arg[[1]])==".")
dot_paren <- is.call(pipe_right_arg) &&
(length(as.character(pipe_right_arg[[1]]))==1) &&
(as.character(pipe_right_arg[[1]])[[1]]==".")
# check for right-apply situations
if(is.function(pipe_right_arg) ||
is_name || qualified_name ||
Expand Down

0 comments on commit 91b9bd6

Please sign in to comment.