flatten_operators: Flatten some token in the nested parse table based on...

View source: R/relevel.R

flatten_operatorsR Documentation

Flatten some token in the nested parse table based on operators

Description

Certain tokens are not placed optimally in the nested parse data with compute_parse_data_nested(). For example, the token of arithmetic operations 1 + 1 + 1 should all be on the same level of nesting since the indention is the same for all but the first two terminals. Setting the indention correctly is easier to achieve if they are put on the same level of nesting.

Usage

flatten_operators(pd_nested)

Arguments

pd_nested

A nested parse table to partially flatten.


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