#incremental #parsing #beancount #tree-sitter

tree-sitter-beancount

beancount grammar for the tree-sitter parsing library

3 stable releases

2.1.1 Jul 2, 2022
2.1.0 Jun 28, 2022
2.0.0 Nov 11, 2021
0.0.1 Nov 11, 2021

#167 in Parser tooling

Download history 60/week @ 2022-04-17 128/week @ 2022-04-24 348/week @ 2022-05-01 39/week @ 2022-05-08 57/week @ 2022-05-15 29/week @ 2022-05-22 79/week @ 2022-05-29 27/week @ 2022-06-05 42/week @ 2022-06-12 173/week @ 2022-06-19 177/week @ 2022-06-26 75/week @ 2022-07-03 93/week @ 2022-07-10 52/week @ 2022-07-17 45/week @ 2022-07-24 140/week @ 2022-07-31

332 downloads per month
Used in beancount-language-server

MIT license

425KB
16K SLoC

C 15K SLoC JavaScript 738 SLoC // 0.0% comments C++ 129 SLoC Rust 41 SLoC // 0.3% comments

tree-sitter-beancount

a tree-sitter parser for the beancount syntax


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

~1.4–2MB
~52K SLoC