5 releases (stable)

1.3.0 Dec 22, 2024
1.2.0 Jul 24, 2023
1.1.0 Jul 15, 2023
1.0.0 May 13, 2023
0.0.1 Apr 26, 2023

#2466 in Parser implementations

Download history 135/week @ 2024-12-17 23/week @ 2024-12-24 11/week @ 2025-01-07 9/week @ 2025-01-14 1/week @ 2025-01-21 9/week @ 2025-01-28 6/week @ 2025-02-04 2/week @ 2025-02-11 3/week @ 2025-02-25 2/week @ 2025-03-04

292 downloads per month
Used in puppet-fmt

MIT license

680KB
27K SLoC

C 26K SLoC JavaScript 469 SLoC // 0.0% comments Scheme 190 SLoC // 0.1% comments Rust 27 SLoC

This crate provides Puppet 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_puppet::LANGUAGE;
parser
    .set_language(&language.into())
    .expect("Error loading Puppet parser");
let tree = parser.parse(code, None).unwrap();
assert!(!tree.root_node().has_error());

tree-sitter-puppet

Build Status Discord

Puppet grammar for tree-sitter.

Adapted from the docs

Dependencies

~4–280KB