Skip to main content

parse

Function parse 

Source
pub fn parse(source: &str) -> ParseResult
Expand description

Parse beancount source code.

Uses a fast token-based parser: a Logos lexer feeds a hand-rolled state-machine parser. An early version targeted winnow’s Stream trait but the manual approach turned out simpler and faster, so the winnow dependency was removed.

§Arguments

  • source - The beancount source code to parse

§Returns

A ParseResult containing directives, options, includes, plugins, and errors.