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