aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Structure/Modules/ImportDesc.php
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-01-03 01:35:32 +0900
committernsfisis <nsfisis@gmail.com>2024-01-27 12:05:23 +0900
commite2495878b872b341e6e04eed31dd255b1a6e256f (patch)
tree4057ab19765ea7fc13505798c6434dceac02f4b1 /src/Structure/Modules/ImportDesc.php
parent5b4652d080c7eae26f8aac482468a6777ad9defe (diff)
downloadphp-waddiwasi-e2495878b872b341e6e04eed31dd255b1a6e256f.tar.gz
php-waddiwasi-e2495878b872b341e6e04eed31dd255b1a6e256f.tar.zst
php-waddiwasi-e2495878b872b341e6e04eed31dd255b1a6e256f.zip
feat: implement binary decoder
Diffstat (limited to 'src/Structure/Modules/ImportDesc.php')
-rw-r--r--src/Structure/Modules/ImportDesc.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/Structure/Modules/ImportDesc.php b/src/Structure/Modules/ImportDesc.php
new file mode 100644
index 0000000..a5f2b40
--- /dev/null
+++ b/src/Structure/Modules/ImportDesc.php
@@ -0,0 +1,33 @@
+<?php
+
+declare(strict_types=1);
+
+namespace Nsfisis\Waddiwasi\Structure\Modules;
+
+use Nsfisis\Waddiwasi\Structure\Types\GlobalType;
+use Nsfisis\Waddiwasi\Structure\Types\MemType;
+use Nsfisis\Waddiwasi\Structure\Types\TableType;
+use Nsfisis\Waddiwasi\Structure\Types\TypeIdx;
+
+abstract readonly class ImportDesc
+{
+ final public static function Func(TypeIdx $func): ImportDescs\Func
+ {
+ return new ImportDescs\Func($func);
+ }
+
+ final public static function Table(TableType $table): ImportDescs\Table
+ {
+ return new ImportDescs\Table($table);
+ }
+
+ final public static function Mem(MemType $mem): ImportDescs\Mem
+ {
+ return new ImportDescs\Mem($mem);
+ }
+
+ final public static function Global(GlobalType $global): ImportDescs\Global_
+ {
+ return new ImportDescs\Global_($global);
+ }
+}