aboutsummaryrefslogtreecommitdiff
path: root/vm.d
diff options
context:
space:
mode:
authormryouse2023-05-26 03:15:51 +0000
committermryouse2023-05-26 03:15:51 +0000
commit2ffc9959f3324a234d8337f05643c8e531154081 (patch)
tree70d8b066adc8e72c5c64e4eb71da68ced0ccd00d /vm.d
parentaab6510a0e59c26a31526ff303a9d581736815fc (diff)
in? (lists and strings)
Diffstat (limited to 'vm.d')
-rw-r--r--vm.d5
1 files changed, 5 insertions, 0 deletions
diff --git a/vm.d b/vm.d
index c7e5e8e..6ab2e96 100644
--- a/vm.d
+++ b/vm.d
@@ -404,6 +404,11 @@ class VM {
Seq seq = asSeq(this.popA());
this.pushA(makeNumberValue(seq.length()));
break;
+ case OpCode.OP_MEMBER:
+ Seq seq = asSeq(this.popA());
+ Value val = this.popA();
+ this.pushA(makeBooleanValue(seq.isIn(val)));
+ break;
case OpCode.OP_ADD:
Value b = this.popA();
/*