aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorEdvard Thörnros <edvard.thornros@gmail.com>2021-02-10 22:07:28 +0100
committerEdvard Thörnros <edvard.thornros@gmail.com>2021-02-10 22:07:28 +0100
commitf88b11d224ae29bd4cdc52048a116cb45322271b (patch)
treece931a0c173fc7e2d294c192cc064ba0afa2201b /src/lib.rs
parent0f25e98b903f6608d09ad8bfd9ca5d00fec4cec6 (diff)
downloadsylt-f88b11d224ae29bd4cdc52048a116cb45322271b.tar.gz
add break and continue
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs8
1 files changed, 8 insertions, 0 deletions
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