-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathstruct.py
31 lines (24 loc) · 945 Bytes
/
struct.py
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
import typing
from collections.abc import Sequence
import mypy.nodes
from puya.awst.nodes import Expression
from puya.parse import SourceLocation
from puyapy.awst_build import pytypes
from puyapy.awst_build.eb.interface import InstanceBuilder, NodeBuilder, TypeBuilder
class StructSubclassExpressionBuilder(TypeBuilder[pytypes.StructType]):
def __init__(self, typ: pytypes.PyType, location: SourceLocation):
assert isinstance(typ, pytypes.StructType)
assert pytypes.StructBaseType < typ
super().__init__(typ, location)
def call(
self,
args: Sequence[NodeBuilder],
arg_kinds: list[mypy.nodes.ArgKind],
arg_names: list[str | None],
location: SourceLocation,
) -> InstanceBuilder:
raise NotImplementedError
def StructExpressionBuilder( # noqa: N802
expr: Expression, typ: pytypes.PyType # noqa: ARG001
) -> typing.Never:
raise NotImplementedError