1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//! Strongly-typed AST types for CSS, auto-generated from
//! [`tree-sitter-css`](https://docs.rs/tree-sitter-css)'s `node-types.json`.
//!
//! This crate is generated by [`treesitter-types`](https://docs.rs/treesitter-types) and is
//! automatically kept up to date when a new version of the grammar crate is released.
//!
//! These types have been tested by parsing the
//! [Bootstrap](https://github.com/twbs/bootstrap) source code.
//!
//! See the [Tree-sitter](https://tree-sitter.github.io/tree-sitter/) project for more
//! information about the underlying parser framework.
//!
//! # Example
//!
//! ```
//! use treesitter_types_css::*;
//!
//! // A small CSS stylesheet.
//! let src = b"\
//! body {
//! color: red;
//! font-size: 16px;
//! }
//! ";
//!
//! // Parse the source with tree-sitter and convert into typed AST.
//! let mut parser = tree_sitter::Parser::new();
//! parser.set_language(&tree_sitter_css::LANGUAGE.into()).unwrap();
//! let tree = parser.parse(src, None).unwrap();
//! let stylesheet = Stylesheet::from_node(tree.root_node(), src).unwrap();
//!
//! // The stylesheet has one top-level child: a rule set for `body`.
//! assert_eq!(stylesheet.children.len(), 1);
//!
//! let StylesheetChildren::RuleSet(rule_set) = &stylesheet.children[0] else {
//! panic!("expected a rule set");
//! };
//! // The rule set contains the selector and declarations.
//! assert!(!rule_set.children.is_empty());
//! assert_eq!(rule_set.span.start.row, 0);
//! ```
pub use tree_sitter_css;
pub use tree_sitter;
pub use ;
pub use *;