mirror of
https://github.com/erg-lang/erg.git
synced 2025-10-02 21:44:34 +00:00
feat: add shlex
/pickle
/marshal
This commit is contained in:
parent
4c58699157
commit
5d39c17e1e
3 changed files with 41 additions and 0 deletions
6
crates/erg_compiler/lib/pystd/marshal.d.er
Normal file
6
crates/erg_compiler/lib/pystd/marshal.d.er
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
.version: Nat
|
||||||
|
|
||||||
|
.dump!: (value: Obj, file := PathLike, version := Nat) => NoneType
|
||||||
|
.load!: (file: PathLike) => Obj
|
||||||
|
.dumps: (value: Obj, version := Nat) -> Bytes
|
||||||
|
.loads: (bytes: Bytes) -> Obj
|
17
crates/erg_compiler/lib/pystd/pickle.d.er
Normal file
17
crates/erg_compiler/lib/pystd/pickle.d.er
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
.HIGHEST_PROTOCOL: Nat
|
||||||
|
.DEFAULT_PROTOCOL: Nat
|
||||||
|
|
||||||
|
.dump!: (obj: Obj, file: PathLike, protocol := Nat) => NoneType
|
||||||
|
.dumps: (obj: Obj, protocol := Nat) -> Bytes
|
||||||
|
.load!: (
|
||||||
|
file: PathLike,
|
||||||
|
fix_imports := Bool,
|
||||||
|
encoding := Str,
|
||||||
|
errors := Str,
|
||||||
|
) => Obj
|
||||||
|
.loads: (
|
||||||
|
data: Bytes,
|
||||||
|
fix_imports := Bool,
|
||||||
|
encoding := Str,
|
||||||
|
errors := Str
|
||||||
|
) -> Obj
|
18
crates/erg_compiler/lib/pystd/shlex.d.er
Normal file
18
crates/erg_compiler/lib/pystd/shlex.d.er
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
.Shlex! = 'shlex': ClassType
|
||||||
|
.Shlex!.
|
||||||
|
commenters: Str
|
||||||
|
wordchars: Str
|
||||||
|
whitespace: Str
|
||||||
|
escape: Str
|
||||||
|
quotes: Str
|
||||||
|
escapedquotes: Str
|
||||||
|
whitespace_split: Bool
|
||||||
|
infile: Str
|
||||||
|
__call__: (instream := Str, posix := Bool, punctuation_chars := Bool) -> .Shlex!
|
||||||
|
get_token!: (self: RefMut(.Shlex!)) => Str
|
||||||
|
push_token!: (self: RefMut(.Shlex!), token: Str) => NoneType
|
||||||
|
read_token!: (self: RefMut(.Shlex!)) => Str
|
||||||
|
|
||||||
|
.split: (s: Str, comments := Bool, posix := Bool) -> [Str; _]
|
||||||
|
.join: (split_command: Iterable(Str)) -> Str
|
||||||
|
.quote: (s: Str) -> Str
|
Loading…
Add table
Add a link
Reference in a new issue