Add 3.6 withas rule

This commit is contained in:
rocky
2017-12-14 09:50:06 -05:00
parent a464e41ad9
commit 8e15246951
2 changed files with 6 additions and 2 deletions

Binary file not shown.

View File

@@ -120,6 +120,10 @@ class Python36Parser(Python35Parser):
rules_str = """
withstmt ::= expr SETUP_WITH POP_TOP suite_stmts_opt POP_BLOCK LOAD_CONST
WITH_CLEANUP_START WITH_CLEANUP_FINISH END_FINALLY
# Removes POP_BLOCK LOAD_CONST from 3.6-
withasstmt ::= expr SETUP_WITH store suite_stmts_opt COME_FROM_WITH
WITH_CLEANUP_START WITH_CLEANUP_FINISH END_FINALLY
"""
self.addRule(rules_str, nop_func)