#tree-sitter #proto #incremental #parser

yanked protols-tree-sitter-proto

proto grammar for the tree-sitter parsing library

2 unstable releases

0.2.0 Jul 20, 2024
0.1.0 Jun 22, 2024

#52 in #proto

Download history 134/week @ 2024-07-15 1470/week @ 2024-07-22 2450/week @ 2024-07-29 2128/week @ 2024-08-05 1704/week @ 2024-08-12 2162/week @ 2024-08-19 2257/week @ 2024-08-26 1775/week @ 2024-09-02 1636/week @ 2024-09-09 643/week @ 2024-09-16 182/week @ 2024-09-23 101/week @ 2024-09-30 45/week @ 2024-10-07 52/week @ 2024-10-14 32/week @ 2024-10-21

246 downloads per month

MIT license

240KB
9K SLoC

C 8K SLoC JavaScript 400 SLoC // 0.1% comments Scheme 46 SLoC Rust 33 SLoC // 0.4% comments

tree-sitter-proto

tree-sitter grammar for protocol buffer files (proto3 only).

Status

The grammar should be complete. I'm still working on the highlighting queries. I've tested the grammar against some really large and nasty proto files and it passes. Once the highlighting is stable, I'll tag 1.0.

Modifications on fork


lib.rs:

This crate provides proto 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(&protols_tree_sitter_proto::language()).expect("Error loading proto grammar");
let tree = parser.parse(code, None).unwrap();

Dependencies

~2.8–4MB
~74K SLoC