Skip to content
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

Use implicit whitespace in Pest grammar #16

Merged
merged 3 commits into from
Apr 28, 2019
Merged

Use implicit whitespace in Pest grammar #16

merged 3 commits into from
Apr 28, 2019

Conversation

mbudde
Copy link
Collaborator

@mbudde mbudde commented Mar 28, 2019

First try at using the implicit whitespace feature of Pest. Test suite passes but I'm not completely confident that all rules work correctly.

Fixes #14

mbudde added 2 commits March 28, 2019 21:37
With this I can now parse my personal Beancount journal.
@twilco
Copy link
Owner

twilco commented Mar 28, 2019

Thanks for tackling this! I took a go at it a few weeks ago but ran into issues and then got busy. I'll watch for this to come out of draft and review at that point.

@mbudde mbudde marked this pull request as ready for review April 25, 2019 17:59
@mbudde mbudde requested a review from twilco as a code owner April 25, 2019 17:59
@mbudde
Copy link
Collaborator Author

mbudde commented Apr 25, 2019

The grammar now parses the output from bean-example successfully.

Copy link
Owner

@twilco twilco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again for doing this! It looks great. Goodbye to the multitudes of ws* and ws+ ☠️

src/beancount.pest Outdated Show resolved Hide resolved
src/beancount.pest Outdated Show resolved Hide resolved
@twilco
Copy link
Owner

twilco commented Apr 27, 2019

While it seems like Beancount proper ignores org-mode titles vs. producing a token like our implementation might, I don't think that's a big deal and certainly nothing worth blocking this PR from merging. This looks great to me - if there's nothing else you wanted to do with this, go ahead and merge 👍

@mbudde
Copy link
Collaborator Author

mbudde commented Apr 28, 2019

This looks great to me - if there's nothing else you wanted to do with this, go ahead and merge +1

Thank you for reviewing! 😄

@mbudde mbudde merged commit 634f4a6 into master Apr 28, 2019
@mbudde mbudde deleted the implicit-ws branch April 28, 2019 06: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.

Support tokens that have no whitespace between them
2 participants