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
49
50
51
52
53
54
55
56
57
58
59
60
61
//! CSS selector parsing and serialization.
//!
//! Hub for `selector.rs` (high-level API + downleveling) / `parser.rs`
//! (Component / Selector / SelectorList grammar) / `builder.rs`.
//!
//! `parser.rs` carries the full grammar
//! (`GenericComponent`/`GenericSelector`/`GenericSelectorList`, `Combinator`,
//! `PseudoClass`/`PseudoElement`, `attrs::*`, `NthSelectorData`/`NthType`/
//! `NthOfSelectorData`, `SpecificityAndFlags`/`SelectorFlags`,
//! `SelectorParseErrorKind`, `compute_specificity`, the recursive-descent
//! `parse_*` functions). `selector.rs` carries the high-level API
//! (`is_equivalent`/`downlevel_selectors`/`get_prefix`/`is_compatible`) and
//! the two serializer namespaces (`serialize::*`, `tocss_servo::*`).
//! `builder.rs` carries `SelectorBuilder`.
//!
//! The `impl_::Selectors` marker (Rust trait-based reshaping of Zig's
//! `selector.impl.Selectors.SelectorImpl` type-alias namespace) lives here in
//! the hub so the parser↔selector cycle has a single anchor; both files reach
//! it via `bun_css::selector::impl_` / `super::impl_`.
pub use ;
/// Our implementation of the `SelectorImpl` interface — the Rust-shaped
/// equivalent of Zig's `selector.impl.Selectors`. Defined in the hub (not in
/// `selector.rs`) to break the parser↔selector dependency cycle: `parser.rs`
/// needs `impl_::Selectors` to instantiate `Component`/`Selector`/
/// `SelectorList`, and `selector.rs` needs those instantiations.
// ported from: src/css/selectors/