You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Add 3.6 STORE_ANNOTATION
This commit is contained in:
@@ -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):
|
||||
|
@@ -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))
|
||||
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user