blob: a5f2b401a3cf32bb3ab1d0bc24d835ac82da807f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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);
}
}
|