fix: add __call__ for builtin classes

This commit is contained in:
Shunsuke Shibayama 2023-03-24 10:34:44 +09:00
parent 4ff0b64fc3
commit 3940f7f36c
3 changed files with 41 additions and 0 deletions

View file

@ -2,6 +2,11 @@ use std::convert::TryInto;
use crate::ty::*;
#[inline]
pub fn pos(ty: Type) -> ParamTy {
ParamTy::Pos(ty)
}
#[inline]
pub fn kw(name: &'static str, ty: Type) -> ParamTy {
ParamTy::kw(Str::ever(name), ty)