Expand description
W3C Selectors Level 3 / Level 4 準拠の DOM セレクタパーサ。
matches(), closest(), querySelector(), querySelectorAll() で共有される
純粋なセレクタ字句解析・構文木構築ロジックを提供する。
Structs§
Enums§
Functions§
- build_
steps - トークン列から
SelStep列を組み立てる。 - nth_
formula_ matches position(1始まり)がan+b式(nは 0,1,2,…)のいずれかのnで表せるか判定する。- parse_
attr_ sel [attr...]1件を解析する。- parse_
compound - 単一コンパウンドセレクタ(
div.active#foo[data-x=y]:not(...))を解析する。 - parse_
nth_ formula :nth-child()引数(odd/even/N/aN+b/aN-b/-aN+b)を解析する。- split_
top_ level_ commas - トップレベルカンマで区切る。
- tokenize_
selector_ group - 1グループ分のセレクタ文字列をトークン分割する。