Update indention information of parse data

indent_round(pd, indent_by)

indent_curly(pd, indent_by)

indent_op(pd, indent_by, token = c(math_token, logical_token, special_token,
  "LEFT_ASSIGN", "'$'"))

indent_eq_sub(pd, indent_by, token = "EQ_SUB")

indent_assign(pd, indent_by, token = NULL)

indent_without_paren(pd, indent_by = 2)

Arguments

pd

A nested or flat parse table that is already enhanced with line break and space information via create_filler().

indent_by

How many spaces should be added after the token of interest.

token

The token the indention should be based on.

Functions

  • indent_round: Inserts indention based on round brackets.

  • indent_op: Indents operators

  • indent_eq_sub: Updates indention for token EQ_SUB. Only differs from indent_op in the sense that the last token on the table where EQ_SUB occurs is not indented (seecompute_indent_indices())

  • indent_assign: Same as indent_op, but only indents one token after token, not all remaining.

  • indent_without_paren: Is used to indent if / while / for statements that do not have curly brackets.