Python 3.5 if handling...

Allow RETURN_END_IF in a return statement
May want to do this in other versions as well, but right now
we only need it here.
This commit is contained in:
rocky
2016-06-22 22:09:06 -04:00
parent f999e6a33a
commit 9a2369830d
3 changed files with 36 additions and 0 deletions

View File

@@ -594,6 +594,11 @@ class Python35onParser(Python3Parser):
WITH_CLEANUP_START WITH_CLEANUP_FINISH END_FINALLY
# Python 3.5+_ does jump optimization that scanner3.py's detect
# structure can't fully work out. So for now let's allow
# RETURN_END_IF the same as RETURN_VAL
return_stmt ::= ret_expr RETURN_END_IF
# Python 3.3+ also has yield from. 3.5 does it
# differently than 3.3, 3.4