diff --git a/uncompyle6/parsers/parse36.py b/uncompyle6/parsers/parse36.py index abb80cf4..fed0b346 100644 --- a/uncompyle6/parsers/parse36.py +++ b/uncompyle6/parsers/parse36.py @@ -143,6 +143,11 @@ class Python36Parser(Python35Parser): COME_FROM_FINALLY compare_chained2 ::= expr COMPARE_OP come_froms JUMP_FORWARD + + stmt ::= SETUP_ANNOTATIONS + stmt ::= annotated_assign + annotated_assign ::= expr store store_annotation + store_annotation ::= LOAD_NAME STORE_ANNOTATION """ def customize_grammar_rules(self, tokens, customize): diff --git a/uncompyle6/semantics/customize36.py b/uncompyle6/semantics/customize36.py index 97191f90..86f426a9 100644 --- a/uncompyle6/semantics/customize36.py +++ b/uncompyle6/semantics/customize36.py @@ -60,6 +60,13 @@ def customize_for_version36(self, version): 'call_ex' : ( '%c(%p)', (0, 'expr'), (1, 100)), + 'store_annotation': ( + '%|%[1]{pattr}: %c', + 0 + ), + 'annotated_assign': ( + '%|%c = %p\n', + (-1, 'store_annotation'), (0, 200)) })