File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -152,16 +152,19 @@ relocate_eq_assign <- function(pd) {
152
152
# ' @importFrom rlang seq2
153
153
# ' @keywords internal
154
154
relocate_eq_assign_nest <- function (pd ) {
155
- idx_eq_assign <- which(pd $ token == " EQ_ASSIGN" )
156
- if (length(idx_eq_assign ) > 0 ) {
157
- block_id <- find_block_id(pd )
158
- blocks <- split(pd , block_id )
159
- pd <- map_dfr(blocks , relocate_eq_assign_one )
155
+ if (any(pd $ token == " equal_assign" )) {
156
+ pd
157
+ } else {
158
+ idx_eq_assign <- which(pd $ token == " EQ_ASSIGN" )
159
+ if (length(idx_eq_assign ) > 0 ) {
160
+ block_id <- find_block_id(pd )
161
+ blocks <- split(pd , block_id )
162
+ pd <- map_dfr(blocks , relocate_eq_assign_one )
163
+ }
164
+ pd
160
165
}
161
- pd
162
166
}
163
167
164
-
165
168
# ' Find the block to which a token belongs
166
169
# '
167
170
# ' Two assignment tokens `EQ_ASSIGN` belong to the same block if they are not
You can’t perform that action at this time.
0 commit comments