Skip to main content

generate_subdecoder_dispatch

Function generate_subdecoder_dispatch 

Source
pub fn generate_subdecoder_dispatch(
    _def: &ValidatedDef,
    sd: &ValidatedSubDecoder,
    handler_mod: &str,
    ctx_type: &str,
    groups: &HashMap<String, String>,
    instr_type: Option<&str>,
) -> String
Expand description

Generate a flat dispatch function for a sub-decoder.

Produces pub fn dispatch_{snake_name}(ctx: &mut Ctx, val: u8) that decodes the extension bits and calls the appropriate handler.