25 lines
445 B
Python
25 lines
445 B
Python
import stdint
|
|
import t, c
|
|
|
|
|
|
A: t.CChar | t.CPtr = "你好"
|
|
|
|
class BIT_TEST(t.Object):
|
|
a: t.CInt | t.Bit(1)
|
|
b: t.CInt | t.Bit(1)
|
|
c: t.CInt | t.Bit(1)
|
|
d: t.CInt | t.Bit(5)
|
|
|
|
class OOP_TEST(t.Object):
|
|
a: t.CInt
|
|
def __init__(self):
|
|
self.a = 0
|
|
def __call__(self) -> stdint.UINT:
|
|
return 123
|
|
|
|
class ENUM_TEST(t.CEnum):
|
|
A: t.State = 0
|
|
B: t.State
|
|
C: t.State
|
|
Len: t.State
|