#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

#146 in Text editors

Download history 3/week @ 2023-12-22 1/week @ 2023-12-29 1/week @ 2024-01-05 52/week @ 2024-01-12 32/week @ 2024-01-19 43/week @ 2024-01-26 125/week @ 2024-02-02 32/week @ 2024-02-09 80/week @ 2024-02-16 177/week @ 2024-02-23 98/week @ 2024-03-01 224/week @ 2024-03-08 64/week @ 2024-03-15 41/week @ 2024-03-22 51/week @ 2024-03-29 33/week @ 2024-04-05

195 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
~71K SLoC