Skip to content

Releases: jcornaz/beancount-parser

v2.2.1

28 Apr 08:55
Compare
Choose a tag to compare

Fixes

  • Fix Debug implementation of Error which was dumping the whole input

v2.2.0

29 Mar 21:45
Compare
Choose a tag to compare

Added

  • implement FromStr for Account, Date, Currency and metadata::Key
  • implement Default for Cost<D>
  • Date::new constructor

Fixed

v2.1.0

29 Jan 19:34
Compare
Choose a tag to compare

Added

  • Balance::tolerance field

Fixed

  • Accept tolerance syntax

v2.0.4

19 Jan 18:37
Compare
Choose a tag to compare

Fixed

  • Accept negation of grouped expression (example: -(2 * 3))
  • Do not require space between strings and tags/links

v2.0.3

18 Jan 18:46
Compare
Choose a tag to compare

Fixed

  • Accept comma (,) as a thousand separator in amounts
  • Accept dot (.) in transaction links
  • Accept escaped backslash (\\) in string

v2.0.2

17 Jan 19:24
Compare
Choose a tag to compare

Fixed

  • Accept escaped double quotes (\") in strings

v2.0.1

07 Jan 17:16
Compare
Choose a tag to compare

Fixed

Accept commodities ending with a number (#63). Thanks @doriath for the fix.

v2.0.0

11 Jul 19:28
Compare
Choose a tag to compare

Breaking changes (since version 1.16)

This is a full rewrite of the parser from scratch.
Most types have been either removed or changed in an incompatible way.

Here are some key differences with the previous API:

  • The types no longer have a lifetime parameter, so that they can be manipulated more easily, even after the
    input string is discarded.
  • Struct fields are public, which makes much easier to destruct and pattern-match the results of the parser.
  • The directive type is now a struct (not an enum) that contains common directive data (date and metadata).
    And there is a new DirectiveContent enum which is roughly equivalent to the previous Directive enum.
  • The parser is more strict about what beancount syntax is considered valid.

Check the documentation to see how the new API looks like.

Note

You may depend on both the version 1 and 2 at the same time like this:

[dependencies]
# version 1, in rust code `use beancount_parser::...`
beancount-parser = { version = "1" } 
# version 2, in rust code `use beancount_parser_2::...`
beancount-parser-2 = { package = "beancount-parser", version = "2.0.0" }

Added (since version 2.0.0-beta.3)

  • Cargo feature flag miette, which enable implementation of miette::Diagnostic for error types

v2.0.0-beta.3

09 Jul 21:15
Compare
Choose a tag to compare
v2.0.0-beta.3 Pre-release
Pre-release

Added

  • The Amount type is now exhaustive
  • Support booking method in open account directive
  • implement std::error::Error for ConversionError
  • implement FromStr for Directive<D> where D: Decimal

v2.0.0-beta.2

08 Jul 15:57
Compare
Choose a tag to compare
v2.0.0-beta.2 Pre-release
Pre-release

Added

  • Entry enum which is one of Directive, Option, Include
  • parse_iter which return an iterator over Result<Entry<D>, Error>
  • implement Clone for Error
  • implement FromStr for BeancountFile<D> where D: Decimal
  • read_files to read and parse files from disk, following the include directives