create_node_from_nested_root
Convert a nested tibble into a node tree
Create node from nested parse data
Construct an object of class vertical
Invoke a system command
Set indention of tokens that match regex
Bind a parse table with one of its children
compute_parse_data_nested
Obtain a nested parse table from a character vector
Propagate context to terminals
context_towards_terminals
Update the a parse table given outer context
Enhance the mapping of text to the token "SPECIAL"
Check whether indention is needed
Get chunk pattern
Prettify R code in current working directory
Nest a flat parse table
Enrich flattened parse table
Find the tokens to update when applying a reference indention
Find legit starting value for a new positional id
What's the engine pattern for rmd code chunks?
Check whether a parse table is a multi-line token
Stylers for RStudio Addins
contains_else_expr_that_needs_braces
Check whether an else expression needs braces
Set the write_tree argument
Extract terminal tokens
identify_insufficiently_parsed_stings
Identify strings that were not fully parsed
Find the block to which a token belongs
Identifies raw R code chunks
expressions_are_identical
Check whether two expressions are identical
find_line_break_position_in_multiline_call
Find index of the token before which the line should be broken
set_space_between_eq_sub_and_comma
Set space between EQ_SUB and "','"
Relocate the expressions containing the token EQ_ASSIGN
within the nested
parse table
Specify what is re-indented how
Set space between levels of nesting
Convert a character vector to an ordered factor
set_line_break_if_call_is_multi_line
Set line break for multi-line function calls
Style a string
Create a tree from text
Obtain token table from text
Set spacing of token to a certain level
default_style_guide_attributes
Initialize default style guide attributes
Find the index of the last comment in the sequence of comments-only tokens
after the token that has position pos
in pd
.
Transform a file an check the result
Transform files with transformer functions
Non-invasive pretty printing of R code
Transform Rmd contents
Get the start right
Unindent a child
Relocate all assignment expressions that contain EQ_ASSIGN
within a nest
Create valid pos_ids if possible
Revert the indention of function declaration header
Create a style guide
Flatten a parse table
Create a terminal token
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.
Ensure a correct text
of all strings
Specify spacing around math tokens
Transform code from R or Rmd files
Flatten some token in the nested parse table based on operators
Wrap an expression into an expression
Identify comments that are shebangs
Check whether indention is needed
Flatten one level of nesting with its child
Obtain robust parse data
wrap_if_else_multi_line_in_curly
Wrap if-else statement in curly braces
Ensure that the parse data is valid
Relocate an assignment expression
has_crlf_as_first_line_sep
Check if a string uses CRLF EOLs
Initialize attributes
Check whether a parse table contains a tilde
Closure to return a transformer function
Identify spinning code chunk header
Lookup which new tokens were created from "SPECIAL"
Set the multi-line column
Map the file type to a corresponding regular expression
Verify the styling
Find the index of the next non-comment in a parse table
Repeat elements of a character vector times
times and collapse it
Helper for setting spaces
Save parsing from text
Unindent a child if necessary
Lookup all tokens that have a unique token-text mapping
parse_transform_serialize
Parse, transform and serialize text
start_comments_with_space
Start comments with a space
Prettify arbitrary R code
Check whether a parse table corresponds to a certain expression
Separate chunks within Rmd contents
Create the path to a test that file
Transform a file and output a customized message
Prettify R source code
Update indention information of parse data
The tidyverse style
style_space_around_math_token
Style spacing around math tokens
Visit'em all
Run a collection of tests
Transforming test input with a transformer function
Check whether two columns match
Style a file as if it was an .R file
Transform a flat parse table with a list of transformers
Update the indention reference
serialize_parse_data_flattened
Serialize flattened parse data
Wrap an expression in curly braces
set_and_assert_arg_filetype
Set the file type argument
Wrap a sub-expression in curly braces
Style guides
Style .R
and/or .Rmd
files
Update the newlines attribute
Validate sequence of new position ids
Concentrate newlines or spaces in a string
Apply reference indention to tokens
Apply transformers to a parse table
add_line_col_to_wrapped_expr
Adds line and col information to an expression from its child
Choose the indention method for the tokens
Add column pos_id
and short
Check whether a roundtrip verification can be carried out
Assert text to be of positive length and replace it with the empty
string otherwise.
Add information about previous / next token to each terminal
Combine child and internal child
Applying reference indention of a target token
Compute the indices that need indention
Make sure all supplied file types are allowed
Check token validity
Construct *-out.R from a *-in.R
Copy a file to a temporary directory
Construct paths of a tree object given the paths of *-in.R files
Communicate the summary of styling
Communicate a warning if necessary