@@ -56,10 +56,13 @@ const handle = zwitch('name', {
5656} )
5757
5858pseudo . needsIndex = [
59+ 'any' ,
5960 'first-child' ,
6061 'first-of-type' ,
6162 'last-child' ,
6263 'last-of-type' ,
64+ 'matches' ,
65+ 'not' ,
6366 'nth-child' ,
6467 'nth-last-child' ,
6568 'nth-of-type' ,
@@ -90,16 +93,16 @@ export function pseudo(query, element, index, parent, state) {
9093/**
9194 * @param {RulePseudoSelector } query
9295 * @param {Element } element
93- * @param {number|null } _1
94- * @param {Parent|null } _2
96+ * @param {number|null } _
97+ * @param {Parent|null } parent
9598 * @param {SelectState } state
9699 * @returns {boolean }
97100 */
98- function matches ( query , element , _1 , _2 , state ) {
101+ function matches ( query , element , _ , parent , state ) {
99102 const shallow = state . shallow
100103 const one = state . one
101104
102- state . shallow = true
105+ state . shallow = false
103106 state . one = true
104107
105108 const result = any ( query . value , element , state ) [ 0 ] === element
@@ -525,12 +528,12 @@ function assertDeep(state, query) {
525528/**
526529 * @param {RulePseudoSelector } query
527530 * @param {Element } element
528- * @param {number|null } _2
529- * @param {Parent|null } _3
531+ * @param {number|null } _1
532+ * @param {Parent|null } _2
530533 * @param {SelectState } state
531534 * @returns {boolean }
532535 */
533- function has ( query , element , _2 , _3 , state ) {
536+ function has ( query , element , _1 , _2 , state ) {
534537 const shallow = state . shallow
535538 const one = state . one
536539 const scopeElements = state . scopeElements
0 commit comments