From f88b11d224ae29bd4cdc52048a116cb45322271b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edvard=20Th=C3=B6rnros?= Date: Wed, 10 Feb 2021 22:07:28 +0100 Subject: add break and continue --- src/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index ae45c45..67e631a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -397,6 +397,14 @@ pub enum Op { /// /// {A} - JmpFalse(n) - {} JmpFalse(usize), + /// Sets the instruction pointer + /// to the given value. And also pops + /// the given number of values. + /// + /// Used for 'break' and 'continue'. + /// + /// {A, B, C} - JmpNPop(n, 2) - {A} + JmpNPop(usize, usize), /// Compares the two topmost elements /// on the stack for equality, and pushes -- cgit v1.2.1