diff options
Diffstat (limited to 'docs/dev/architecture.md')
-rw-r--r-- | docs/dev/architecture.md | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/docs/dev/architecture.md b/docs/dev/architecture.md index 1ffabc6ef..5ec5352e7 100644 --- a/docs/dev/architecture.md +++ b/docs/dev/architecture.md | |||
@@ -45,21 +45,15 @@ can be quickly updated for small modifications. | |||
45 | Some of the components of this repository are generated through automatic | 45 | Some of the components of this repository are generated through automatic |
46 | processes. These are outlined below: | 46 | processes. These are outlined below: |
47 | 47 | ||
48 | - `gen-syntax`: The kinds of tokens that are reused in several places, so a generator | 48 | - `cargo xtask codegen`: The kinds of tokens that are reused in several places, so a generator |
49 | is used. We use tera templates to generate the files listed below, based on | 49 | is used. We use `quote!` macro to generate the files listed below, based on |
50 | the grammar described in [grammar.ron]: | 50 | the grammar described in [grammar.ron]: |
51 | - [ast/generated.rs][ast generated] in `ra_syntax` based on | 51 | - [ast/generated.rs][ast generated] |
52 | [ast/generated.tera.rs][ast source] | 52 | - [syntax_kind/generated.rs][syntax_kind generated] |
53 | - [syntax_kind/generated.rs][syntax_kind generated] in `ra_syntax` based on | ||
54 | [syntax_kind/generated.tera.rs][syntax_kind source] | ||
55 | 53 | ||
56 | [tera]: https://tera.netlify.com/ | ||
57 | [grammar.ron]: ../../crates/ra_syntax/src/grammar.ron | 54 | [grammar.ron]: ../../crates/ra_syntax/src/grammar.ron |
58 | [ast generated]: ../../crates/ra_syntax/src/ast/generated.rs | 55 | [ast generated]: ../../crates/ra_syntax/src/ast/generated.rs |
59 | [ast source]: ../../crates/ra_syntax/src/ast/generated.rs.tera | ||
60 | [syntax_kind generated]: ../../crates/ra_parser/src/syntax_kind/generated.rs | 56 | [syntax_kind generated]: ../../crates/ra_parser/src/syntax_kind/generated.rs |
61 | [syntax_kind source]: ../../crates/ra_parser/src/syntax_kind/generated.rs.tera | ||
62 | |||
63 | 57 | ||
64 | ## Code Walk-Through | 58 | ## Code Walk-Through |
65 | 59 | ||
@@ -77,7 +71,7 @@ Rust syntax tree structure and parser. See | |||
77 | This is the thing that turns a flat list of events into a tree (see `EventProcessor`) | 71 | This is the thing that turns a flat list of events into a tree (see `EventProcessor`) |
78 | - `ast` provides a type safe API on top of the raw `rowan` tree. | 72 | - `ast` provides a type safe API on top of the raw `rowan` tree. |
79 | - `grammar.ron` RON description of the grammar, which is used to | 73 | - `grammar.ron` RON description of the grammar, which is used to |
80 | generate `syntax_kinds` and `ast` modules, using `cargo gen-syntax` command. | 74 | generate `syntax_kinds` and `ast` modules, using `cargo xtask codegen` command. |
81 | - `algo`: generic tree algorithms, including `walk` for O(1) stack | 75 | - `algo`: generic tree algorithms, including `walk` for O(1) stack |
82 | space tree traversal (this is cool). | 76 | space tree traversal (this is cool). |
83 | 77 | ||