-
Notifications
You must be signed in to change notification settings - Fork 46
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
Fix trailing commas in flow sequences #116
Conversation
Codecov Report
@@ Coverage Diff @@
## master #116 +/- ##
==========================================
+ Coverage 84.38% 86.24% +1.85%
==========================================
Files 12 12
Lines 1531 1534 +3
==========================================
+ Hits 1292 1323 +31
+ Misses 239 211 -28
Continue to review full report at Codecov.
|
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 looks fine to me, but I'd love to get another set of eyes on it if possible.
Is the peek(composter.input)
thing a behavior that could change, or hacky for some other reason? Either way, is it worth adding a comment mentioning why it's hacky or unintuitive for the sake of future maintainers?
To be honest, the hacky part was already there, in that One alternative would be for |
Gotcha. If the change you propose is outside the scope of this PR, could you just open an issue so that it doesn't get buried once this is merged? I'll just leave it open for a couple of days in case anyone else wants to review it - please feel free to ping me if it hasn't been merged by the end of the week. |
This change allows the graceful handling of trailing commas in flow sequences. I've also added a couple test cases.
It relies on
peek(composer.input)
returningnothing
in the case of aFlowSequenceEndToken
which is a bit hacky, but it works well enough.Fixes #114