1 stable release

new 1.0.2 Jun 15, 2025

#2291 in Parser implementations

Download history 99/week @ 2025-06-11

99 downloads per month

MIT license

430KB
17K SLoC

C 17K SLoC // 0.0% comments JavaScript 401 SLoC // 0.1% comments Scheme 140 SLoC // 0.2% comments Rust 32 SLoC // 0.1% comments

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

tree-sitter-miniscript

A Tree-sitter grammar for the MiniScript programming language.

This parser can be used in editors, code analysis tools, and other applications that leverage Tree-sitter for parsing and syntax highlighting.

Dependencies

~4–280KB