News for hackers. Stuff that matters.
Re:My experience crafting an interpreter with Rust (2021) by kaba0 on Sunday March 26, 2023 @03:20AM (#35311933)
I solved it in case of an interpreter with

  outer: loop {
    loop {
      let res = self.interpreter_loop(…);
      match res {
        Continue => {}
        Return => { break 'outer; }
        Exception => { break; }
      }
   }
I also made sure that the interpreter_loop call had an inline pragma, but that was otherwise a naive switch-case for the instructions. I didn’t find a way to make a template interpreter with safe Rust.

There are no comments on this comment yet.