diff options
-rw-r--r-- | .cargo/config | 2 | ||||
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | ARCHITECTURE.md | 6 | ||||
-rw-r--r-- | crates/ra_syntax/src/ast/generated.rs | 2 | ||||
-rw-r--r-- | crates/ra_syntax/src/ast/generated.rs.tera | 2 | ||||
-rw-r--r-- | crates/ra_syntax/src/grammar.ron | 2 | ||||
-rw-r--r-- | crates/ra_syntax/src/syntax_kinds/generated.rs | 2 | ||||
-rw-r--r-- | crates/ra_syntax/src/syntax_kinds/generated.rs.tera | 2 | ||||
-rw-r--r-- | crates/tools/src/main.rs | 4 | ||||
-rw-r--r-- | crates/tools/tests/cli.rs | 2 |
10 files changed, 13 insertions, 13 deletions
diff --git a/.cargo/config b/.cargo/config index ac7470c7e..fd32471ea 100644 --- a/.cargo/config +++ b/.cargo/config | |||
@@ -1,6 +1,6 @@ | |||
1 | [alias] | 1 | [alias] |
2 | # Automatically generates the ast and syntax kinds files | 2 | # Automatically generates the ast and syntax kinds files |
3 | gen-kinds = "run --package tools -- gen-kinds" | 3 | gen-syntax = "run --package tools -- gen-syntax" |
4 | gen-tests = "run --package tools -- gen-tests" | 4 | gen-tests = "run --package tools -- gen-tests" |
5 | install-code = "run --package tools -- install-code" | 5 | install-code = "run --package tools -- install-code" |
6 | 6 | ||
diff --git a/.travis.yml b/.travis.yml index 8d420f618..6ffc1c89a 100644 --- a/.travis.yml +++ b/.travis.yml | |||
@@ -5,7 +5,7 @@ matrix: | |||
5 | - language: rust | 5 | - language: rust |
6 | rust: beta | 6 | rust: beta |
7 | script: | 7 | script: |
8 | - cargo gen-kinds --verify | 8 | - cargo gen-syntax --verify |
9 | - cargo gen-tests --verify | 9 | - cargo gen-tests --verify |
10 | - cargo test | 10 | - cargo test |
11 | # - language: rust | 11 | # - language: rust |
diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index b497cc5d7..1efd1e054 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md | |||
@@ -10,7 +10,7 @@ in the right place! | |||
10 | Some of the components of this repository are generated through automatic | 10 | Some of the components of this repository are generated through automatic |
11 | processes. These are outlined below: | 11 | processes. These are outlined below: |
12 | 12 | ||
13 | - `gen-kinds`: The kinds of tokens are reused in several places, so a generator | 13 | - `gen-syntax`: The kinds of tokens are reused in several places, so a generator |
14 | is used. We use tera templates to generate the files listed below, based on | 14 | is used. We use tera templates to generate the files listed below, based on |
15 | the grammar described in [grammar.ron]: | 15 | the grammar described in [grammar.ron]: |
16 | - [ast/generated.rs][ast generated] in `ra_syntax` based on | 16 | - [ast/generated.rs][ast generated] in `ra_syntax` based on |
@@ -43,7 +43,7 @@ notes. | |||
43 | This is the thing that turns a flat list of events into a tree (see `EventProcessor`) | 43 | This is the thing that turns a flat list of events into a tree (see `EventProcessor`) |
44 | - `ast` a type safe API on top of the raw `rowan` tree. | 44 | - `ast` a type safe API on top of the raw `rowan` tree. |
45 | - `grammar.ron` RON description of the grammar, which is used to | 45 | - `grammar.ron` RON description of the grammar, which is used to |
46 | generate `syntax_kinds` and `ast` modules, using `cargo gen-kinds` command. | 46 | generate `syntax_kinds` and `ast` modules, using `cargo gen-syntax` command. |
47 | - `algo`: generic tree algorithms, including `walk` for O(1) stack | 47 | - `algo`: generic tree algorithms, including `walk` for O(1) stack |
48 | space tree traversal (this is cool) and `visit` for type-driven | 48 | space tree traversal (this is cool) and `visit` for type-driven |
49 | visiting the nodes (this is double plus cool, if you understand how | 49 | visiting the nodes (this is double plus cool, if you understand how |
@@ -106,7 +106,7 @@ A CLI interface to rust-analyzer. | |||
106 | 106 | ||
107 | Custom Cargo tasks used to develop rust-analyzer: | 107 | Custom Cargo tasks used to develop rust-analyzer: |
108 | 108 | ||
109 | - `cargo gen-kinds` -- generate `ast` and `syntax_kinds` | 109 | - `cargo gen-syntax` -- generate `ast` and `syntax_kinds` |
110 | - `cargo gen-tests` -- collect inline tests from grammar | 110 | - `cargo gen-tests` -- collect inline tests from grammar |
111 | - `cargo install-code` -- build and install VS Code extension and server | 111 | - `cargo install-code` -- build and install VS Code extension and server |
112 | 112 | ||
diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs index a15e00176..98c7de361 100644 --- a/crates/ra_syntax/src/ast/generated.rs +++ b/crates/ra_syntax/src/ast/generated.rs | |||
@@ -1,4 +1,4 @@ | |||
1 | // This file is automatically generated based on the file `./generated.rs.tera` when `cargo gen-kinds` is run | 1 | // This file is automatically generated based on the file `./generated.rs.tera` when `cargo gen-syntax` is run |
2 | // Do not edit manually | 2 | // Do not edit manually |
3 | 3 | ||
4 | #![cfg_attr(rustfmt, rustfmt_skip)] | 4 | #![cfg_attr(rustfmt, rustfmt_skip)] |
diff --git a/crates/ra_syntax/src/ast/generated.rs.tera b/crates/ra_syntax/src/ast/generated.rs.tera index d2a281137..e1404deac 100644 --- a/crates/ra_syntax/src/ast/generated.rs.tera +++ b/crates/ra_syntax/src/ast/generated.rs.tera | |||
@@ -1,6 +1,6 @@ | |||
1 | {# THIS File is not automatically generated: | 1 | {# THIS File is not automatically generated: |
2 | the below applies to the result of this template | 2 | the below applies to the result of this template |
3 | #}// This file is automatically generated based on the file `./generated.rs.tera` when `cargo gen-kinds` is run | 3 | #}// This file is automatically generated based on the file `./generated.rs.tera` when `cargo gen-syntax` is run |
4 | // Do not edit manually | 4 | // Do not edit manually |
5 | 5 | ||
6 | #![cfg_attr(rustfmt, rustfmt_skip)] | 6 | #![cfg_attr(rustfmt, rustfmt_skip)] |
diff --git a/crates/ra_syntax/src/grammar.ron b/crates/ra_syntax/src/grammar.ron index ea8063d3b..0830e02f2 100644 --- a/crates/ra_syntax/src/grammar.ron +++ b/crates/ra_syntax/src/grammar.ron | |||
@@ -1,5 +1,5 @@ | |||
1 | // Stores definitions which must be used in multiple places | 1 | // Stores definitions which must be used in multiple places |
2 | // See `cargo gen-kinds` (defined in crates/tools/src/main.rs) | 2 | // See `cargo gen-syntax` (defined in crates/tools/src/main.rs) |
3 | Grammar( | 3 | Grammar( |
4 | single_byte_tokens: [ | 4 | single_byte_tokens: [ |
5 | [";", "SEMI"], | 5 | [";", "SEMI"], |
diff --git a/crates/ra_syntax/src/syntax_kinds/generated.rs b/crates/ra_syntax/src/syntax_kinds/generated.rs index 11e9150bb..58e2e9e9c 100644 --- a/crates/ra_syntax/src/syntax_kinds/generated.rs +++ b/crates/ra_syntax/src/syntax_kinds/generated.rs | |||
@@ -1,4 +1,4 @@ | |||
1 | // This file is automatically generated based on the file `./generated.rs.tera` when `cargo gen-kinds` is run | 1 | // This file is automatically generated based on the file `./generated.rs.tera` when `cargo gen-syntax` is run |
2 | // Do not edit manually | 2 | // Do not edit manually |
3 | 3 | ||
4 | #![allow(bad_style, missing_docs, unreachable_pub)] | 4 | #![allow(bad_style, missing_docs, unreachable_pub)] |
diff --git a/crates/ra_syntax/src/syntax_kinds/generated.rs.tera b/crates/ra_syntax/src/syntax_kinds/generated.rs.tera index 018564b8a..c37e57702 100644 --- a/crates/ra_syntax/src/syntax_kinds/generated.rs.tera +++ b/crates/ra_syntax/src/syntax_kinds/generated.rs.tera | |||
@@ -1,6 +1,6 @@ | |||
1 | {# THIS File is not automatically generated: | 1 | {# THIS File is not automatically generated: |
2 | the below applies to the result of this template | 2 | the below applies to the result of this template |
3 | #}// This file is automatically generated based on the file `./generated.rs.tera` when `cargo gen-kinds` is run | 3 | #}// This file is automatically generated based on the file `./generated.rs.tera` when `cargo gen-syntax` is run |
4 | // Do not edit manually | 4 | // Do not edit manually |
5 | 5 | ||
6 | #![allow(bad_style, missing_docs, unreachable_pub)] | 6 | #![allow(bad_style, missing_docs, unreachable_pub)] |
diff --git a/crates/tools/src/main.rs b/crates/tools/src/main.rs index 965bc7729..152298014 100644 --- a/crates/tools/src/main.rs +++ b/crates/tools/src/main.rs | |||
@@ -28,7 +28,7 @@ fn main() -> Result<()> { | |||
28 | .help("Verify that generated code is up-to-date") | 28 | .help("Verify that generated code is up-to-date") |
29 | .global(true), | 29 | .global(true), |
30 | ) | 30 | ) |
31 | .subcommand(SubCommand::with_name("gen-kinds")) | 31 | .subcommand(SubCommand::with_name("gen-syntax")) |
32 | .subcommand(SubCommand::with_name("gen-tests")) | 32 | .subcommand(SubCommand::with_name("gen-tests")) |
33 | .subcommand(SubCommand::with_name("install-code")) | 33 | .subcommand(SubCommand::with_name("install-code")) |
34 | .get_matches(); | 34 | .get_matches(); |
@@ -40,7 +40,7 @@ fn main() -> Result<()> { | |||
40 | match matches.subcommand() { | 40 | match matches.subcommand() { |
41 | ("install-code", _) => install_code_extension()?, | 41 | ("install-code", _) => install_code_extension()?, |
42 | ("gen-tests", _) => gen_tests(mode)?, | 42 | ("gen-tests", _) => gen_tests(mode)?, |
43 | ("gen-kinds", _) => generate(Overwrite)?, | 43 | ("gen-syntax", _) => generate(Overwrite)?, |
44 | _ => unreachable!(), | 44 | _ => unreachable!(), |
45 | } | 45 | } |
46 | Ok(()) | 46 | Ok(()) |
diff --git a/crates/tools/tests/cli.rs b/crates/tools/tests/cli.rs index 0bb5d15d8..5de52fc2b 100644 --- a/crates/tools/tests/cli.rs +++ b/crates/tools/tests/cli.rs | |||
@@ -7,6 +7,6 @@ use tools::{ | |||
7 | #[test] | 7 | #[test] |
8 | fn verify_template_generation() { | 8 | fn verify_template_generation() { |
9 | if let Err(error) = generate(Verify) { | 9 | if let Err(error) = generate(Verify) { |
10 | panic!("{}. Please update it by running `cargo gen-kinds`", error); | 10 | panic!("{}. Please update it by running `cargo gen-syntax`", error); |
11 | } | 11 | } |
12 | } | 12 | } |