Based on token, find the rows in pd that need to be indented.

compute_indent_indices(pd, token = "'('", indent_last = FALSE)

Arguments

pd

A parse table.

token

A character vector with tokens.

indent_last

Flag to indicate whether the last token in pd should be indented or not. See 'Details'.

Details

For example when token is a parenthesis, the closing parenthesis does not need indention, but if token is something else, for example a plus (+), the last token in pd needs indention.