context_to_terminals: Propagate context to terminals

Description Usage Arguments Value See Also

View source: R/visit.R

Description

Implements a very specific pre-visiting scheme, namely to propagate indention, spaces and lag_newlines to inner token to terminals. This means that information regarding indention, line breaks and spaces (which is relative in pd_nested) will be converted into absolute.

Usage

1
2
3
4
5
6
7
context_to_terminals(
  pd_nested,
  outer_lag_newlines,
  outer_indent,
  outer_spaces,
  outer_indention_refs
)

Arguments

pd_nested

A nested parse table.

outer_lag_newlines

The lag_newlines to be propagated inwards.

outer_indent

The indention depth to be propagated inwards.

outer_spaces

The number of spaces to be propagated inwards.

outer_indention_refs

The reference pos id that should be propagated inwards.

Value

An updated parse table.

See Also

context_towards_terminals visitors


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