Skip to content

Provide FromPest impls for small tuples#7

Merged
CAD97 merged 1 commit intomasterfrom
tuples
Nov 17, 2018
Merged

Provide FromPest impls for small tuples#7
CAD97 merged 1 commit intomasterfrom
tuples

Conversation

@CAD97
Copy link
Collaborator

@CAD97 CAD97 commented Nov 10, 2018

The idea is that this can be useful for small repetitions such as separated sequencing, (item ~ comma)* ~ item? style.

If comma is silent, then Vec<item> works. If comma isn't silent, then you have to acknowledge it somehow; with this patch, you should be able to convert this as (Vec<(item, comma)>, Option<item>).

I'm thinking about how pest-ast can potentially expose this pattern. I'm thinking I'll want a "runtime" for pest-ast that has things like syn's Punctuated.

@CAD97
Copy link
Collaborator Author

CAD97 commented Nov 17, 2018

bors: r+

@CAD97
Copy link
Collaborator Author

CAD97 commented Nov 17, 2018

Oh wait 😅

@CAD97 CAD97 merged commit bf9561e into master Nov 17, 2018
@tomtau tomtau deleted the tuples branch April 9, 2023 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant