diff --git a/test/bytecode_2.6/03_if_for.pyc b/test/bytecode_2.6/03_if_for.pyc new file mode 100644 index 00000000..737eb33f Binary files /dev/null and b/test/bytecode_2.6/03_if_for.pyc differ diff --git a/test/simple_source/bug25/03_if_for.py b/test/simple_source/bug25/03_if_for.py new file mode 100644 index 00000000..09205e5c --- /dev/null +++ b/test/simple_source/bug25/03_if_for.py @@ -0,0 +1,7 @@ +# From Python 2.6. distutils/sysconfig.py +def get_config_vars(_config_vars, args): + if _config_vars: + if args == 1: + if args < 8: + for key in ('LDFLAGS', 'BASECFLAGS'): + _config_vars[key] = 4 diff --git a/uncompyle6/parsers/parse26.py b/uncompyle6/parsers/parse26.py index efa244da..4e53164b 100644 --- a/uncompyle6/parsers/parse26.py +++ b/uncompyle6/parsers/parse26.py @@ -145,6 +145,8 @@ class Python26Parser(Python2Parser): iflaststmtl ::= testexpr c_stmts_opt JUMP_BACK come_from_pop iflaststmt ::= testexpr c_stmts_opt JUMP_ABSOLUTE come_from_pop + lastc_stmt ::= iflaststmt COME_FROM + while1stmt ::= SETUP_LOOP l_stmts_opt JUMP_BACK COME_FROM ifstmt ::= testexpr_then _ifstmts_jump