#tree-sitter #beancount #parser #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

#211 in Text editors

Download history 22/week @ 2024-11-13 27/week @ 2024-11-20 51/week @ 2024-11-27 34/week @ 2024-12-04 60/week @ 2024-12-11 18/week @ 2024-12-18 8/week @ 2024-12-25 23/week @ 2025-01-01 167/week @ 2025-01-08 14/week @ 2025-01-15 116/week @ 2025-01-22 41/week @ 2025-01-29 29/week @ 2025-02-05 28/week @ 2025-02-12 36/week @ 2025-02-19 39/week @ 2025-02-26

139 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