Lines Matching refs:formula
2920 var mm, formula = m[6], predicate;
2921 if (formula == 'even') formula = '2n+0';
2922 if (formula == 'odd') formula = '2n+1';
2923 if (mm = formula.match(/^(\d+)$/)) // digit only
2925 if (mm = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b
3206 'nth-child': function(nodes, formula, root) { argument
3207 return Selector.pseudos.nth(nodes, formula, root);
3209 'nth-last-child': function(nodes, formula, root) { argument
3210 return Selector.pseudos.nth(nodes, formula, root, true);
3212 'nth-of-type': function(nodes, formula, root) { argument
3213 return Selector.pseudos.nth(nodes, formula, root, false, true);
3215 'nth-last-of-type': function(nodes, formula, root) { argument
3216 return Selector.pseudos.nth(nodes, formula, root, true, true);
3218 'first-of-type': function(nodes, formula, root) { argument
3221 'last-of-type': function(nodes, formula, root) { argument
3224 'only-of-type': function(nodes, formula, root) { argument
3226 return p['last-of-type'](p['first-of-type'](nodes, formula, root), formula, root);
3239 nth: function(nodes, formula, root, reverse, ofType) { argument
3241 if (formula == 'even') formula = '2n+0';
3242 if (formula == 'odd') formula = '2n+1';
3251 if (formula.match(/^\d+$/)) { // just a number
3252 formula = Number(formula);
3254 if (node.nodeIndex == formula) results.push(node);
3255 } else if (m = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b