Swift: extract DiscardStmt

This commit is contained in:
Alex Denisov
2023-11-15 16:26:48 +01:00
parent 5cd74213cc
commit 6a673e700b
19 changed files with 212 additions and 11 deletions

View File

@@ -1399,3 +1399,14 @@ class MacroDecl(GenericContext, ValueDecl):
parameters: list[ParamDecl] | doc("parameters of this macro")
roles: list[MacroRole] | doc("roles of this macro")
pass
class DiscardStmt(Stmt):
"""
A statement that takes a non-copyable value and destructs its members/fields.
The only valid syntax:
```
destruct self
```
"""
sub_expr: Expr | child