implementation of generalized decorators and test update from cpython

This commit is contained in:
TheAnyKey committed 2020-05-16 14:33:30 +00:00
1 parent 4647731eeb
commit ebebda3ca6
3 files changed
+68 -30

No files matched your search

+2 -14
View File
@@ -606,20 +606,8 @@ Path: ast::Expression = {
// Decorators:
Decorator: ast::Expression = {
"@" <p:Path> <a: (@L "(" ArgumentList ")")?> "\n" => {
match a {
Some((location, _, arg, _)) => {
ast::Expression {
location,
node: ast::ExpressionType::Call {
function: Box::new(p),
args: arg.args,
keywords: arg.keywords,
}
}
},
None => p,
}
<Location:@L>"@" <p:Test> "\n" => {
p
},
};