diff --git a/src/interpreted/nodes.py b/src/interpreted/nodes.py index deb32c1..6d463e9 100644 --- a/src/interpreted/nodes.py +++ b/src/interpreted/nodes.py @@ -196,6 +196,7 @@ class ImportFrom(Statement): class Module: body: list[Statement] + @dataclass class Decorator(Node): value: Expression diff --git a/tests/interpreted_test.py b/tests/interpreted_test.py index 5fbf609..a98e49e 100644 --- a/tests/interpreted_test.py +++ b/tests/interpreted_test.py @@ -106,9 +106,9 @@ def xyz(): print('inside xyz') xyz() - """, + """, "inside decorator\ninside xyz\n", - ), + ), ( """\ def decorator_foo(func): @@ -125,7 +125,7 @@ def xyz(): print('Inside xyz') xyz() - """, + """, "Inside decorator bar\nInside decorator foo\nInside xyz\n", ), ( @@ -147,7 +147,7 @@ def xyz(): print('Inside xyz') xyz() - """, + """, "Inside decorator bar\nInside decorator foo\nInside wrapper\nInside xyz\n", ), ),