Update indention information of parse data
indent_braces(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)
indent_without_paren_for_while_fun(pd, indent_by)
indent_without_paren_if_else(pd, indent_by)
A nested or flat parse table that is already enhanced with
line break and space information via initialize_attributes()
.
How many spaces should be added after the token of interest.
The token the indention should be based on.
indent_braces
: Inserts indention based on round, square and
curly 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 for / while / if / if-else
statements that do not have curly parenthesis.
indent_without_paren_for_while_fun
: Is used to indent for and statements and function
definitions without parenthesis.
indent_without_paren_if_else
: Is used to indent if and if-else statements.