[parser-utils] Determine a pattern for using combine
to parse tuples
#155
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#155
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?
This is follow-up to https://github.com/mozilla/mentat/pull/393#discussion_r109059135. It's not easy to parse two streams in lock-step using
combine
; this would be handy for parsing maps, which iterate naturally as(k, v)
pairs. In response I flatten into a sequence[k1 v1 k2 v2 ...]
, whichcombine
handles just fine.combine
takes tuples to mean order: that is,(p1, p2)
expectsp1
to succeed (possibly consuming input) and thenp2
to succeed, starting after the input thatp1
consumed.Suppose for the moment that instead
(p1, p2)
means to parsep1
on the first element of tuples andp2
on the second element of tuples. I don't know how sensible this is; for example, what would(many(p1), p2)
do? I'm filing this to have a place to leave thoughts as they come to us.