jcornaz / beancount-parser

A beancount file parser library for rust
The Unlicense
21 stars 7 forks source link

feat: balance assertion directive #22

Closed jeffwheeler closed 1 year ago

jeffwheeler commented 1 year ago

This change adds support for parsing balance assertions (Beancount documentation). They look like this:

2014-12-26 balance Liabilities:US:CreditCard   -3492.02 USD
jeffwheeler commented 1 year ago

No problem! I wanted to knock out the things that were blocking my own use of this parser.

As it turns out, the most annoying thing I discovered is that apparently the official Beancount parser accepts Unicode, but this is not part of the language spec. So... I don't know how you'd feel about accepting a pull request to support that. I use Emoji heavily in my account names. 😂

jcornaz commented 1 year ago

Sounds cool to me. The way I see it, beancount-parser may accept more than what the official spec says, as long as it is possible to accept any valid beancount file.

I may even steal the idea to use emojis in my account names :-p