#tree-sitter

tree-sitter-beancount

beancount grammar for the tree-sitter parsing library

9 stable releases

2.3.3 Jul 20, 2024
2.3.2 Mar 9, 2024
2.3.1 Feb 29, 2024
2.2.0 Oct 14, 2023
0.0.1 Nov 11, 2021

#430 in Text editors

Download history 28/week @ 2024-07-01 65/week @ 2024-07-08 200/week @ 2024-07-15 71/week @ 2024-07-22 70/week @ 2024-07-29 105/week @ 2024-08-05 69/week @ 2024-08-12 30/week @ 2024-08-19 57/week @ 2024-08-26 39/week @ 2024-09-02 50/week @ 2024-09-09 53/week @ 2024-09-16 53/week @ 2024-09-23 61/week @ 2024-09-30 27/week @ 2024-10-07 31/week @ 2024-10-14

177 downloads per month
Used in beancount-language-server

MIT license

520KB
19K SLoC

C 18K SLoC JavaScript 619 SLoC // 0.1% 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
~73K SLoC