`Sizzle.tokenize` 是做什么的

What does `Sizzle.tokenize` do

Sizzle.tokenize 没有记录,源代码中没有评论。它有什么作用?

The code

它拆分字符串 css 选择器。 E

Example: "div > button.btn", if you use this string to tokenize, Sizzle.tokenize returns an array with arrays as item and within that array item there is an object that has property type and value. In example above the results will be [[{type: "tag",value: "div"},{type: ">",value: " > "},{type: "tag",value: "button"},{type: "class",value: "btn"}]].

如果您使用另一个带逗号的选择器,它会在父数组中添加新数组。