mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 10:49:54 +00:00
feat: support decorator
This commit is contained in:
parent
5497af5626
commit
9db9348dc5
8 changed files with 118 additions and 9 deletions
|
@ -120,6 +120,13 @@ pub(crate) fn inheritable_func(mut args: ValueArgs, _ctx: &Context) -> EvalValue
|
|||
}
|
||||
}
|
||||
|
||||
pub(crate) fn override_func(mut args: ValueArgs, _ctx: &Context) -> EvalValueResult<TyParam> {
|
||||
let func = args
|
||||
.remove_left_or_key("func")
|
||||
.ok_or_else(|| not_passed("func"))?;
|
||||
Ok(func.into())
|
||||
}
|
||||
|
||||
/// Base: Type, Impl := Type -> TraitType
|
||||
pub(crate) fn trait_func(mut args: ValueArgs, ctx: &Context) -> EvalValueResult<TyParam> {
|
||||
let req = args
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue