aboutsummaryrefslogtreecommitdiff
path: root/xtask/src/codegen
diff options
context:
space:
mode:
Diffstat (limited to 'xtask/src/codegen')
-rw-r--r--xtask/src/codegen/gen_syntax.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/xtask/src/codegen/gen_syntax.rs b/xtask/src/codegen/gen_syntax.rs
index 200e8aa50..733493fef 100644
--- a/xtask/src/codegen/gen_syntax.rs
+++ b/xtask/src/codegen/gen_syntax.rs
@@ -247,14 +247,14 @@ fn generate_nodes(kinds: KindsSrc<'_>, grammar: &AstSrc) -> Result<String> {
247 #(#display_impls)* 247 #(#display_impls)*
248 }; 248 };
249 249
250 let ast = ast.to_string().replace("T ! [ ", "T![").replace(" ] )", "])"); 250 let ast = ast.to_string().replace("T ! [", "T![");
251 251
252 let mut res = String::with_capacity(ast.len() * 2); 252 let mut res = String::with_capacity(ast.len() * 2);
253 253
254 let mut docs = 254 let mut docs =
255 grammar.nodes.iter().map(|it| &it.doc).chain(grammar.enums.iter().map(|it| &it.doc)); 255 grammar.nodes.iter().map(|it| &it.doc).chain(grammar.enums.iter().map(|it| &it.doc));
256 256
257 for chunk in ast.split("# [ pretty_doc_comment_placeholder_workaround ]") { 257 for chunk in ast.split("# [pretty_doc_comment_placeholder_workaround] ") {
258 res.push_str(chunk); 258 res.push_str(chunk);
259 if let Some(doc) = docs.next() { 259 if let Some(doc) = docs.next() {
260 write_doc_comment(&doc, &mut res); 260 write_doc_comment(&doc, &mut res);