diff options
Diffstat (limited to 'xtask/src/codegen')
-rw-r--r-- | xtask/src/codegen/gen_syntax.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/xtask/src/codegen/gen_syntax.rs b/xtask/src/codegen/gen_syntax.rs index 26f541da1..b7698ee6e 100644 --- a/xtask/src/codegen/gen_syntax.rs +++ b/xtask/src/codegen/gen_syntax.rs | |||
@@ -345,6 +345,7 @@ fn generate_nodes(kinds: KindsSrc<'_>, grammar: AstSrc<'_>) -> Result<String> { | |||
345 | #(#displays)* | 345 | #(#displays)* |
346 | }; | 346 | }; |
347 | 347 | ||
348 | let ast = ast.to_string().replace("T ! [ ", "T![").replace(" ] )", "])"); | ||
348 | let pretty = crate::reformat(ast)?; | 349 | let pretty = crate::reformat(ast)?; |
349 | Ok(pretty) | 350 | Ok(pretty) |
350 | } | 351 | } |
@@ -527,6 +528,9 @@ impl Field<'_> { | |||
527 | Field::Token(name) => { | 528 | Field::Token(name) => { |
528 | let name = match *name { | 529 | let name = match *name { |
529 | ";" => "semicolon", | 530 | ";" => "semicolon", |
531 | "->" => "thin_arrow", | ||
532 | "'{'" => "l_curly", | ||
533 | "'}'" => "r_curly", | ||
530 | _ => name, | 534 | _ => name, |
531 | }; | 535 | }; |
532 | format_ident!("{}_token", name) | 536 | format_ident!("{}_token", name) |