#proto #parser #incremental

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

#107 in Text editors

Download history 173/week @ 2024-06-20 14/week @ 2024-06-27 2/week @ 2024-07-04 2/week @ 2024-07-11 250/week @ 2024-07-18 2309/week @ 2024-07-25 2525/week @ 2024-08-01 1822/week @ 2024-08-08 1993/week @ 2024-08-15 2165/week @ 2024-08-22 1737/week @ 2024-08-29

8,097 downloads per month
Used in protols

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