if_for_while_part_requires_braces: Check if if, for or while loop expression require a braces.

View source: R/rules-tokens.R

if_for_while_part_requires_bracesR Documentation

Check if if, for or while loop expression require a braces.

Description

This is the case if they are multi-line and not yet wrapped into curly braces.

Usage

if_for_while_part_requires_braces(pd, key_token)

Arguments

pd

A parse table.

key_token

The token that comes right before the token that contains the expression to be wrapped (ignoring comments). For if and while loops, this is the closing "')'", for a for-loop it's "forcond".


styler documentation built on Aug. 29, 2023, 5:10 p.m.