1 unstable release

new 0.0.5 May 3, 2025

#148 in Text editors

MIT license

145KB
5K SLoC

C 4.5K SLoC // 0.0% comments JavaScript 143 SLoC // 0.0% comments Rust 32 SLoC // 0.1% comments Scheme 19 SLoC

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

tree-sitter-haml

This is a general tree-sitter parser grammar for the HAML templating language.

Development

Building

To build the grammar, run:

npm run build

Testing

To test the grammar, run:

npm run test

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

Credits

References

Dependencies

~4–280KB