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