Skip to content

Commit

Permalink
make things work for R < 3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzwalthert committed Jan 23, 2021
1 parent 781f796 commit 9c4fc1e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion R/style-guides.R
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,11 @@ tidyverse_style <- function(scope = "tokens",
token = list(
resolve_semicolon = "';'",
add_brackets_in_pipe = "SPECIAL-PIPE",
force_assignment_op = c("token" = "EQ_ASSIGN"),
# before 3.6, these assignments are not wrapped into top level expression
# and `text` supplied to transformer_subset() is "", so it appears to not
# contain EQ_ASSIGN, and the transformer is falsely removed.
# compute_parse_data_nested / text_to_flat_pd ('a = 4')
if (getRversion() >= 3.6) force_assignment_op <- "EQ_ASSIGN",
wrap_if_else_while_for_fun_multi_line_in_curly = c("IF", "WHILE", "FOR", "FUNCTION")
),
line_break = list(
Expand Down

0 comments on commit 9c4fc1e

Please sign in to comment.