Learn R Programming

styler (version 1.3.0)

add_token_terminal: Add information about previous / next token to each terminal

Description

Add information about previous / next token to each terminal

Initialise variables related to caching

Usage

add_terminal_token_after(pd_flat)

add_terminal_token_before(pd_flat)

add_attributes_caching(pd_flat, transformers)

remove_terminal_token_before_and_after(pd_flat)

Arguments

pd_flat

A flat parse table.

transformers

A list with transformer functions, used to check if the code is cached.

Functions

  • add_attributes_caching: Initializes newlines and lag_newlines.

  • remove_terminal_token_before_and_after: Removes column terimnal_token_before. Might be used to prevent the use of invalidated information, e.g. if tokens were added to the nested parse table.