#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

#208 in Text editors

Download history 80/week @ 2024-10-27 36/week @ 2024-11-03 20/week @ 2024-11-10 26/week @ 2024-11-17 48/week @ 2024-11-24 32/week @ 2024-12-01 62/week @ 2024-12-08 23/week @ 2024-12-15 17/week @ 2024-12-22 11/week @ 2024-12-29 30/week @ 2025-01-05 156/week @ 2025-01-12 25/week @ 2025-01-19 120/week @ 2025-01-26 41/week @ 2025-02-02 14/week @ 2025-02-09

201 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.8–4MB
~77K SLoC