Skip to content

Commit d6ec174

Browse files
committed
Rust: Remove MacroBlockExpr class
1 parent c666fc7 commit d6ec174

File tree

2 files changed

+0
-24
lines changed

2 files changed

+0
-24
lines changed

rust/ast-generator/src/main.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ fn class_name(type_name: &str) -> String {
2222
"Literal" => "LiteralExpr".to_owned(),
2323
"ArrayExpr" => "ArrayExprInternal".to_owned(),
2424
"AsmOptions" => "AsmOptionsList".to_owned(),
25-
"MacroStmts" => "MacroBlockExpr".to_owned(),
2625
_ if type_name.starts_with("Record") => type_name.replacen("Record", "Struct", 1),
2726
_ if type_name.ends_with("Type") => format!("{type_name}Repr"),
2827
_ => type_name.to_owned(),
@@ -36,7 +35,6 @@ fn property_name(type_name: &str, field_name: &str) -> String {
3635
("MatchExpr", "expr") => "scrutinee",
3736
("Variant", "expr") => "discriminant",
3837
("FieldExpr", "expr") => "container",
39-
("MacroBlockExpr", "expr") => "tail_expr",
4038
(_, "name_ref") => "identifier",
4139
(_, "then_branch") => "then",
4240
(_, "else_branch") => "else_",

rust/schema/annotations.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1440,28 +1440,6 @@ class _:
14401440
"""
14411441

14421442

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-
14651443
@annotate(MacroTypeRepr)
14661444
class _:
14671445
"""

0 commit comments

Comments
 (0)