BUILD_MAP_UNPACK'ing of dictionaries in 3.5

This commit is contained in:
rocky
2017-05-02 05:28:39 -04:00
parent 26cd91046e
commit 91b86ac156
5 changed files with 15 additions and 7 deletions

View File

@@ -33,7 +33,12 @@ class Python35Parser(Python34Parser):
stmt ::= await_stmt
await_stmt ::= await_expr POP_TOP
expr ::= unmap_dict
expr ::= unmapexpr
unmap_dict ::= mapexpr BUILD_MAP_UNPACK
unmap_dict ::= mapexpr unmap_dict
build_list ::= expr BUILD_MAP_UNPACK
# Python 3.5+ has WITH_CLEANUP_START/FINISH
@@ -132,9 +137,6 @@ class Python35Parser(Python34Parser):
# differently than 3.3, 3.4
yield_from ::= expr GET_YIELD_FROM_ITER LOAD_CONST YIELD_FROM
expr ::= unmap_dict
expr ::= unmapexpr
"""
def add_custom_rules(self, tokens, customize):