aboutsummaryrefslogtreecommitdiff
path: root/crates/tools/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/tools/src/main.rs')
-rw-r--r--crates/tools/src/main.rs19
1 files changed, 2 insertions, 17 deletions
diff --git a/crates/tools/src/main.rs b/crates/tools/src/main.rs
index 1bbc43123..965bc7729 100644
--- a/crates/tools/src/main.rs
+++ b/crates/tools/src/main.rs
@@ -13,9 +13,8 @@ use std::{
13 process::Command, 13 process::Command,
14}; 14};
15use tools::{ 15use tools::{
16 collect_tests, project_root, Result, Test, AST, SYNTAX_KINDS, GRAMMAR, 16 collect_tests, Result, Test, generate, Mode, Overwrite, Verify,
17}; 17};
18use teraron::{Mode, Verify, Overwrite};
19 18
20const GRAMMAR_DIR: &str = "./crates/ra_syntax/src/grammar"; 19const GRAMMAR_DIR: &str = "./crates/ra_syntax/src/grammar";
21const INLINE_TESTS_DIR: &str = "./crates/ra_syntax/tests/data/parser/inline"; 20const INLINE_TESTS_DIR: &str = "./crates/ra_syntax/tests/data/parser/inline";
@@ -41,21 +40,7 @@ fn main() -> Result<()> {
41 match matches.subcommand() { 40 match matches.subcommand() {
42 ("install-code", _) => install_code_extension()?, 41 ("install-code", _) => install_code_extension()?,
43 ("gen-tests", _) => gen_tests(mode)?, 42 ("gen-tests", _) => gen_tests(mode)?,
44 ("gen-kinds", _) => { 43 ("gen-kinds", _) => generate(Overwrite)?,
45 let grammar = project_root().join(GRAMMAR);
46 let syntax_kinds = project_root().join(SYNTAX_KINDS);
47 let ast = project_root().join(AST);
48 teraron::generate(
49 &syntax_kinds,
50 &grammar,
51 mode,
52 )?;
53 teraron::generate(
54 &ast,
55 &grammar,
56 mode,
57 )?;
58 }
59 _ => unreachable!(), 44 _ => unreachable!(),
60 } 45 }
61 Ok(()) 46 Ok(())