mirror of
https://github.com/erg-lang/erg.git
synced 2025-10-02 21:44:34 +00:00
Update mod.rs
This commit is contained in:
parent
112f1c793f
commit
ba84026eb6
1 changed files with 6 additions and 0 deletions
|
@ -921,6 +921,12 @@ impl Context {
|
|||
Immutable,
|
||||
Public,
|
||||
);
|
||||
str_.register_builtin_impl(
|
||||
"format",
|
||||
fn_met(Str, vec![], Some(kw("args", Obj)), vec![], Str),
|
||||
Immutable,
|
||||
Public,
|
||||
);
|
||||
let mut str_eq = Self::builtin_methods(Some(mono("Eq")), 2);
|
||||
str_eq.register_builtin_impl("__eq__", fn1_met(Str, Str, Bool), Const, Public);
|
||||
str_.register_trait(Str, str_eq);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue