| 158 | } |
| 159 | |
| 160 | Expect<void> FormChecker::checkInstrs(AST::InstrView Instrs) { |
| 161 | // Validate instructions |
| 162 | for (auto &Instr : Instrs) { |
| 163 | EXPECTED_TRY(checkInstr(Instr).map_error([&Instr](auto E) { |
| 164 | spdlog::error( |
| 165 | ErrInfo::InfoInstruction(Instr.getOpCode(), Instr.getOffset())); |
| 166 | return E; |
| 167 | })); |
| 168 | } |
| 169 | return {}; |
| 170 | } |
| 171 | |
| 172 | Expect<void> FormChecker::checkInstr(const AST::Instruction &Instr) { |
| 173 | // Note: The instructions and their immediates have passed proposal |
nothing calls this directly
no test coverage detected