Skip to content

Commit 98136ed

Browse files
notes on file structure.
1 parent 53ae5e1 commit 98136ed

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

CONTRIBUTING.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,39 @@
1+
## Intro
2+
13
This project follows the contributing recommendations outlined by [saamwerk](https://lorenzwalthert.github.io/saamwerk/).
2-
In particular, issues labelled with `Status: Postponed` are closed even if they are not resolved.
4+
In particular, issues labelled with `Status: Postponed` are closed even if they
5+
are not resolved.
6+
7+
## File Structure
8+
9+
The source code is organized as follows:
10+
11+
| File | Description |
12+
| -------------: |:-----------------------------------------------------------|
13+
| addins.R | ui and helpers for the Addins of styler. |
14+
| communicate.R | function to communicate to the user via the console. |
15+
| compat-dplyr.R | compatibility functions. Since styler does not depend on dplyr, we define the dplyr functions ourself.|
16+
| compat-tidyr.R | compatibility functions. Since styler does not depend on tidy, we define the tidyr functions ourself.|
17+
| expr-is.R | Functions to check whether an expression matches a predicate (e.g. whether it *is* a function call, a curly brace expression etc.). |
18+
| indent.R | Computation of whether indention is needed (needs_indention()), if so which indices are indented and how indention is it is triggered. |
19+
| initialize.R | initializer called with the visitor at each nest. |
20+
| nest.R | converting from a text representation into a flat and then into a nested parse table representation. |
21+
| nested-to-tree.R | utilities to create a tree representation from text (after text was converted into a nested parse table). |
22+
| parse.R | parse text into parse table, minor token manipulation, verification of parsed objects. |
23+
| reindent.R | Deals with token-dependent indention and re-indention, opposed to indent.R where all indention is token independent (i.e. a brace just adds one level of indention, whereas in function declaration headers (if mutli-line), indention depends on token position of "function"). |
24+
| relevel.R | Reorganizing the nested parse table, namely relocates expressions on both sides of "%>%" to the same nest. |
25+
| rules-line-break.R, rules-other.R, rules-replacement.R, rules-spacing.R | transformer rules |
26+
| serialize.R | converts flattened parse table into text representation. Complement operation to the functions in nest.R |
27+
| set-assert-args.R | Assertion and setting of arguments. |
28+
| style-guides.R | How to create style guide objects from transformers. |
29+
|styler.R | General package information. |
30+
| testing.R | function used for testing. |
31+
| token-create.R | Utilities for creating tokens, mostly to insert braces around mutli-line if statements. |
32+
| token-define.R | Defines which tokens belong to which group. |
33+
| transform-code.R, transform-files.R | Transformation of code for APIs that manipulate files (e.g. style_file()). |
34+
| ui.R | User interaces. Top-level functions for styling. |
35+
| unindent.R | Certain tokens cause unindention, e.g. closing braces. |
36+
| utils.R | low-level general purpose utilities. |
37+
| vertical.R | S3 class for pretty printing of styled code. |
38+
| visit.R | Functions that apply functions to each level of nesting, either inside out or outside in. |
39+
| zzz.R | backport imports. |

0 commit comments

Comments
 (0)