gbf_core/decompiler/handlers/
nop.rs

1#![deny(missing_docs)]
2
3use crate::{
4    decompiler::{
5        ProcessedInstruction, ProcessedInstructionBuilder,
6        function_decompiler::FunctionDecompilerError,
7        function_decompiler_context::FunctionDecompilerContext,
8    },
9    instruction::Instruction,
10};
11
12use super::OpcodeHandler;
13
14/// Handles instructions that are not useful to our decompiler.
15pub struct NopHandler;
16
17impl OpcodeHandler for NopHandler {
18    fn handle_instruction(
19        &self,
20        _context: &mut FunctionDecompilerContext,
21        _instruction: &Instruction,
22    ) -> Result<ProcessedInstruction, FunctionDecompilerError> {
23        Ok(ProcessedInstructionBuilder::new().build())
24    }
25}