Closed darylwright closed 1 year ago
Prod build currently fails, still have some cleanup to do.
Edit: Completed.
Sorry - had an interesting CPU hardware issue that was preventing me from running the test suite without getting segfaults. Item replaced now and I'll have a look at this and merge. Thanks for all your work!
Thanks! The parsing algorithm for the amount is particularly complex as you'll see in the diagram. I think I got it right, but could use a bit of scrutiny. Also, I tried to represent the amount in the raw type as simply as possible, but I'm open to suggestions on how to communicate the location of whitespace, commodity, and signs. For now, I just ensure the number, commodity, and sign are stored in their own respective fields, while the full expression of the amount with whitespace is just a single string field.
You weren't kidding :-)
This looks actually spot on to me. Well done!
Awesome, thanks for the merge! This will make it easier to implement the commodity directive. It was during development of that feature where I realized I needed the correct amount parsing algorithm.
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
What is the current behavior? (You can also link to an open issue here)
hledger-parser
only supports negative numbers and implicitly positive numbers (without the plus).What is the new behavior (if this is a feature change)?
Other information:
fixes #6