Releases: jcornaz/beancount-parser
v2.0.0-beta.1
I finally decided to re-use the old crate name beancount-parser
instead of continuing with beancount_parser_2.
This release contains exactly the same functionallity beancount_parser_2
version 1.0.0-beta.3
.
beancount_parser_2
will be discontinued and archived soon.
Breaking changes
This is a full rewrite of the parser from scratch.
Most types have been either removed or changed in an incompatible way.
This new version is also 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-beta.1" }
Supported beancount syntax
- Transaction
- flag
- payee and description
- tags
- links
- metadata
- postings
- account
- amount
- price
- cost
- amount
- date
- metadata
- Price directive
- Open and close directives
- Balance assertion
- Commodity declaration
- Events
- Options
- Directive metadata (string values only)
Thank you
v1.16.3
Documentation
Update status in readme
v1.16.2
Breaking changes (in unstable API)
remove pest_parser
The pest
experiment was not conclusive. It is much slower than the nom
implementation and the code is not significantly more maintainable in my opinion.
On top of that, the latest pest
patch contained some breaking changes, causing new compile errors.
Therefore, this release completely removes the experimental pest parser.
v1.16.1
v1.16.0
Breaking changes (in unstable API)
-
remove
Error::line_number
(Instead, I am working on a wrapper type that would work for locating both errors and successfully parsed directives)
Added
- implement
Default
fortransaction::Flag
(The default value istransaction::Flag::Cleared
)
Changed
- Accept account types without more components. (e.g.
2023-05-13 open Assets
is now valid) - Ignore trailing spaces after transaction/posting declarations
- Accept amount values with the unary operator
+
(e.g.+42
) - Accept spaces before the comma in currency list of open directive
Unstable API added
Warning
The unstable API requires the
unstable
feature flag. It is not considered part of the public API
and is subject to breaking changes.
- Parse
option
directive - Parse
event
directive - Parse
commodity
directive
v1.15.0
Added
-
AccountType
alias foraccount::Type
-
unstable:
metadata
modulewhich makes possible to pattern match the result of
Transaction::metadata
.
Deprecated
-
Type
It has been made public by mistake. Use
AccountType
oraccount::Type
instead.
Documentation
- readme: Warning about unsupported feature flags