diff options
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r-- | CONTRIBUTING.md | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 41954c02e..c044001ca 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md | |||
@@ -12,9 +12,9 @@ are some areas where contributions would be **especially** welcome: | |||
12 | * Porting libsyntax parser to rust-analyzer: currently rust-analyzer parses | 12 | * Porting libsyntax parser to rust-analyzer: currently rust-analyzer parses |
13 | only a tiny subset of Rust. This should be fixed by porting parsing | 13 | only a tiny subset of Rust. This should be fixed by porting parsing |
14 | functions from libsyntax one by one. Take a look at the | 14 | functions from libsyntax one by one. Take a look at the |
15 | [libsyntax parser](https://github.com/rust-lang/rust/blob/6b99adeb11313197f409b4f7c4083c2ceca8a4fe/src/libsyntax/parse/parser.rs) | 15 | [libsyntax parser] |
16 | for "what to port" and at the | 16 | for "what to port" and at the |
17 | [Kotlin parser](https://github.com/JetBrains/kotlin/blob/4d951de616b20feca92f3e9cc9679b2de9e65195/compiler/frontend/src/org/jetbrains/kotlin/parsing/KotlinParsing.java) | 17 | [Kotlin parser] |
18 | for "how to port". | 18 | for "how to port". |
19 | 19 | ||
20 | * Writing validators: by design, rust-analyzer is very lax about the | 20 | * Writing validators: by design, rust-analyzer is very lax about the |
@@ -35,4 +35,23 @@ are some areas where contributions would be **especially** welcome: | |||
35 | Do take a look at the issue tracker. | 35 | Do take a look at the issue tracker. |
36 | 36 | ||
37 | If you don't know where to start, or have *any* questions or suggestions, | 37 | If you don't know where to start, or have *any* questions or suggestions, |
38 | don't hesitate to chat at [Gitter](https://gitter.im/libsyntax2/Lobby)! | 38 | don't hesitate to chat at [Gitter]! |
39 | |||
40 | # Code generation | ||
41 | |||
42 | Some of the components of this repository are generated through automatic processes. These are outlined below: | ||
43 | |||
44 | - `gen-kinds`: The kinds of tokens are reused in several places, so a generator is used. | ||
45 | This process uses [tera] to generate, using data in [grammar.ron], the files: | ||
46 | - [ast/generated.rs][ast generated] in `ra_syntax` based on [ast/generated.tera.rs][ast source] | ||
47 | - [syntax_kinds/generated.rs][syntax_kinds generated] in `ra_syntax` based on [syntax_kinds/generated.tera.rs][syntax_kinds source] | ||
48 | |||
49 | [libsyntax parser]: https://github.com/rust-lang/rust/blob/6b99adeb11313197f409b4f7c4083c2ceca8a4fe/src/libsyntax/parse/parser.rs | ||
50 | [Kotlin parser]: https://github.com/JetBrains/kotlin/blob/4d951de616b20feca92f3e9cc9679b2de9e65195/compiler/frontend/src/org/jetbrains/kotlin/parsing/KotlinParsing.java | ||
51 | [Gitter]: https://gitter.im/libsyntax2/Lobby | ||
52 | [tera]: https://tera.netlify.com/ | ||
53 | [grammar.ron]: ./crates/ra_syntax/src/grammar.ron | ||
54 | [ast generated]: ./crates/ra_syntax/src/ast/generated.rs | ||
55 | [ast source]: ./crates/ra_syntax/src/ast/generated.tera.rs | ||
56 | [syntax_kinds generated]: ./crates/ra_syntax/src/syntax_kinds/generated.rs | ||
57 | [syntax_kinds source]: ./crates/ra_syntax/src/syntax_kinds/generated.tera.rs \ No newline at end of file | ||