choose_indention: Choose the indention method for the tokens

Description Usage Arguments

View source: R/visit.R


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.


choose_indention(flattened_pd, use_raw_indention)



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


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

krlmlr/styler documentation built on Oct. 25, 2020, 8:13 a.m.