aboutsummaryrefslogtreecommitdiff
path: root/xtask/src/codegen
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-04-09 15:25:06 +0100
committerAleksey Kladov <[email protected]>2020-04-09 15:25:06 +0100
commit59b6b2278b7f7d2089b5caf6fcfd57528d9aafd0 (patch)
tree860185a74b977f8583f0d5a9183975d87676b022 /xtask/src/codegen
parentd61932ef7e74f3d9f7863c33c6647c2c52538ed5 (diff)
Start ast/generated/tokens
Diffstat (limited to 'xtask/src/codegen')
-rw-r--r--xtask/src/codegen/gen_syntax.rs10
1 files changed, 7 insertions, 3 deletions
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}