-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Builtin trait and refactor all builtin functions to use it #244
Conversation
f180506
to
2740b1a
Compare
Looks good, thanks! |
Add Builtin trait and refactor all builtin functions to use it Refactor builtin function to Builtin trait Fix
2740b1a
to
116839a
Compare
@katat |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks again!
(ASSERT_FN, assert_fn, false), | ||
(ASSERT_EQ_FN, assert_eq_fn, false), | ||
(AssertEqFn::SIGNATURE, AssertEqFn::builtin, false), | ||
(AssertFn::SIGNATURE, AssertFn::builtin, false), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be better to just return an array of structs with Builtin trait?
Error::new( | ||
pub trait Builtin { | ||
const SIGNATURE: &'static str; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can add a constant property SKIP_TYPE_CHECK: bool
to indicate whether to type check this builtin signature and avoid the need to specify them within the get_fns
function.
Addresses this issue #227.
Already merged with #238.