[query-parser] Make parsing find more efficient and produce better error messages #156
Labels
No labels
A-build
A-cli
A-core
A-design
A-edn
A-ffi
A-query
A-sdk
A-sdk-android
A-sdk-ios
A-sync
A-transact
A-views
A-vocab
P-Android
P-desktop
P-iOS
bug
correctness
dependencies
dev-ergonomics
discussion
documentation
duplicate
enhancement
enquiry
good first bug
good first issue
help wanted
hygiene
in progress
invalid
question
ready
size
speed
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: greg/mentat#156
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
There are two things at play here. In response to https://github.com/mozilla/mentat/pull/393#discussion_r109068152, this is definitely not the most efficient expression. In response to https://github.com/mozilla/mentat/pull/393#discussion_r109068301, it's really nice to parse the map values using
combine
.So this ticket tracks merging the new
combine
approach with the oldBTreeMap
approach, hopefully getting the performance and error handling advantages of the former with the pleasant combinatorial expression of the latter.When I was pondering how to do this, I wondered about a macro that takes pairs of key-parser (or just keyword), value-parser with output types
Value_1, ... ,Value_n
and produces a typed tuple of fixed length n of type(Option<Value_1>, ..., Option<Value_n>)
. That gets around the heterogeneous return types while still allowing us to use parsers for the values.