Python 3.5+ BUILD_UNMAP_PACK rules

Towards addressing Issue #98
This commit is contained in:
rocky
2017-04-14 23:33:38 -04:00
parent 47dbc57f3d
commit 03498963d4
5 changed files with 16 additions and 1 deletions

View File

@@ -116,6 +116,8 @@ class Python35Parser(Python34Parser):
yield_from ::= expr GET_YIELD_FROM_ITER LOAD_CONST YIELD_FROM
expr ::= unmap_dict
expr ::= unmapexpr
"""
def add_custom_rules(self, tokens, customize):
@@ -134,6 +136,10 @@ class Python35Parser(Python34Parser):
rule = 'call_function ::= expr unmapexpr ' + call_token.type
self.add_unique_rule(rule, opname, token.attr, customize)
pass
elif opname == 'BUILD_MAP_UNPACK':
nargs = token.attr % 256
rule = "unmap_dict ::= mapexpr " + opname
self.add_unique_rule(rule, opname, token.attr, customize)
pass
return