88# ' @keywords internal
99NULL
1010
11- # ' @describeIn update_indention Is used to indent for and statements and function
12- # ' definitions without parenthesis.
11+ # ' @describeIn update_indention Is used to indent for and statements and
12+ # ' function definitions without parenthesis.
1313# ' @keywords internal
1414indent_without_paren_for_while_fun <- function (pd , indent_by ) {
1515 tokens <- c(" FOR" , " WHILE" , " FUNCTION" )
@@ -39,7 +39,9 @@ indent_without_paren_if_else <- function(pd, indent_by) {
3939 if (! is_if ) {
4040 return (pd )
4141 }
42- needs_indention_now <- pd $ lag_newlines [next_non_comment(pd , which(pd $ token == " ')'" ))] > 0
42+ needs_indention_now <- pd $ lag_newlines [
43+ next_non_comment(pd , which(pd $ token == " ')'" ))
44+ ] > 0
4345
4446 if (needs_indention_now ) {
4547 pd $ indent [expr_after_if ] <- indent_by
@@ -57,7 +59,9 @@ indent_without_paren_if_else <- function(pd, indent_by) {
5759 pd $ child [[expr_after_else_idx ]]$ token [1 ] != " '{'" &&
5860 pd $ child [[expr_after_else_idx ]]$ token [1 ] != " IF"
5961
60- needs_indention_now <- pd $ lag_newlines [next_non_comment(pd , which(pd $ token == " ELSE" ))] > 0
62+ needs_indention_now <- pd $ lag_newlines [
63+ next_non_comment(pd , which(pd $ token == " ELSE" ))
64+ ] > 0
6165
6266 if (has_else_without_curly_or_else_chid && needs_indention_now ) {
6367 pd $ indent [seq(else_idx + 1 , nrow(pd ))] <- indent_by
@@ -231,7 +235,8 @@ pd_multi_line <- function(pd) {
231235# ' R/rules-spacing.R for tokens at the end of a line since this allows styling
232236# ' without touching indention.
233237# ' @param pd A parse table.
234- # ' @return A parse table with synchronized `lag_newlines` and `newlines` columns.
238+ # ' @return A parse table with synchronized `lag_newlines` and `newlines`
239+ # ' columns.
235240# ' @seealso choose_indention
236241# ' @keywords internal
237242update_newlines <- function (pd ) {
0 commit comments