#incremental #parsing #beancount #tree-sitter

tree-sitter-beancount

beancount grammar for the tree-sitter parsing library

5 stable releases

2.1.3 Jul 2, 2023
2.1.2 Jan 28, 2023
2.1.1 Jul 2, 2022
2.1.0 Jun 28, 2022
0.0.1 Nov 11, 2021

#107 in Text editors

Download history 54/week @ 2023-05-30 69/week @ 2023-06-06 41/week @ 2023-06-13 33/week @ 2023-06-20 44/week @ 2023-06-27 56/week @ 2023-07-04 23/week @ 2023-07-11 36/week @ 2023-07-18 32/week @ 2023-07-25 25/week @ 2023-08-01 36/week @ 2023-08-08 41/week @ 2023-08-15 24/week @ 2023-08-22 32/week @ 2023-08-29 27/week @ 2023-09-05 21/week @ 2023-09-12

112 downloads per month
Used in beancount-language-server

MIT license

475KB
17K SLoC

C 16K SLoC JavaScript 715 SLoC // 0.0% comments C++ 135 SLoC Rust 41 SLoC // 0.3% 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.5–3.5MB
~67K SLoC