summaryrefslogtreecommitdiffstats
path: root/Grammar
diff options
context:
space:
mode:
Diffstat (limited to 'Grammar')
-rw-r--r--Grammar/Grammar4
1 files changed, 3 insertions, 1 deletions
diff --git a/Grammar/Grammar b/Grammar/Grammar
index ce75ba8..111ebe0 100644
--- a/Grammar/Grammar
+++ b/Grammar/Grammar
@@ -28,7 +28,9 @@ single_input: NEWLINE | simple_stmt | compound_stmt NEWLINE
file_input: (NEWLINE | stmt)* ENDMARKER
eval_input: testlist NEWLINE* ENDMARKER
-funcdef: 'def' NAME parameters ':' suite
+decorator: '@' dotted_name [ '(' [arglist] ')' ]
+decorators: decorator ([NEWLINE] decorator)* NEWLINE
+funcdef: [decorators] 'def' NAME parameters ':' suite
parameters: '(' [varargslist] ')'
varargslist: (fpdef ['=' test] ',')* ('*' NAME [',' '**' NAME] | '**' NAME) | fpdef ['=' test] (',' fpdef ['=' test])* [',']
fpdef: NAME | '(' fplist ')'