/// Parses a WebAssembly table instruction from the input.
///
/// See <https://webassembly.github.io/spec/core/binary/instructions.html#table-instructions>
Parses a WebAssembly table instruction from the input.
See
Parses a WebAssembly table instruction from the input . See
pub fn parse_table_instruction(input: &[u8]) -> IResult<&[u8], TableInstruction> {
    alt((
        map(preceded(match_byte(0x25), parse_u32), TableInstruction::Get),
        map(preceded(match_byte(0x26), parse_u32), TableInstruction::Set),
        map(
            preceded(tag([0xFC, 12u8]), tuple((parse_u32, parse_u32))),
            |(element, table)| TableInstruction::Init(element, table),
        ),
        map(
            preceded(tag([0xFC, 13u8]), parse_u32),
            TableInstruction::ElementDrop,
        ),
        map(
            preceded(tag([0xFC, 14u8]), tuple((parse_u32, parse_u32))),
            |(table_a, table_b)| TableInstruction::Copy(table_a, table_b),
        ),
        map(
            preceded(tag([0xFC, 15u8]), parse_u32),
            TableInstruction::Grow,
        ),
        map(
            preceded(tag([0xFC, 16u8]), parse_u32),
            TableInstruction::Size,
        ),
        map(
            preceded(tag([0xFC, 17u8]), parse_u32),
            TableInstruction::Fill,
        ),
    ))(input)
}
pub fn parse_table_instruction ( input : & [ u8 ] ) -> IResult < & [ u8 ] , TableInstruction > { alt ( ( map ( preceded ( match_byte ( 0x25 ) , parse_u32 ) , TableInstruction :: Get ) , map ( preceded ( match_byte ( 0x26 ) , parse_u32 ) , TableInstruction :: Set ) , map ( preceded ( tag ( [ 0xFC , 12u8 ] ) , tuple ( ( parse_u32 , parse_u32 ) ) ) , | ( element , table ) | TableInstruction :: Init ( element , table ) , ) , map ( preceded ( tag ( [ 0xFC , 13u8 ] ) , parse_u32 ) , TableInstruction :: ElementDrop , ) , map ( preceded ( tag ( [ 0xFC , 14u8 ] ) , tuple ( ( parse_u32 , parse_u32 ) ) ) , | ( table_a , table_b ) | TableInstruction :: Copy ( table_a , table_b ) , ) , map ( preceded ( tag ( [ 0xFC , 15u8 ] ) , parse_u32 ) , TableInstruction :: Grow , ) , map ( preceded ( tag ( [ 0xFC , 16u8 ] ) , parse_u32 ) , TableInstruction :: Size , ) , map ( preceded ( tag ( [ 0xFC , 17u8 ] ) , parse_u32 ) , TableInstruction :: Fill , ) , ) ) ( input ) }
Parses a WebAssembly table instruction from the input.
Parses a WebAssembly table instruction from the input .
input
&[u8]