Assemble tokens into machine code. Errors on undefined labels or out-of-range branches.
(tokens: &[RvInstruction])
| 41 | |
| 42 | impl Assembler { |
| 43 | /// Assemble tokens into machine code. Errors on undefined labels or out-of-range branches. |
| 44 | pub fn assemble(tokens: &[RvInstruction]) -> Result<AssembledOutput, AssemblerError> { |
| 45 | let asm_tokens = parser::parse(tokens)?; |
| 46 | let layout = layout::compute_layout(&asm_tokens)?; |
| 47 | encode::encode(&asm_tokens, &layout) |
| 48 | } |
| 49 | } |
| 50 |
nothing calls this directly
no test coverage detected