aboutsummaryrefslogtreecommitdiff
path: root/pkg/lang/vm/text
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2022-07-05 23:39:18 +0200
committerMel <einebeere@gmail.com>2022-07-06 14:05:28 +0200
commit3a31347d38ae9a4c04c52304330b50f95a54a826 (patch)
treee5ddbe398ede58f45c4a8e79c66018c5e37b06d8 /pkg/lang/vm/text
parentbb1f61f938be3cc209dacf97b0395336631319bb (diff)
downloadjinx-3a31347d38ae9a4c04c52304330b50f95a54a826.tar.zst
jinx-3a31347d38ae9a4c04c52304330b50f95a54a826.zip
Implement ForIn statement compilation
Diffstat (limited to 'pkg/lang/vm/text')
-rw-r--r--pkg/lang/vm/text/decompiler.go1
-rw-r--r--pkg/lang/vm/text/op.go1
2 files changed, 2 insertions, 0 deletions
diff --git a/pkg/lang/vm/text/decompiler.go b/pkg/lang/vm/text/decompiler.go
index c8922ec..bef066b 100644
--- a/pkg/lang/vm/text/decompiler.go
+++ b/pkg/lang/vm/text/decompiler.go
@@ -61,6 +61,7 @@ func (d *Decompiler) decompileInstruction(bc code.Raw) (string, code.Raw) {
code.OpSub,
code.OpMod,
code.OpIndex,
+ code.OpLt,
code.OpLte,
code.OpRet,
code.OpTempArrLen,
diff --git a/pkg/lang/vm/text/op.go b/pkg/lang/vm/text/op.go
index 0d01bdb..17f4847 100644
--- a/pkg/lang/vm/text/op.go
+++ b/pkg/lang/vm/text/op.go
@@ -30,6 +30,7 @@ var (
code.OpSub: "sub",
code.OpMod: "mod",
code.OpIndex: "index",
+ code.OpLt: "lt",
code.OpLte: "lte",
code.OpCall: "call",
code.OpJmp: "jmp",