Learn R Programming

styler (version 1.0.1)

needs_indention_one: Check whether indention is needed

Description

Indention is needed if the two conditions apply:

Usage

needs_indention_one(pd, potential_trigger_pos, other_trigger_tokens)

Arguments

pd

A parse table.

potential_trigger_pos

the index of the token in the parse table for which it should be checked whether it should trigger indention.

other_trigger_tokens

Other tokens that are going to cause indention if on the same line as the token corresponding to potential_trigger.

Value

Returns TRUE if indention is needed, FALSE otherwise.

TRUE if indention is needed, FALSE otherwise.

Details

  • there is no multi-line token between the trigger and the first line break.

  • there is no other token between the potential trigger and the first line break that is going to cause indention.