Rust: Remove MacroBlockExpr class

This commit is contained in:
Tom Hvitved
2026-01-13 10:20:47 +01:00
parent c666fc71ca
commit d6ec174e0c
2 changed files with 0 additions and 24 deletions

View File

@@ -22,7 +22,6 @@ fn class_name(type_name: &str) -> String {
"Literal" => "LiteralExpr".to_owned(),
"ArrayExpr" => "ArrayExprInternal".to_owned(),
"AsmOptions" => "AsmOptionsList".to_owned(),
"MacroStmts" => "MacroBlockExpr".to_owned(),
_ if type_name.starts_with("Record") => type_name.replacen("Record", "Struct", 1),
_ if type_name.ends_with("Type") => format!("{type_name}Repr"),
_ => type_name.to_owned(),
@@ -36,7 +35,6 @@ fn property_name(type_name: &str, field_name: &str) -> String {
("MatchExpr", "expr") => "scrutinee",
("Variant", "expr") => "discriminant",
("FieldExpr", "expr") => "container",
("MacroBlockExpr", "expr") => "tail_expr",
(_, "name_ref") => "identifier",
(_, "then_branch") => "then",
(_, "else_branch") => "else_",

View File

@@ -1440,28 +1440,6 @@ class _:
"""
class MacroBlockExpr(Expr):
"""
A sequence of statements generated by a `MacroCall`. For example:
```rust
macro_rules! my_macro {
() => {
let mut x = 40;
x += 2;
x
};
}
my_macro!(); // this macro expands to a sequence of statements (and an expression)
```
"""
__cfg__ = True
statements: list[Stmt] | child
tail_expr: optional[Expr] | child
@annotate(MacroTypeRepr)
class _:
"""