Skip to main content

parse_without_occurrences

Function parse_without_occurrences 

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

Parse beancount source for the processing pipeline, without collecting the currency_occurrences / account_occurrences indices.

Those two indices are consumed only by the LSP. The loader / CLI processing path (rustledger_loader::load and friends) never reads them, so skipping their collection avoids the largest per-token allocation+CPU cost in the parser (one Account::new / Currency::new plus an in-ERROR_NODE ancestor walk per ACCOUNT / CURRENCY token). The returned ParseResult is identical to parse’s except both occurrence vectors are empty.

Editor / LSP callers that need rename / references / highlight data must use parse instead.