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