twilco / beancount

Rust tooling surrounding beancount, a text-based double-entry bookkeeping language.
59 stars 13 forks source link

Support `number_expr` arithmetic #1

Closed twilco closed 5 years ago

twilco commented 5 years ago

Proper Beancount syntax supports inline arithmetic as part of the parsing process. We should support this too, but currently don't - files with these operations will fail to parse. See the original Beancount's number_expr: https://bitbucket.org/blais/beancount/src/default/beancount/parser/grammar.y?fileviewer=file-view-default#grammar.y-293

twilco commented 5 years ago

This was fixed with c848534f6e357b2f1a5b91534416fdf87b9cd60e. We now parse entire num_exprs - the resolution of a num_expr to a singular number can be done after tokenization.