Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

choose_indention

Choose the indention method for the tokens


Description

Either use the raw indention, which is just the spaces computed between the first token on a new line and the token before it, or use the indention computed according to the transformer used, which is stored in the column indention. All indention information will be combined with the space information for the first token on a new line. If use_raw_indention is set, information in the column indention will be discarded anyways. If it is not set, the first token on a new line will "inherit" the indention of the whole line. The column indention will be removed since all information necessary is contained in the spacing information of the first token on a new line and the position of the tokens will not be changed anymore at this stage.

Usage

choose_indention(flattened_pd, use_raw_indention)

Arguments

flattened_pd

A nested parse table that was turned into a flat parse table using extract_terminals().

use_raw_indention

Boolean indicating whether or not the raw indention should be used.


styler

Non-Invasive Pretty Printing of R Code

v1.4.1
MIT + file LICENSE
Authors
Kirill Müller [aut], Lorenz Walthert [cre, aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.