Add Decorator node (#7)

This commit is contained in:
Micha Reiser
2023-06-08 07:44:08 +02:00
committed by Charlie Marsh
parent 8a415fa61e
commit 6f65c5cba7
12 changed files with 2328 additions and 2101 deletions

View File

@@ -1151,9 +1151,9 @@ ClassDef: ast::Stmt = {
};
// Decorators:
Decorator: ast::Expr = {
<location:@L> "@" <p:NamedExpressionTest> "\n" => {
p
Decorator: ast::Decorator = {
<location:@L> "@" <p:NamedExpressionTest> <end_location:@R> "\n" => {
ast::Decorator { range: optional_range(location, end_location), expression: p }
},
};