aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTING.md13
-rw-r--r--README.md4
-rw-r--r--crates/ra_lsp_server/src/main_loop/handlers.rs2
3 files changed, 9 insertions, 10 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index d26ecd7bc..41954c02e 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -9,7 +9,7 @@ are some areas where contributions would be **especially** welcome:
9 constraints, it's an open question how to satisfy them in the 9 constraints, it's an open question how to satisfy them in the
10 optimal way. See `ARCHITECTURE.md` for current design questions. 10 optimal way. See `ARCHITECTURE.md` for current design questions.
11 11
12* Porting libsyntax parser to libsyntax2: currently libsyntax2 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](https://github.com/rust-lang/rust/blob/6b99adeb11313197f409b4f7c4083c2ceca8a4fe/src/libsyntax/parse/parser.rs)
@@ -17,23 +17,22 @@ are some areas where contributions would be **especially** welcome:
17 [Kotlin parser](https://github.com/JetBrains/kotlin/blob/4d951de616b20feca92f3e9cc9679b2de9e65195/compiler/frontend/src/org/jetbrains/kotlin/parsing/KotlinParsing.java) 17 [Kotlin parser](https://github.com/JetBrains/kotlin/blob/4d951de616b20feca92f3e9cc9679b2de9e65195/compiler/frontend/src/org/jetbrains/kotlin/parsing/KotlinParsing.java)
18 for "how to port". 18 for "how to port".
19 19
20* Writing validators: by design, libsyntax2 is very lax about the 20* Writing validators: by design, rust-analyzer is very lax about the
21 input. For example, the lexer happily accepts unclosed strings. The 21 input. For example, the lexer happily accepts unclosed strings. The
22 idea is that there should be a higher level visitor, which walks the 22 idea is that there should be a higher level visitor, which walks the
23 syntax tree after parsing and produces all the warnings. Alas, 23 syntax tree after parsing and produces all the warnings. Alas,
24 there's no such visitor yet :( Would you like to write one? :) 24 there's no such visitor yet :( Would you like to write one? :)
25 25
26* Creating tests: it would be tremendously helpful to read each of 26* Creating tests: it would be tremendously helpful to read each of
27 libsyntax and libsyntax2 parser functions and crate a small separate 27 libsyntax and rust-analyzer parser functions and crate a small separate
28 test cases to cover each and every edge case. 28 test cases to cover each and every edge case.
29 29
30* Building stuff with libsyntax2: it would be really cool to compile 30* Building stuff with rust-analyzer: it would be really cool to compile
31 libsyntax2 to WASM and add *client side* syntax validation to rust 31 rust-analyzer to WASM and add *client side* syntax validation to rust
32 playground! 32 playground!
33 33
34 34
35Do take a look at the issue tracker, and try to read other docs in 35Do take a look at the issue tracker.
36the [./docs](https://github.com/matklad/libsyntax2/tree/master/docs) folder!
37 36
38If you don't know where to start, or have *any* questions or suggestions, 37If you don't know where to start, or have *any* questions or suggestions,
39don't hesitate to chat at [Gitter](https://gitter.im/libsyntax2/Lobby)! 38don't hesitate to chat at [Gitter](https://gitter.im/libsyntax2/Lobby)!
diff --git a/README.md b/README.md
index 9504e433d..ece4bb189 100644
--- a/README.md
+++ b/README.md
@@ -92,7 +92,7 @@ notes.
92- `algo`: generic tree algorithms, including `walk` for O(1) stack 92- `algo`: generic tree algorithms, including `walk` for O(1) stack
93 space tree traversal (this is cool) and `visit` for type-driven 93 space tree traversal (this is cool) and `visit` for type-driven
94 visiting the nodes (this is double plus cool, if you understand how 94 visiting the nodes (this is double plus cool, if you understand how
95 `Visitor` works, you understand libsyntax2). 95 `Visitor` works, you understand rust-analyzer).
96 96
97 97
98### `crates/ra_editor` 98### `crates/ra_editor`
@@ -132,7 +132,7 @@ A CLI interface to libsyntax
132 132
133### `crate/tools` 133### `crate/tools`
134 134
135Code-gen tasks, used to develop libsyntax2: 135Code-gen tasks, used to develop rust-analyzer:
136 136
137- `cargo gen-kinds` -- generate `ast` and `syntax_kinds` 137- `cargo gen-kinds` -- generate `ast` and `syntax_kinds`
138- `cargo gen-tests` -- collect inline tests from grammar 138- `cargo gen-tests` -- collect inline tests from grammar
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs
index 568f5344c..b2ebc9cdc 100644
--- a/crates/ra_lsp_server/src/main_loop/handlers.rs
+++ b/crates/ra_lsp_server/src/main_loop/handlers.rs
@@ -407,7 +407,7 @@ pub fn publish_diagnostics(
407 range: d.range.conv_with(&line_index), 407 range: d.range.conv_with(&line_index),
408 severity: Some(DiagnosticSeverity::Error), 408 severity: Some(DiagnosticSeverity::Error),
409 code: None, 409 code: None,
410 source: Some("libsyntax2".to_string()), 410 source: Some("rust-analyzer".to_string()),
411 message: d.message, 411 message: d.message,
412 related_information: None, 412 related_information: None,
413 }).collect(); 413 }).collect();