More 2.6 while-loop control flow parsing

This commit is contained in:
rocky 2018-03-06 13:16:22 -05:00
parent 1896c40202
commit ca3f822c81
3 changed files with 12 additions and 2 deletions

View File

@ -6,3 +6,14 @@ def getmultiline(line):
if line[2] and line[5]:
break
return
# From 2.6.9 refactor.py
def _detect_future_features(tp):
while True:
if tp == 6:
while tp == 7:
if tp != 11:
break
else:
break
return

View File

@ -77,8 +77,7 @@ class Python26Parser(Python2Parser):
jb_cont ::= JUMP_BACK
jb_cont ::= CONTINUE
jb_cf_pop ::= JUMP_BACK come_froms POP_TOP
jb_cf_pop ::= JUMP_BACK POP_TOP
jb_cf_pop ::= come_from_opt JUMP_BACK _come_froms POP_TOP
ja_cf_pop ::= JUMP_ABSOLUTE come_froms POP_TOP
jf_cf_pop ::= JUMP_FORWARD come_froms POP_TOP