aboutsummaryrefslogtreecommitdiff
path: root/xtask/src
diff options
context:
space:
mode:
Diffstat (limited to 'xtask/src')
-rw-r--r--xtask/src/codegen.rs1
-rw-r--r--xtask/src/codegen/gen_syntax.rs10
2 files changed, 8 insertions, 3 deletions
diff --git a/xtask/src/codegen.rs b/xtask/src/codegen.rs
index e6ba2009c..678b40133 100644
--- a/xtask/src/codegen.rs
+++ b/xtask/src/codegen.rs
@@ -24,6 +24,7 @@ const ERR_INLINE_TESTS_DIR: &str = "crates/ra_syntax/test_data/parser/inline/err
24 24
25const SYNTAX_KINDS: &str = "crates/ra_parser/src/syntax_kind/generated.rs"; 25const SYNTAX_KINDS: &str = "crates/ra_parser/src/syntax_kind/generated.rs";
26const AST_NODES: &str = "crates/ra_syntax/src/ast/generated/nodes.rs"; 26const AST_NODES: &str = "crates/ra_syntax/src/ast/generated/nodes.rs";
27const AST_TOKENS: &str = "crates/ra_syntax/src/ast/generated/tokens.rs";
27 28
28const ASSISTS_DIR: &str = "crates/ra_assists/src/handlers"; 29const ASSISTS_DIR: &str = "crates/ra_assists/src/handlers";
29const ASSISTS_TESTS: &str = "crates/ra_assists/src/doc_tests/generated.rs"; 30const ASSISTS_TESTS: &str = "crates/ra_assists/src/doc_tests/generated.rs";
diff --git a/xtask/src/codegen/gen_syntax.rs b/xtask/src/codegen/gen_syntax.rs
index c2734d638..75bcd1973 100644
--- a/xtask/src/codegen/gen_syntax.rs
+++ b/xtask/src/codegen/gen_syntax.rs
@@ -22,9 +22,13 @@ pub fn generate_syntax(mode: Mode) -> Result<()> {
22 let syntax_kinds = generate_syntax_kinds(KINDS_SRC)?; 22 let syntax_kinds = generate_syntax_kinds(KINDS_SRC)?;
23 update(syntax_kinds_file.as_path(), &syntax_kinds, mode)?; 23 update(syntax_kinds_file.as_path(), &syntax_kinds, mode)?;
24 24
25 let ast_file = project_root().join(codegen::AST_NODES); 25 let ast_nodes_file = project_root().join(codegen::AST_NODES);
26 let ast = generate_ast(KINDS_SRC, AST_SRC)?; 26 let contents = generate_ast(KINDS_SRC, AST_SRC)?;
27 update(ast_file.as_path(), &ast, mode)?; 27 update(ast_nodes_file.as_path(), &contents, mode)?;
28
29 let ast_tokens_file = project_root().join(codegen::AST_TOKENS);
30 let contents = "//! Generated file, do not edit by hand, see `xtask/src/codegen`";
31 update(ast_tokens_file.as_path(), &contents, mode)?;
28 32
29 Ok(()) 33 Ok(())
30} 34}