Apply reference indention to tokens
Assert text to be of positive length and replace it with the empty
string otherwise.
Check token validity
Add column pos_id
and short
Bind a parse table with one of its children
add_line_col_to_wrapped_expr
Adds line and col information to an expression from its child
Apply transformers to a parse table
Concentrate newlines or spaces in a string
Invoke a system command
Check whether a roundtrip verification can be carried out
Add information about previous / next token to each terminal
Create a style guide
Applying reference indention of a target token
Create a terminal token
Flatten a parse table
Combine child and internal child
Generate a comprehensive collection test cases for comment / insertion
interaction
Test consist of if / if-else / if-else-if-else cases, paired with various
line-break and comment configurations. Used for internal testing.
Compute the indices that need indention
Convert a character vector to an ordered factor
compute_parse_data_nested
Obtain a nested parse table from a character vector
Choose the indention method for the tokens
Construct *-out.R from a *-in.R
contains_else_expr_that_needs_braces
Check whether an else expression needs braces
context_towards_terminals
Update the a parse table given outer context
Propagate context to terminals
Flatten some token in the nested parse table based on operators
Create node from nested parse data
Flatten one level of nesting with its child
Identify chunks within Rmd contents
Enrich flattened parse table
create_node_from_nested_root
Convert a nested tibble into a node tree
Find the index of the last comment in the sequence of comments-only tokens
after the token that has position pos
in pd
.
Create valid pos_ids if possible
Get chunk pattern
Extract terminal tokens
Obtain robust parse data
serialize_parse_data_flattened
Serialize flattened parse data
Set arguments
Relocate the expressions containing the token EQ_ASSIGN
within the nested
parse table
style_space_around_math_token
Style spacing around math tokens
Relocate all assignment expressions that contain EQ_ASSIGN
within a nest
style_space_around_math_token_one
Set spacing of token to a certain level
Enrich parse table with space and line break information
Transforming test input with a transformer function
Check whether a parse table is a multi-line token
Create the path to a test that file
Unindent a child
Prettify R code in current working directory
Update indention information of parse data
Relocate an assignment expression
Closure to return a transformer function
Find the index of the next non-comment in a parse table
Nest a flat parse table
Set indention of tokens that match regex
Repeat elements of a character vector times
times and collapse it
set_space_between_eq_sub_and_comma
Set space between EQ_SUB and "','"
Style guides
Prettify R source code
Prettify arbitrary R code
Find the block to which a token belongs
Construct paths of a tree object given the paths of *-in.R files
lookup which new tokens were created from "SPECIAL"
Construct an object of class vertical
Lookup all tokens that have a unique token-text mapping
Create a tree from text
Specify spacing around math tokens
Transform a file and output a customized message
Wrap an expression into an expression
Transform files with transformer functions
wrap_if_else_multi_line_in_curly
Wrap if-else statement in curly braces
Validate sequence of new position ids
parse_transform_serialize
Parse, transform and serialize text
Style .R
and/or .Rmd
files
Check whether a parse table corresponds to a a certain expression
Transform a file an check the result
Set the multi-line column
Transform code from R or Rmd files
start_comments_with_space
Start comments with a space
Unindent a child if necessary
Stylers for RStudio Addins
Verify the styling
Run a collection of tests
Update the indention reference
Transform Rmd contents
Update the newlines attribute
Style a file as if it was an .R file
Transform a flat parse table with a list of transformers
Enhance the mapping of text to the token "SPECIAL"
Wrap an expression in curly braces
Get the start right
set_line_break_if_call_is_multi_line
Set line break for multi-line function calls
Find legit starting value for a new positional id
Return regex patterns for re-indention
Specify what is re-indented how
Check whether indention is needed
Set space between levels of nesting
Check whether indention is needed
The tidyverse style
Helper for setting spaces
Style a string
Obtain token table from text
Non-invasive pretty printing of R code
Verify the text of strings
Visit'em all
Wrap a sub-expression in curly braces
Communicate a warning if necessary
Copy a file to a temporary directory
Communicate the summary of styling
expressions_are_identical
Check whether two expressions are identical