( selector, match /* Internal Use Only */ )
| 2323 | } |
| 2324 | |
| 2325 | function compile( selector, match /* Internal Use Only */ ) { |
| 2326 | var i, |
| 2327 | setMatchers = [], |
| 2328 | elementMatchers = [], |
| 2329 | cached = compilerCache[ selector + " " ]; |
| 2330 | |
| 2331 | if ( !cached ) { |
| 2332 | |
| 2333 | // Generate a function of recursive functions that can be used to check each element |
| 2334 | if ( !match ) { |
| 2335 | match = tokenize( selector ); |
| 2336 | } |
| 2337 | i = match.length; |
| 2338 | while ( i-- ) { |
| 2339 | cached = matcherFromTokens( match[ i ] ); |
| 2340 | if ( cached[ jQuery.expando ] ) { |
| 2341 | setMatchers.push( cached ); |
| 2342 | } else { |
| 2343 | elementMatchers.push( cached ); |
| 2344 | } |
| 2345 | } |
| 2346 | |
| 2347 | // Cache the compiled function |
| 2348 | cached = compilerCache( selector, |
| 2349 | matcherFromGroupMatchers( elementMatchers, setMatchers ) ); |
| 2350 | |
| 2351 | // Save selector and tokenization |
| 2352 | cached.selector = selector; |
| 2353 | } |
| 2354 | return cached; |
| 2355 | } |
| 2356 | |
| 2357 | /** |
| 2358 | * A low-level selection function that works with jQuery's compiled |
no test coverage detected