Releases: jcornaz/beancount-parser
Releases · jcornaz/beancount-parser
v2.2.1
v2.2.0
Added
- implement
FromStr
forAccount
,Date
,Currency
andmetadata::Key
- implement
Default
forCost<D>
Date::new
constructor
Fixed
- Support non-standard account name (#76). Thanks to @Bergschrat1
v2.1.0
Added
Balance::tolerance
field
Fixed
- Accept tolerance syntax
v2.0.4
Fixed
- Accept negation of grouped expression (example:
-(2 * 3)
) - Do not require space between strings and tags/links
v2.0.3
Fixed
- Accept comma (
,
) as a thousand separator in amounts - Accept dot (
.
) in transaction links - Accept escaped backslash (
\\
) in string
v2.0.2
Fixed
- Accept escaped double quotes (
\"
) in strings
v2.0.1
v2.0.0
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 newDirectiveContent
enum which is roughly equivalent to the previousDirective
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 ofmiette::Diagnostic
for error types
v2.0.0-beta.3
Added
- The
Amount
type is now exhaustive - Support booking method in open account directive
- implement
std::error::Error
forConversionError
- implement
FromStr
forDirective<D>
whereD: Decimal
v2.0.0-beta.2
Added
Entry
enum which is one ofDirective
,Option
,Include
parse_iter
which return an iterator overResult<Entry<D>, Error>
- implement
Clone
forError
- implement
FromStr
forBeancountFile<D>
whereD: Decimal
read_files
to read and parse files from disk, following the include directives