wasm/formatter.py
def format_instruction(insn):
    """
    Takes a raw `Instruction` and translates it into a human readable text
    representation. As of writing, the text representation for WASM is not yet
    standardized, so we just emit some generic format.
    """
    text = insn.op.mnemonic

    if not insn.imm:
        return text

    return text + ' ' + ', '.join([
        getattr(insn.op.imm_struct, x.name).to_string(
            getattr(insn.imm, x.name)
        )
        for x in insn.op.imm_struct._meta.fields
    ])

    Takes a raw `Instruction` and translates it into a human readable text
    representation. As of writing, the text representation for WASM is not yet
    standardized, so we just emit some generic format.
    
Takes a raw `Instruction` and translates it into a human readable text
representation. As of writing, the text representation for WASM is not yet
standardized, so we just emit some generic format.
Takes a raw ` Instruction ` and translates it into a human readable text representation . As of writing the text representation for WASM is not yet standardized so we just emit some generic format .
def format_instruction(insn):
    text = insn.op.mnemonic
    if not insn.imm:
        return text
    return text + ' ' + ', '.join([
        getattr(insn.op.imm_struct, x.name).to_string(
            getattr(insn.imm, x.name)
        )
        for x in insn.op.imm_struct._meta.fields
    ])
def format_instruction ( insn ) : text = insn . op . mnemonic if not insn . imm : return text return text + ' ' + ', ' . join ( [ getattr ( insn . op . imm_struct , x . name ) . to_string ( getattr ( insn . imm , x . name ) ) for x in insn . op . imm_struct . _meta . fields ] )
Takes a raw `Instruction` and translates it into a human readable text
representation.
Takes a raw ` Instruction ` and translates it into a human readable text representation .
"""
    Takes a raw `Instruction` and translates it into a human readable text
    representation. As of writing, the text representation for WASM is not yet
    standardized, so we just emit some generic format.
    """
insn