aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-10-16 19:09:22 +0100
committerAleksey Kladov <[email protected]>2018-10-16 19:17:19 +0100
commit2f4a248f806e8587a21c52e636e6fe68eb9bfdbb (patch)
treea71246cfffb870ec54a7d4e8587991e173a4c0e8
parent06ab643b007592a7f76309e3c9cb2e715e211a96 (diff)
rename gen-kinds to gen-syntax
-rw-r--r--.cargo/config2
-rw-r--r--.travis.yml2
-rw-r--r--ARCHITECTURE.md6
-rw-r--r--crates/ra_syntax/src/ast/generated.rs2
-rw-r--r--crates/ra_syntax/src/ast/generated.rs.tera2
-rw-r--r--crates/ra_syntax/src/grammar.ron2
-rw-r--r--crates/ra_syntax/src/syntax_kinds/generated.rs2
-rw-r--r--crates/ra_syntax/src/syntax_kinds/generated.rs.tera2
-rw-r--r--crates/tools/src/main.rs4
-rw-r--r--crates/tools/tests/cli.rs2
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
3gen-kinds = "run --package tools -- gen-kinds" 3gen-syntax = "run --package tools -- gen-syntax"
4gen-tests = "run --package tools -- gen-tests" 4gen-tests = "run --package tools -- gen-tests"
5install-code = "run --package tools -- install-code" 5install-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!
10Some of the components of this repository are generated through automatic 10Some of the components of this repository are generated through automatic
11processes. These are outlined below: 11processes. 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
107Custom Cargo tasks used to develop rust-analyzer: 107Custom 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:
2the below applies to the result of this template 2the 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)
3Grammar( 3Grammar(
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:
2the below applies to the result of this template 2the 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]
8fn verify_template_generation() { 8fn 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}