-
Notifications
You must be signed in to change notification settings - Fork 23
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
Basic extractors #114
Basic extractors #114
Conversation
error("$(location.file):$(location.line): The type `$bound_type` has " * | ||
"$(length(field_names)) fields but the pattern expects $len fields.") | ||
end | ||
is_type = !Base.isnothing(try_bind_type(location, T, input, binder)) |
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.
This line does no good if T is not a symbol. Perhaps
is_extractor = T isa Symbol && Base.isnothing(try_bind_type(location, T, input, binder))
end | ||
|
||
@testset "extractor function missing" begin | ||
# Bar is neither a type nor an extractor function |
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.
Please test the location and text of the diagnostic.
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.
Looks nice, with a couple of minor suggestions.
Closing in favor of #116 |
Simple extractor implementation. Supports only positional arguments for now. This is a strawman to work out the design.
Fixes #92