| 850 | function resolveTestFromToken(maskToken, ndxInitializer, loopNdx, quantifierRecurse) { |
| 851 | function handleMatch(match, loopNdx, quantifierRecurse) { |
| 852 | function isFirstMatch(latestMatch, tokenGroup) { |
| 853 | var firstMatch = $.inArray(latestMatch, tokenGroup.matches) === 0; |
| 854 | if (!firstMatch) { |
| 855 | $.each(tokenGroup.matches, function(ndx, match) { |
| 856 | if (match.isQuantifier === true) firstMatch = isFirstMatch(latestMatch, tokenGroup.matches[ndx - 1]); else if (match.hasOwnProperty("matches")) firstMatch = isFirstMatch(latestMatch, match); |
| 857 | if (firstMatch) return false; |
| 858 | }); |
| 859 | } |
| 860 | return firstMatch; |
| 861 | } |
| 862 | function resolveNdxInitializer(pos, alternateNdx, targetAlternation) { |
| 863 | var bestMatch, indexPos; |
| 864 | if (getMaskSet().tests[pos] || getMaskSet().validPositions[pos]) { |