Beispiel #1
0
 def BINARY_SUBSCR(decompiler):
     oper2 = decompiler.stack.pop()
     oper1 = decompiler.stack.pop()
     if isinstance(oper2, ast.Tuple):
         return ast.Subscript(oper1, 'OP_APPLY', list(oper2.nodes))
     else:
         return ast.Subscript(oper1, 'OP_APPLY', [oper2])
Beispiel #2
0
 def BINARY_SUBSCR(decompiler):
     oper2 = decompiler.stack.pop()
     oper1 = decompiler.stack.pop()
     if isinstance(oper2, ast.Sliceobj) and len(oper2.nodes) == 2:
         a, b = oper2.nodes
         a = None if isinstance(a, ast.Const) and a.value == None else a
         b = None if isinstance(b, ast.Const) and b.value == None else b
         return ast.Slice(oper1, 'OP_APPLY', a, b)
     elif isinstance(oper2, ast.Tuple):
         return ast.Subscript(oper1, 'OP_APPLY', list(oper2.nodes))
     else:
         return ast.Subscript(oper1, 'OP_APPLY', [ oper2 ])