1 unstable release

0.1.2 Nov 18, 2025

#2874 in Parser implementations

MIT license

525KB
18K SLoC

C 18K SLoC // 0.0% comments JavaScript 406 SLoC // 0.1% comments Scheme 63 SLoC Rust 32 SLoC // 0.1% comments

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

tree-sitter-css

crates pypi

CSS grammar for tree-sitter, forked from tree-sitter-css.

Note that unlike upstream, generated files are not checked into git, so you need to run tree-sitter generate after cloning this repository, or download generate files from the releases page.

Contributions are welcome, so are co-maintainers.

Dependencies

~240KB