2 unstable releases

0.2.0 Oct 25, 2024
0.1.0 Oct 24, 2024

#2862 in Parser implementations

Download history 174/week @ 2025-03-10 74/week @ 2025-03-17 179/week @ 2025-03-24 119/week @ 2025-03-31 132/week @ 2025-04-07 278/week @ 2025-04-14 101/week @ 2025-04-21 165/week @ 2025-04-28 95/week @ 2025-05-05 166/week @ 2025-05-12 170/week @ 2025-05-19 198/week @ 2025-05-26 370/week @ 2025-06-02 368/week @ 2025-06-09 499/week @ 2025-06-16 275/week @ 2025-06-23

1,520 downloads per month
Used in 3 crates (2 directly)

MIT license

275KB
10K SLoC

C 9K SLoC JavaScript 431 SLoC // 0.1% comments Scheme 47 SLoC Rust 27 SLoC // 0.3% comments

This crate provides Proto language support for the tree-sitter parsing library.

Typically, you will use the [LANGUAGE][] constant to add this language to a tree-sitter Parser, and then use the parser to parse some code:

let code = r#"
"#;
let mut parser = tree_sitter::Parser::new();
let language = tree_sitter_proto::LANGUAGE;
parser
    .set_language(&language.into())
    .expect("Error loading Proto parser");
let tree = parser.parse(code, None).unwrap();
assert!(!tree.root_node().has_error());

tree-sitter-proto

CI crates

Protocol buffer grammer for tree-sitter.

✨ Features

  • ✅ Basic Proto2 support
  • ✅ Proto3 support
  • ✅ Support for editions

Special Thanks

Special thanks to the following people for their amazing work in this grammer.

Dependencies

~4–280KB