4 releases (stable)

1.1.0 Dec 22, 2024
1.0.1 Feb 1, 2024
1.0.0 May 13, 2023
0.0.1 Feb 23, 2023

#247 in Text editors

Download history 14/week @ 2024-12-09 113/week @ 2024-12-16 41/week @ 2024-12-23 3/week @ 2025-01-06 37/week @ 2025-01-13 36/week @ 2025-01-20

73 downloads per month

MIT license

1MB
47K SLoC

C 46K SLoC JavaScript 474 SLoC // 0.1% comments Scheme 267 SLoC // 0.1% comments Rust 30 SLoC

tree-sitter-bicep

Build Status Discord

Bicep grammar for tree-sitter.

Adapted from the official spec


lib.rs:

This crate provides Bicep 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#"
param myParam string = 'Hello, world!'
"#;
let mut parser = tree_sitter::Parser::new();
let language = tree_sitter_bicep::LANGUAGE;
parser
    .set_language(&language.into())
    .expect("Error loading Bicep parser");
let tree = parser.parse(code, None).unwrap();
assert!(!tree.root_node().has_error());

Dependencies

~4–310KB