We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
MacroBlockExpr
1 parent c666fc7 commit d6ec174Copy full SHA for d6ec174
2 files changed
rust/ast-generator/src/main.rs
@@ -22,7 +22,6 @@ fn class_name(type_name: &str) -> String {
22
"Literal" => "LiteralExpr".to_owned(),
23
"ArrayExpr" => "ArrayExprInternal".to_owned(),
24
"AsmOptions" => "AsmOptionsList".to_owned(),
25
- "MacroStmts" => "MacroBlockExpr".to_owned(),
26
_ if type_name.starts_with("Record") => type_name.replacen("Record", "Struct", 1),
27
_ if type_name.ends_with("Type") => format!("{type_name}Repr"),
28
_ => type_name.to_owned(),
@@ -36,7 +35,6 @@ fn property_name(type_name: &str, field_name: &str) -> String {
36
35
("MatchExpr", "expr") => "scrutinee",
37
("Variant", "expr") => "discriminant",
38
("FieldExpr", "expr") => "container",
39
- ("MacroBlockExpr", "expr") => "tail_expr",
40
(_, "name_ref") => "identifier",
41
(_, "then_branch") => "then",
42
(_, "else_branch") => "else_",
rust/schema/annotations.py
@@ -1440,28 +1440,6 @@ class _:
1440
"""
1441
1442
1443
-class MacroBlockExpr(Expr):
1444
- """
1445
- A sequence of statements generated by a `MacroCall`. For example:
1446
- ```rust
1447
- macro_rules! my_macro {
1448
- () => {
1449
- let mut x = 40;
1450
- x += 2;
1451
- x
1452
- };
1453
- }
1454
-
1455
- my_macro!(); // this macro expands to a sequence of statements (and an expression)
1456
- ```
1457
1458
1459
- __cfg__ = True
1460
1461
- statements: list[Stmt] | child
1462
- tail_expr: optional[Expr] | child
1463
1464
1465
@annotate(MacroTypeRepr)
1466
class _:
1467
0 commit comments