#tree-sitter #beancount #incremental

tree-sitter-beancount

beancount grammar for the tree-sitter parsing library

9 stable releases

2.3.3 Jul 20, 2024
2.3.2 Mar 9, 2024
2.3.1 Feb 29, 2024
2.2.0 Oct 14, 2023
0.0.1 Nov 11, 2021

#207 in Text editors

Download history 30/week @ 2024-08-19 57/week @ 2024-08-26 39/week @ 2024-09-02 50/week @ 2024-09-09 53/week @ 2024-09-16 53/week @ 2024-09-23 61/week @ 2024-09-30 27/week @ 2024-10-07 31/week @ 2024-10-14 108/week @ 2024-10-21 34/week @ 2024-10-28 37/week @ 2024-11-04 20/week @ 2024-11-11 29/week @ 2024-11-18 45/week @ 2024-11-25 32/week @ 2024-12-02

129 downloads per month
Used in beancount-language-server

MIT license

520KB
19K SLoC

C 18K SLoC JavaScript 619 SLoC // 0.1% comments Rust 35 SLoC // 0.4% comments

tree-sitter-beancount

a tree-sitter parser for the beancount syntax

Reference

Beancount syntax tree-sitter


lib.rs:

This crate provides beancount language support for the tree-sitter parsing library.

Typically, you will use the language function to add this language to a tree-sitter Parser, and then use the parser to parse some code:

let code = "";
let mut parser = tree_sitter::Parser::new();
parser.set_language(tree_sitter_beancount::language()).expect("Error loading beancount grammar");
let tree = parser.parse(code, None).unwrap();

Dependencies

~2.7–4MB
~76K SLoC