Crate ledger_parser[][src]

Expand description

Rust library for parsing Ledger-cli input files.

Only a subset of the ledger-cli’s file format is implemented.

Supported elements:

  • Line comments (starting with: ; # % | *)

  • Inline comments (starting with ;)

  • Transaction headers with format:

    DATE[=EDATE] [*|!] [(CODE)] DESC
  • Transaction postings with format (minimum two spaces or one tab between ACCOUNT and AMOUNT):

      ACCOUNT  [AMOUNT] [= BALANCE] [; NOTE]
    • Virtual accounts are supported
    • There may be only a single posting without an amount or balance in a transaction
  • Commodity prices with format:

    P DATE SYMBOL PRICE
  • Command directives: include

Structs

Commodity price.

Main document. Contains transactions and/or commodity prices.

Transaction.

Enums

Traits

Functions

Parses ledger-cli source to AST tree.