aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/WebAssembly/Structure/Instructions/Instrs/Control/Block.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/WebAssembly/Structure/Instructions/Instrs/Control/Block.php')
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Control/Block.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Control/Block.php b/src/WebAssembly/Structure/Instructions/Instrs/Control/Block.php
new file mode 100644
index 0000000..af2c97f
--- /dev/null
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Control/Block.php
@@ -0,0 +1,24 @@
+<?php
+
+declare(strict_types=1);
+
+namespace Nsfisis\Waddiwasi\WebAssembly\Structure\Instructions\Instrs\Control;
+
+use Nsfisis\Waddiwasi\WebAssembly\Structure\Instructions\Instr;
+
+final readonly class Block extends Instr
+{
+ /**
+ * @param list<Instr> $body
+ */
+ protected function __construct(
+ public BlockType $type,
+ public array $body,
+ ) {
+ }
+
+ public static function opName(): string
+ {
+ return "block";
+ }
+}