#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

#114 in Text editors

Download history 2/week @ 2023-12-10 18/week @ 2023-12-17 4/week @ 2023-12-24 2/week @ 2024-01-07 60/week @ 2024-01-14 34/week @ 2024-01-21 38/week @ 2024-01-28 131/week @ 2024-02-04 34/week @ 2024-02-11 75/week @ 2024-02-18 214/week @ 2024-02-25 94/week @ 2024-03-03 203/week @ 2024-03-10 65/week @ 2024-03-17

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