mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-03 18:29:00 +00:00
feat: add Python API type definitions
This commit is contained in:
parent
3436b5eb02
commit
c4a0efae08
10 changed files with 98 additions and 2 deletions
11
crates/erg_compiler/lib/pystd/struct.d.er
Normal file
11
crates/erg_compiler/lib/pystd/struct.d.er
Normal file
|
@ -0,0 +1,11 @@
|
|||
.Struct: ClassType
|
||||
.Struct.
|
||||
__call__: (format: Str) -> .Struct
|
||||
format: Str
|
||||
size: Nat
|
||||
pack: (self: .Struct, *values: Obj) -> Bytes
|
||||
unpack: (self: .Struct, bytes: Bytes) -> Obj
|
||||
|
||||
.pack: (format: Str, *values: Obj) -> Bytes
|
||||
.unpack: (format: Str, bytes: Bytes) -> Obj
|
||||
.calcsize: (format: Str) -> Nat
|
Loading…
Add table
Add a link
Reference in a new issue