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