lib/css/src/match/root.zig

daab053ee43316e1809a84551d573ddd1e5bf3d2

 1 //! Selector matching over an element interface, plus the rule bucket index.
 2 //!
 3 //! The matcher is parameterized by `Element`, a vtable a consumer fills over
 4 //! its own node storage, so `ui` and `browser` share one implementation and
 5 //! `css` imports neither.
 6 //!
 7 //! Matching runs right to left. The rightmost compound is tested first, and the
 8 //! chain then walks leftwards with backtracking at the descendant and
 9 //! subsequent sibling combinators, bounded by `max_depth`.
10 
11 const engine = @import("engine.zig");
12 
13 pub const Context = engine.Context;
14 pub const Element = engine.Element;
15 pub const Match = engine.Match;
16 pub const matchCompound = engine.matchCompound;
17 pub const matches = engine.matches;
18 pub const max_compounds = engine.max_compounds;
19 pub const max_depth = engine.max_depth;
20 pub const max_element_classes = engine.max_element_classes;
21 pub const packSibling = engine.packSibling;
22 pub const siblingCount = engine.siblingCount;
23 pub const siblingIndex = engine.siblingIndex;