All functions

add_newlines add_spaces

Concentrate newlines or spaces in a string

add_terminal_token_after add_terminal_token_before

Add information about previous / next token to each terminal

apply_ref_indention_one

Applying reference indention of a target token

apply_ref_indention

Apply reference indention to tokens

apply_transformers

Apply transformers to a parse table

bind_with_child

Bind a parse table with one of its children

character_to_ordered

Convert a character vector to an ordered factor

choose_indention

Choose the indention method for the tokens

combine_children

Combine child and internal child

complete_styled_expr

Complete styled expression with unstyled fraction on start / end line

compute_indent_indices

Compute the indices that need indention

compute_parse_data_nested

Obtain a nested parse table from a character vector

construct_out

Construct *-out.R from a *-in.R

construct_tree

Construct paths of a tree object given the paths of *-in.R files

context_to_terminals

Propagate context to terminals

context_towards_terminals

Update the a parse table given outer context

create_filler

Enrich parse table with space and line break information

create_node_from_nested_root

Convert a nested tibble into a node tree

create_node_from_nested

Create node from nested parse data

create_style_guide

Create a style guide

create_tree

Create a tree from text

enhance_mapping_special

Enhance the mapping of text to the token "SPECIAL"

enrich_terminals

Enrich flattened parse table

extract_neighbourhood

Extract text around the highlighted text

extract_terminals

Extract terminal tokens

find_active_context

Helper to extract and preprocess relevant attributes from rstudioapi::getActiveDocumentContext().

flatten_operators_one

Flatten one level of nesting with its child

flatten_operators

Flatten some token in the nested parse table based on operators

flatten_pd

Flatten a parse table

lookup_new_special

lookup which new tokens were created from "SPECIAL"

make_transformer

Closure to return a transformer function

needs_indention_one

Check whether indention is needed

needs_indention

Check whether indention is needed

nest_parse_data

Nest a flat parse table

parse_transform_serialize

Parse, transform and serialize text

is_curly_expr is_function_call

Check whether a parse table corresponds to a a certain expression

prettify_any

Prettify R code in current working directory

prettify_one

Prettify one R file

rep_char

Repeat elements of a character vector times times and collapse it

serialize_parse_data_flattened

Serialize flattened parse data

set_line_break_after_opening_if_call_is_multi_line set_line_break_before_closing_if_call_is_multi_line remove_line_break_in_empty_fun_call

Set line break for multi-line function calls

set_multi_line

Set the multi-line column

set_space_between_eq_sub_and_comma

Set space between EQ_SUB and "','"

set_space_between_levels

Set space between levels of nesting

set_spaces

Helper for setting spaces

set_unindention_child

Unindent a child if necessary

start_comments_with_space

Start comments with a space

start_on_line

Get the start right

style_active_file

Style the active file

style_active_region

Style the highlighted region

style_dir

Prettify arbitrary R code

style_file

Style a file

style_guides

Style guides

style_pkg

Prettify R source code

style_region

Style a region of text given context

style_text

Style a string

styler-package

Non-invasive pretty printing of R code

test_collection

Run a collection of tests

style_empty style_indent_curly style_indent_curly_round style_op

Transforming test input with a transformer function

testthat_file

Create the path to a test that file

tidyverse_style

The tidyverse style

token_is_multi_line

Check whether a parse table is a multi-line token

tokenize

Obtain token table from text

transform_and_check

Transform a file an check the result

transform_file

Transform a file an give customized message

transform_files

Transform files with transformer functions

unindent_child

Unindent a child

update_indention_ref_fun_call update_indention_ref_fun_dec

Update the indention reference

indent_round indent_curly indent_op indent_eq_sub indent_assign indent_without_paren

Update indention information of parse data

update_newlines

Update the newlines attribute

visit_one

Transform a flat parse table with a list of transformers

pre_visit post_visit

Visit'em all