#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

#154 in #proto

Download history 1094/week @ 2024-07-20 2406/week @ 2024-07-27 2241/week @ 2024-08-03 1753/week @ 2024-08-10 2050/week @ 2024-08-17 2215/week @ 2024-08-24 1955/week @ 2024-08-31 1633/week @ 2024-09-07 964/week @ 2024-09-14 204/week @ 2024-09-21 86/week @ 2024-09-28 73/week @ 2024-10-05 54/week @ 2024-10-12 38/week @ 2024-10-19 11/week @ 2024-10-26 7/week @ 2024-11-02

117 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
~79K SLoC