mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 10:44:36 +08:00
implementation of generalized decorators and test update from cpython
This commit is contained in:
1 parent
4647731eeb
commit
ebebda3ca6
3 files changed
+68
-30
No files matched your search
@@ -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
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user