add_line_col_to_wrapped_expr
Adds line and col information to an expression from its child
Combine child and internal child
Add information about previous / next token to each terminal
Apply transformers to a parse table
Bind a parse table with one of its children
Check token validity
Communicate the summary of styling
Assert text to be of positive length and replace it with the empty
string otherwise.
Make sure all supplied file types are allowed
Concentrate newlines or spaces in a string
Check if a cache is activated
Clear the cache
Applying reference indention of a target token
alignment_has_correct_spacing_around_comma
Check if spacing around comma is correct
Serialize text from a parse table
Ensure correct positional information for stylerignore expressions
alignment_has_correct_spacing_around_eq_sub
Check if spacing around =
is correct
Checks if all arguments of column 1 are named
Activate or deactivate the styler cache
Remove all comment tokens
Show information about the styler cache
Capture and post-process the output of style_file
without causing side
effects
Cache text
Where is the cache?
Check whether a round trip verification can be carried out
context_towards_terminals
Update the a parse table given outer context
contains_else_expr_that_needs_braces
Check whether an else expression needs braces
alignment_serialize_column
Serialize all lines for a given column
Remember the past to be quicker in the future
Make a key for R.cache
Find the groups of expressions that should be processed together
convert_newlines_to_linebreaks
Replace the newline character with a line break
Compute the indices that need indention
Invoke a system command
Communicate a warning if necessary
Construct an object of class vertical
Create a style guide
create_node_from_nested_root
Convert a nested tibble into a node tree
Propagate context to terminals
Construct paths of a tree object given the paths of *-in.R files
Create a terminal token
The elements that are added to this environment are:
Create node from nested parse data
Create a tree from text
default_style_guide_attributes
Initialize default style guide attributes
Ensure a correct text
of all strings
Convert a character vector to an ordered factor
Copy a file to a temporary directory
Ensure that the parse data is valid
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
Create valid pos_ids if possible
find_blank_lines_to_next_block
Number of lines between cache blocks
Enhance the mapping of text to the token "SPECIAL"
Choose the indention method for the tokens
Enrich flattened parse table
Standardize text for hashing
find_blank_lines_to_next_expr
Find blank lines
identify_insufficiently_parsed_stings
Identify strings that were not fully parsed
Find legit starting value for a new positional id
Add positional information of token to next terminal
Ensure there is one (and only one) blank line at the end of a vector
Identifies raw Rmd or Rnw code chunks
Find the block to which a token belongs
What's the engine pattern for rmd code chunks?
Flatten one level of nesting with its child
Find the tokens to update when applying a reference indention
get_addins_style_transformer_name
Return the style function or name
Find dontrun and friend sequences
Identify comments that are shebangs
Find the pos ids to keep
Flatten a parse table
Identify spinning code chunk header
identify_start_to_stop_of_roxygen_examples_from_text
Figure out where code examples start and stop
Lookup all tokens that have a unique token-text mapping
Find the index of the next or previous non-comment in a parse table.
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.
Closure to return a transformer function
Get the value of an option
Nest a flat parse table
if_for_while_part_requires_braces
Check if if, for or while loop expression require a braces.
Parse roxygen comments into text
Save parsing from text
Drop-in replacement for xfun:::invalid_utf8()
Tell me what the next terminal is
Specify what is re-indented how
Map the file type to a corresponding regular expression
Check if text is cached
compute_parse_data_nested
Obtain a nested parse table from a character vector
Print styled code
Get chunk pattern
Repeat elements of a character vector times
times and collapse it
Relocate the expressions containing the token EQ_ASSIGN
within the nested
parse table
Convert a serialized R object to a certain version.
Match a stop candidate to a start
Specify spacing around math tokens
parse_transform_serialize_roxygen
Parse, transform and serialize roxygen comments
n_times_faster_with_cache
Times two function calls with temporarily enabled cache
Initialize attributes
Work with parser versions
Relocate all assignment expressions that contain EQ_ASSIGN
within a nest
style_roxygen_code_example
Style a roxygen code example that may contain dontrun and friends
Asks the user to supply a style
Helper for setting spaces
Relocate an assignment expression
Turn off styling for parts of the code
parse_transform_serialize_r
Parse, transform and serialize text
Separate chunks within Rmd and Rnw contents
set_line_break_before_curly_opening
Set line break before a curly brace
Changing the line definition
parse_transform_serialize_r_block
Parse, transform and serialize a nested parse table
Prettify R code in current working directory
set_line_break_around_curly_curly
Styling around \{\{
Remove dont* mask
style_roxygen_code_example_segment
Style a roxygen code example segment
Remove roxygen header
stylerignore_consolidate_col
Consolidate columns after a merge
serialize_parse_data_flattened
Serialize flattened parse data
set_line_break_if_call_is_multi_line
Set line break for multi-line function calls
Style .R
, .Rmd
or .Rnw
files
style_text_without_curly_curly
style_text()
without rules for \{\{
Style a string
Prettify arbitrary R code
Set spaces around operators
Set the multi-line column
Set indention of tokens that match regex
Transform code from R, Rmd or Rnw files
Transform a file and output a customized message
Prettify R source code
set_and_assert_arg_filetype
Set the file type argument
Style guides
Apply a function to the contents of a file
The tidyverse style
Update the indention reference
Run a collection of tests
Construct *-out.R from a *-in.R
Check if tokens are aligned
Set space between levels of nesting
Transforming test input with a transformer function
set_space_between_eq_sub_and_comma
Set space between EQ_SUB and "','"
wrap_if_else_while_for_fun_multi_line_in_curly
Wrap if-else, while and for statements in curly braces
Style a file as if it was an .R file
Wrap an expression into an expression
Non-invasive pretty printing of R code
Update the newlines attribute
style_roxygen_example_snippet
Given a code snippet is dont* or run, style it
Validate sequence of new position ids
Transform a file an check the result
Obtain token table from text
Styles the highlighted selection in a .R
or .Rmd
file.
dir()
, but without dot-prefix
Stylers for RStudio Addins
wrap_else_multiline_curly
Add curly braces to else
Wrap an expression in curly braces
Flatten some token in the nested parse table based on operators
Verify the styling
Replace single quotes with double quotes
Create the path to a test that file
Drop all children of a top level expression that are cached
Find the index of the last comment in the sequence of comments-only tokens
after the token that has position pos
in pd
.
Extract terminal tokens
Creates a flat parse table with minimal initialization
Check whether two columns match
Wrap a multi-line statement in curly braces
Unindent a child
Check whether indention is needed
has_crlf_as_first_line_sep
Check if a string uses CRLF EOLs
Obtain robust parse data
Check whether indention is needed
Check whether a parse table corresponds to a certain expression
Wrap a sub-expression in curly braces
Lookup which new tokens were created from "SPECIAL"
Read UTF-8
Unindent a child if necessary
Check whether a parse table contains a tilde
Check whether a parse table is a multi-line token
Wrapper around style_pkg()
for access via Addin. start_comments_with_space
Start comments with a space
Drop-in replacement for xfun::read_utf8()
, with an optional warn
argument.
Split text into roxygen and non-roxygen example segments
Standardize paths in root
Revert the indention of function declaration header
Transform files with transformer functions
Set spacing of token to a certain level
Transform mixed contents
style_space_around_math_token
Style spacing around math tokens
Set the write_tree argument
Update indention information of parse data
Visit'em all
Transform a flat parse table with a list of transformers
Add the block id to a parse table
alignment_ensure_trailing_comma
Ensure last pd has a trailing comma
Add column pos_id
and short
alignment_ensure_no_closing_brace
Ensure the closing brace of the call is removed
Adds the stylerignore column
Assert the transformers
Serialize one line for a column
Apply reference indention to tokens