2 unstable releases
0.2.0 | Jul 20, 2024 |
---|---|
0.1.0 | Jun 22, 2024 |
#154 in #proto
117 downloads per month
240KB
9K
SLoC
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