You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 09:22:40 +08:00
Add grammar for PyPy 2-arg assert
This commit is contained in:
@@ -274,10 +274,16 @@ class Python2Parser(PythonParser):
|
||||
elif opname == 'JUMP_IF_NOT_DEBUG':
|
||||
self.add_unique_rule(
|
||||
"stmt ::= assert_pypy", opname_base, v, customize)
|
||||
self.add_unique_rule(
|
||||
"stmt ::= assert2_pypy", opname_base, v, customize)
|
||||
self.add_unique_rule(
|
||||
"assert_pypy ::= JUMP_IF_NOT_DEBUG assert_expr jmp_true "
|
||||
"LOAD_ASSERT RAISE_VARARGS_1 COME_FROM",
|
||||
opname_base, v, customize)
|
||||
self.add_unique_rule(
|
||||
"assert2_pypy ::= JUMP_IF_NOT_DEBUG assert_expr jmp_true "
|
||||
"LOAD_ASSERT expr CALL_FUNCTION_1 RAISE_VARARGS_1 COME_FROM",
|
||||
opname_base, v, customize)
|
||||
continue
|
||||
elif opname_base == 'BUILD_MAP':
|
||||
if opname == 'BUILD_MAP_n':
|
||||
|
Reference in New Issue
Block a user