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