#tree-sitter #beancount #parser #incremental

tree-sitter-beancount

beancount grammar for the tree-sitter parsing library

8 stable releases

2.3.2 Mar 9, 2024
2.2.0 Oct 14, 2023
2.1.3 Jul 2, 2023
2.1.2 Jan 28, 2023
0.0.1 Nov 11, 2021

#140 in Text editors

Download history 36/week @ 2024-01-29 130/week @ 2024-02-05 36/week @ 2024-02-12 83/week @ 2024-02-19 214/week @ 2024-02-26 197/week @ 2024-03-04 94/week @ 2024-03-11 67/week @ 2024-03-18 14/week @ 2024-03-25 69/week @ 2024-04-01 59/week @ 2024-04-08 129/week @ 2024-04-15 60/week @ 2024-04-22 28/week @ 2024-04-29 25/week @ 2024-05-06 10/week @ 2024-05-13

125 downloads per month
Used in beancount-language-server

MIT license

480KB
17K SLoC

C 17K SLoC JavaScript 715 SLoC // 0.0% 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
~72K SLoC